diff --git a/.changeset/config.json b/.changeset/config.json deleted file mode 100644 index 2f48168..0000000 --- a/.changeset/config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", - "changelog": "@changesets/cli/changelog", - "commit": false, - "fixed": [], - "linked": [], - "access": "restricted", - "baseBranch": "main", - "privatePackages": false, - "updateInternalDependencies": "patch", - "ignore": [] -} diff --git a/.eslintrc.json b/.eslintrc.json index b682cbf..cb4cc30 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,5 @@ { "root": true, "extends": ["@fisch0920/eslint-config/node"], - "ignorePatterns": ["out"] + "ignorePatterns": ["out", "packages/openapi-to-ts/fixtures/generated"] } diff --git a/.prettierignore b/.prettierignore index 1fcb152..e6e7aa7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ out +packages/openapi-to-ts/fixtures/generated diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8c89d3b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,35 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "tsx", + "type": "node", + "request": "launch", + + // Debug current file in VSCode + "program": "${file}", + + /* + * Path to tsx binary + * Assuming locally installed + */ + "runtimeExecutable": "tsx", + + /* + * Open terminal when debugging starts (Optional) + * Useful to see console.logs + */ + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + + // Files to exclude from debugger (e.g. call stack) + "skipFiles": [ + // Node.js internal core modules + "/**", + + // Ignore all dependencies (optional) + "${workspaceFolder}/node_modules/**" + ] + } + ] +} diff --git a/docs/mint.json b/docs/mint.json index 4ba5c79..a33d9e6 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -56,11 +56,13 @@ "group": "Tools", "pages": [ "tools/apollo", + "tools/arxiv", "tools/bing", "tools/calculator", "tools/clearbit", "tools/dexa", "tools/diffbot", + "tools/duck-duck-go", "tools/e2b", "tools/exa", "tools/firecrawl", @@ -70,6 +72,7 @@ "tools/jina", "tools/leadmagic", "tools/midjourney", + "tools/mcp", "tools/novu", "tools/people-data-labs", "tools/perigon", diff --git a/docs/tools/arxiv.mdx b/docs/tools/arxiv.mdx new file mode 100644 index 0000000..a661307 --- /dev/null +++ b/docs/tools/arxiv.mdx @@ -0,0 +1,39 @@ +--- +title: ArXiv +description: Search for research articles. +--- + +- package: `@agentic/arxiv` +- exports: `class ArXivClient`, `namespace arxiv` +- [source](https://github.com/transitive-bullshit/agentic/blob/main/packages/arxiv/src/arxiv-client.ts) +- [arxiv api docs](https://info.arxiv.org/help/api/index.html) + +## Install + + +```bash npm +npm install @agentic/arxiv +``` + +```bash yarn +yarn add @agentic/arxiv +``` + +```bash pnpm +pnpm add @agentic/arxiv +``` + + + +## Usage + +```ts +import { ArXivClient } from '@agentic/arxiv' + +// No API is required to use the ArXiv API +const arxiv = new ArXivClient() +const results = await arxiv.search({ + query: 'machine learning', + maxResults: 10 +}) +``` diff --git a/docs/tools/duck-duck-go.mdx b/docs/tools/duck-duck-go.mdx new file mode 100644 index 0000000..84e90d5 --- /dev/null +++ b/docs/tools/duck-duck-go.mdx @@ -0,0 +1,38 @@ +--- +title: DuckDuckGo +description: Search for research articles. +--- + +- package: `@agentic/duck-duck-go` +- exports: `class DuckDuckGoClient`, `namespace duckduckgo` +- [source](https://github.com/transitive-bullshit/agentic/blob/main/packages/duck-duck-go/src/duck-duck-go-client.ts) +- [Duck Duck Go api docs](https://api.duckduckgo.com) + +## Install + + +```bash npm +npm install @agentic/duck-duck-go +``` + +```bash yarn +yarn add @agentic/duck-duck-go +``` + +```bash pnpm +pnpm add @agentic/duck-duck-go +``` + + + +## Usage + +```ts +import { DuckDuckGoClient } from '@agentic/duck-duck-go' + +// No API is required to use the DuckDuckGo API +const duckDuckGo = new DuckDuckGoClient() +const results = await duckDuckGo.search({ + query: 'latest news about AI' +}) +``` diff --git a/docs/tools/mcp.mdx b/docs/tools/mcp.mdx new file mode 100644 index 0000000..ef510b1 --- /dev/null +++ b/docs/tools/mcp.mdx @@ -0,0 +1,85 @@ +--- +title: MCP Tools +description: Agentic adapter for accessing tools defined by Model Context Protocol (MCP) servers. +--- + +- package: `@agentic/mcp` +- exports: `createMcpTools`, `class McpTools` +- [source](https://github.com/transitive-bullshit/agentic/blob/main/packages/mcp/src/mcp-tools.ts) +- [MCP docs](https://modelcontextprotocol.io) + +## Install + + +```bash npm +npm install @agentic/mcp +``` + +```bash yarn +yarn add @agentic/mcp +``` + +```bash pnpm +pnpm add @agentic/mcp +``` + + + +## Usage + +```ts +import 'dotenv/config' + +import { createAISDKTools } from '@agentic/ai-sdk' +import { createMcpTools } from '@agentic/mcp' +import { openai } from '@ai-sdk/openai' +import { generateText } from 'ai' + +async function main() { + // Create an MCP tools provider, which will start a local MCP server process + // and use the stdio transport to communicate with it. + const mcpTools = await createMcpTools({ + name: 'agentic-mcp-filesystem', + serverProcess: { + command: 'npx', + args: [ + '-y', + // This example uses a built-in example MCP server from Anthropic, which + // provides a set of tools to access the local filesystem. + '@modelcontextprotocol/server-filesystem', + // Allow the MCP server to access the current working directory. + process.cwd() + // Feel free to add additional directories the tool should have access to. + ] + } + }) + + const result = await generateText({ + model: openai('gpt-4o-mini'), + tools: createAISDKTools(mcpTools), + toolChoice: 'required', + temperature: 0, + system: 'You are a helpful assistant. Be as concise as possible.', + prompt: 'What files are in the current directory?' + }) + + console.log(result.toolResults[0]) +} + +await main() +``` + +### createMcpTools + +`createMcpTools` creates a new `McpTools` instance by starting or connecting to an MCP server. + +You must provide either an existing `transport`, an existing `serverUrl`, or a +`serverProcess` to spawn. + +All tools within the `McpTools` instance will be namespaced under the given `name`. + +### JSON Schema + +Note that `McpTools` uses JSON Schemas for toll input parameters, whereas most built-in tools use Zod schemas. This is important because some AI frameworks don't support JSON Schemas. + +Currently, Mastra, Dexter, and xsAI don't support JSON Schema input parameters, so they won't work with `McpTools`. diff --git a/examples/ai-sdk/bin/mcp-filesystem.ts b/examples/ai-sdk/bin/mcp-filesystem.ts new file mode 100644 index 0000000..a1f66f8 --- /dev/null +++ b/examples/ai-sdk/bin/mcp-filesystem.ts @@ -0,0 +1,44 @@ +import 'dotenv/config' + +import { createAISDKTools } from '@agentic/ai-sdk' +import { createMcpTools } from '@agentic/mcp' +import { openai } from '@ai-sdk/openai' +import { generateText } from 'ai' +import { gracefulExit } from 'exit-hook' + +async function main() { + // Create an MCP tools provider, which will start a local MCP server process + // and use the stdio transport to communicate with it. + const mcpTools = await createMcpTools({ + name: 'agentic-mcp-filesystem', + serverProcess: { + command: 'npx', + args: [ + '-y', + '@modelcontextprotocol/server-filesystem', + // Allow the MCP server to access the current working directory. + process.cwd() + // Feel free to add additional directories the tool should have access to. + ] + } + }) + + const result = await generateText({ + model: openai('gpt-4o-mini'), + tools: createAISDKTools(mcpTools), + toolChoice: 'required', + temperature: 0, + system: 'You are a helpful assistant. Be as concise as possible.', + prompt: 'What files are in the current directory?' + }) + + console.log(result.toolResults[0]?.result || JSON.stringify(result, null, 2)) +} + +try { + await main() + gracefulExit(0) +} catch (err) { + console.error(err) + gracefulExit(1) +} diff --git a/examples/ai-sdk/package.json b/examples/ai-sdk/package.json index c8e2ef6..cc961f1 100644 --- a/examples/ai-sdk/package.json +++ b/examples/ai-sdk/package.json @@ -9,9 +9,11 @@ }, "dependencies": { "@agentic/ai-sdk": "workspace:*", + "@agentic/mcp": "workspace:*", "@agentic/weather": "workspace:*", "@ai-sdk/openai": "catalog:", "ai": "catalog:", + "exit-hook": "catalog:", "openai": "catalog:", "zod": "catalog:" }, diff --git a/package.json b/package.json index 8c609bc..c8f71ac 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "type": "module", "scripts": { "build": "turbo build", - "dev": "turbo dev --concurrency 50 --continue", + "dev": "turbo dev --continue", "docs": "cd docs && npx mintlify dev", "clean": "turbo clean", "fix": "run-s fix:*", diff --git a/packages/ai-sdk/src/ai-sdk.ts b/packages/ai-sdk/src/ai-sdk.ts index a9436fc..f133a15 100644 --- a/packages/ai-sdk/src/ai-sdk.ts +++ b/packages/ai-sdk/src/ai-sdk.ts @@ -1,5 +1,10 @@ -import { type AIFunctionLike, AIFunctionSet } from '@agentic/core' -import { tool } from 'ai' +import { + type AIFunctionLike, + AIFunctionSet, + asAgenticSchema, + isZodSchema +} from '@agentic/core' +import { jsonSchema, tool } from 'ai' /** * Converts a set of Agentic stdlib AI functions to an object compatible with @@ -13,8 +18,10 @@ export function createAISDKTools(...aiFunctionLikeTools: AIFunctionLike[]) { fn.spec.name, tool({ description: fn.spec.description, - parameters: fn.inputSchema, - execute: fn.impl + parameters: isZodSchema(fn.inputSchema) + ? fn.inputSchema + : jsonSchema(asAgenticSchema(fn.inputSchema).jsonSchema), + execute: fn.execute }) ]) ) diff --git a/packages/arxiv/package.json b/packages/arxiv/package.json new file mode 100644 index 0000000..36e19ae --- /dev/null +++ b/packages/arxiv/package.json @@ -0,0 +1,47 @@ +{ + "name": "@agentic/arxiv", + "version": "0.1.0", + "description": "Agentic SDK for Arxiv.", + "author": "Travis Fischer ", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/transitive-bullshit/agentic.git" + }, + "type": "module", + "source": "./src/index.ts", + "types": "./dist/index.d.ts", + "sideEffects": false, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "clean": "del dist", + "test": "run-s test:*", + "test:lint": "eslint .", + "test:typecheck": "tsc --noEmit" + }, + "dependencies": { + "@agentic/core": "workspace:*", + "fast-xml-parser": "catalog:", + "ky": "catalog:" + }, + "peerDependencies": { + "zod": "catalog:" + }, + "devDependencies": { + "@agentic/tsconfig": "workspace:*" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/arxiv/readme.md b/packages/arxiv/readme.md new file mode 100644 index 0000000..38781f3 --- /dev/null +++ b/packages/arxiv/readme.md @@ -0,0 +1,24 @@ +

+ + Agentic + +

+ +

+ AI agent stdlib that works with any LLM and TypeScript AI SDK. +

+ +

+ Build Status + NPM + MIT License + Prettier Code Formatting +

+ +# Agentic + +**See the [github repo](https://github.com/transitive-bullshit/agentic) or [docs](https://agentic.so) for more info.** + +## License + +MIT © [Travis Fischer](https://x.com/transitive_bs) diff --git a/packages/arxiv/src/arxiv-client.ts b/packages/arxiv/src/arxiv-client.ts new file mode 100644 index 0000000..da82996 --- /dev/null +++ b/packages/arxiv/src/arxiv-client.ts @@ -0,0 +1,243 @@ +import { + aiFunction, + AIFunctionsProvider, + pruneEmpty, + sanitizeSearchParams +} from '@agentic/core' +import { XMLParser } from 'fast-xml-parser' +import defaultKy, { type KyInstance } from 'ky' +import { z } from 'zod' + +import { castArray, getProp } from './utils' + +export namespace arxiv { + export const API_BASE_URL = 'https://export.arxiv.org/api' + + export const SortType = { + RELEVANCE: 'relevance', + LAST_UPDATED_DATE: 'lastUpdatedDate', + SUBMITTED_DATE: 'submittedDate' + } as const + + export const SortOrder = { + ASCENDING: 'ascending', + DESCENDING: 'descending' + } as const + + export const FilterType = { + ALL: 'all', + TITLE: 'title', + AUTHOR: 'author', + ABSTRACT: 'abstract', + COMMENT: 'comment', + JOURNAL_REFERENCE: 'journal_reference', + SUBJECT_CATEGORY: 'subject_category', + REPORT_NUMBER: 'report_number' + } as const + + export type ValueOf> = T[keyof T] + export const FilterTypeMapping: Record, string> = { + all: 'all', + title: 'ti', + author: 'au', + abstract: 'abs', + comment: 'co', + journal_reference: 'jr', + subject_category: 'cat', + report_number: 'rn' + } + + export const Separators = { + AND: '+AND+', + OR: '+OR+', + ANDNOT: '+ANDNOT+' + } as const + + export interface ArXivResponse { + totalResults: number + startIndex: number + itemsPerPage: number + entries: { + id: string + title: string + summary: string + published: string + updated: string + authors: { name: string; affiliation: string[] }[] + doi: string + comment: string + journalReference: string + primaryCategory: string + categories: string[] + links: string[] + }[] + } + + export const extractId = (value: string) => + value + .replace('https://arxiv.org/abs/', '') + .replace('https://arxiv.org/pdf/', '') + .replace(/v\d$/, '') + + const EntrySchema = z.object({ + field: z.nativeEnum(FilterType).default(FilterType.ALL), + value: z.string().min(1) + }) + + export const SearchParamsSchema = z + .object({ + ids: z.array(z.string().min(1)).optional(), + searchQuery: z + .union([ + z.string(), + z.object({ + include: z + .array(EntrySchema) + .nonempty() + .describe('Filters to include results.'), + exclude: z + .array(EntrySchema) + .optional() + .describe('Filters to exclude results.') + }) + ]) + .optional(), + start: z.number().int().min(0).default(0), + maxResults: z.number().int().min(1).max(100).default(5) + }) + .describe('Sorting by date is not supported.') + export type SearchParams = z.infer +} + +/** + * Lightweight wrapper around ArXiv for academic / scholarly research articles. + * + * @see https://arxiv.org + */ +export class ArXivClient extends AIFunctionsProvider { + protected readonly ky: KyInstance + protected readonly apiBaseUrl: string + + constructor({ + apiBaseUrl = arxiv.API_BASE_URL, + ky = defaultKy + }: { + apiKey?: string + apiBaseUrl?: string + ky?: KyInstance + }) { + super() + + this.apiBaseUrl = apiBaseUrl + + this.ky = ky.extend({ + prefixUrl: this.apiBaseUrl + }) + } + + /** + * Searches for research articles published on arXiv. + */ + @aiFunction({ + name: 'arxiv_search', + description: 'Searches for research articles published on arXiv.', + inputSchema: arxiv.SearchParamsSchema + }) + async search(queryOrOpts: string | arxiv.SearchParams) { + const opts = + typeof queryOrOpts === 'string' + ? ({ searchQuery: queryOrOpts } as arxiv.SearchParams) + : queryOrOpts + + if (!opts.ids?.length && !opts.searchQuery) { + throw new Error( + `The 'searchQuery' property must be non-empty if the 'ids' property is not provided.` + ) + } + + const searchParams = sanitizeSearchParams({ + start: opts.start, + max_results: opts.maxResults, + id_list: opts.ids?.map(arxiv.extractId), + search_query: opts.searchQuery + ? typeof opts.searchQuery === 'string' + ? opts.searchQuery + : [ + opts.searchQuery.include + .map( + (tag) => `${arxiv.FilterTypeMapping[tag.field]}:${tag.value}` + ) + .join(arxiv.Separators.AND), + (opts.searchQuery.exclude ?? []) + .map( + (tag) => `${arxiv.FilterTypeMapping[tag.field]}:${tag.value}` + ) + .join(arxiv.Separators.ANDNOT) + ] + .filter(Boolean) + .join(arxiv.Separators.ANDNOT) + : undefined, + sortBy: arxiv.SortType.RELEVANCE, + sortOrder: arxiv.SortOrder.DESCENDING + }) + + const responseText = await this.ky.get('query', { searchParams }).text() + + const parser = new XMLParser({ + allowBooleanAttributes: true, + alwaysCreateTextNode: false, + attributeNamePrefix: '@_', + attributesGroupName: false, + cdataPropName: '#cdata', + ignoreAttributes: true, + numberParseOptions: { hex: false, leadingZeros: true }, + parseAttributeValue: false, + parseTagValue: true, + preserveOrder: false, + removeNSPrefix: true, + textNodeName: '#text', + trimValues: true, + ignoreDeclaration: true + }) + + const parsedData = parser.parse(responseText) + + let entries: Record[] = getProp( + parsedData, + ['feed', 'entry'], + [] + ) + entries = castArray(entries) + + return { + totalResults: Math.max( + getProp(parsedData, ['feed', 'totalResults'], 0), + entries.length + ), + startIndex: getProp(parsedData, ['feed', 'startIndex'], 0), + itemsPerPage: getProp(parsedData, ['feed', 'itemsPerPage'], 0), + entries: entries.map((entry) => + pruneEmpty({ + id: arxiv.extractId(entry.id), + url: entry.id, + title: entry.title, + summary: entry.summary, + published: entry.published, + updated: entry.updated, + authors: castArray(entry.author) + .filter(Boolean) + .map((author: any) => ({ + name: author.name, + affiliation: castArray(author.affiliation ?? []) + })), + doi: entry.doi, + comment: entry.comment, + journalReference: entry.journal_ref, + primaryCategory: entry.primary_category, + categories: castArray(entry.category).filter(Boolean), + links: castArray(entry.link).filter(Boolean) + }) + ) + } + } +} diff --git a/packages/arxiv/src/index.ts b/packages/arxiv/src/index.ts new file mode 100644 index 0000000..1a4862f --- /dev/null +++ b/packages/arxiv/src/index.ts @@ -0,0 +1 @@ +export * from './arxiv-client' diff --git a/packages/arxiv/src/utils.ts b/packages/arxiv/src/utils.ts new file mode 100644 index 0000000..5b67132 --- /dev/null +++ b/packages/arxiv/src/utils.ts @@ -0,0 +1,30 @@ +export function hasProp( + target: T | undefined, + key: keyof T +): key is keyof T { + return Boolean(target) && Object.prototype.hasOwnProperty.call(target, key) +} + +export function getProp( + target: unknown, + paths: readonly (keyof any)[], + defaultValue: any = undefined +) { + let value: any = target + if (!value) { + return undefined + } + + for (const key of paths) { + if (!hasProp(value, key)) { + return defaultValue + } + value = value[key] + } + return value +} + +export function castArray(arr: T) { + const result = Array.isArray(arr) ? arr : [arr] + return result as T extends unknown[] ? T : [T] +} diff --git a/packages/arxiv/tsconfig.json b/packages/arxiv/tsconfig.json new file mode 100644 index 0000000..6c8d720 --- /dev/null +++ b/packages/arxiv/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@agentic/tsconfig/base.json", + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/core/src/create-ai-function.test.ts b/packages/core/src/create-ai-function.test.ts index 63a3d26..cd08118 100644 --- a/packages/core/src/create-ai-function.test.ts +++ b/packages/core/src/create-ai-function.test.ts @@ -2,28 +2,29 @@ import { describe, expect, test } from 'vitest' import { z } from 'zod' import { createAIFunction } from './create-ai-function' +import { type Msg } from './message' -const fullName = createAIFunction( - { - name: 'fullName', - description: 'Returns the full name of a person.', - inputSchema: z.object({ - first: z.string(), - last: z.string() - }) - }, - async ({ first, last }) => { +// TODO: Add tests for passing JSON schema directly. + +const fullNameAIFunction = createAIFunction({ + name: 'fullName', + description: 'Returns the full name of a person.', + inputSchema: z.object({ + first: z.string(), + last: z.string() + }), + execute: ({ first, last }) => { return `${first} ${last}` } -) +}) describe('createAIFunction()', () => { test('exposes OpenAI function calling spec', () => { - expect(fullName.spec.name).toEqual('fullName') - expect(fullName.spec.description).toEqual( + expect(fullNameAIFunction.spec.name).toEqual('fullName') + expect(fullNameAIFunction.spec.description).toEqual( 'Returns the full name of a person.' ) - expect(fullName.spec.parameters).toEqual({ + expect(fullNameAIFunction.spec.parameters).toEqual({ properties: { first: { type: 'string' }, last: { type: 'string' } @@ -34,9 +35,22 @@ describe('createAIFunction()', () => { }) }) - test('executes the function', async () => { - expect(await fullName('{"first": "John", "last": "Doe"}')).toEqual( - 'John Doe' - ) + test('executes the function with JSON string', async () => { + expect( + await fullNameAIFunction('{"first": "John", "last": "Doe"}') + ).toEqual('John Doe') + }) + + test('executes the function with OpenAI Message', async () => { + const message: Msg.FuncCall = { + role: 'assistant', + content: null, + function_call: { + name: 'fullName', + arguments: '{"first": "Jane", "last": "Smith"}' + } + } + + expect(await fullNameAIFunction(message)).toEqual('Jane Smith') }) }) diff --git a/packages/core/src/create-ai-function.ts b/packages/core/src/create-ai-function.ts index 3d1b4e5..70acc28 100644 --- a/packages/core/src/create-ai-function.ts +++ b/packages/core/src/create-ai-function.ts @@ -1,9 +1,37 @@ -import type { z } from 'zod' - import type * as types from './types' -import { parseStructuredOutput } from './parse-structured-output' +import { asAgenticSchema } from './schema' import { assert } from './utils' -import { zodToJsonSchema } from './zod-to-json-schema' + +export type CreateAIFunctionArgs< + InputSchema extends types.AIFunctionInputSchema +> = { + /** Name of the function. */ + name: string + + /** Description of the function. */ + description?: string + + /** + * Zod schema or AgenticSchema for the function parameters. + * + * You can use a JSON Schema for more dynamic tool sources such as MCP by + * using the `createJsonSchema` utility function. + */ + inputSchema: InputSchema + + /** + * Whether to enable strict structured output generation based on the given + * input schema. (this is a feature of the OpenAI API) + * + * Defaults to `true`. + */ + strict?: boolean +} + +export type AIFunctionImplementation< + InputSchema extends types.AIFunctionInputSchema, + Output +> = (params: types.inferInput) => types.MaybePromise /** * Create a function meant to be used with OpenAI tool or function calling. @@ -14,79 +42,103 @@ import { zodToJsonSchema } from './zod-to-json-schema' * The `spec` property of the returned function is the spec for adding the * function to the OpenAI API `functions` property. */ -export function createAIFunction, Output>( - spec: { - /** Name of the function. */ - name: string - /** Description of the function. */ - description?: string - /** Zod schema for the function parameters. */ - inputSchema: InputSchema - /** - * Whether or not to enable structured output generation based on the given - * zod schema. - */ - strict?: boolean +export function createAIFunction< + InputSchema extends types.AIFunctionInputSchema, + Output +>( + args: CreateAIFunctionArgs, + /** Underlying function implementation. */ + execute: AIFunctionImplementation +): types.AIFunction +export function createAIFunction< + InputSchema extends types.AIFunctionInputSchema, + Output +>( + args: CreateAIFunctionArgs & { + /** Underlying function implementation. */ + execute: AIFunctionImplementation + } +): types.AIFunction +export function createAIFunction< + InputSchema extends types.AIFunctionInputSchema, + Output +>( + { + name, + description = '', + inputSchema, + strict = true, + execute + }: CreateAIFunctionArgs & { + /** Underlying function implementation. */ + execute?: AIFunctionImplementation }, - /** Implementation of the function to call with the parsed arguments. */ - implementation: (params: z.infer) => types.MaybePromise + /** Underlying function implementation. */ + executeArg?: AIFunctionImplementation ): types.AIFunction { - assert(spec.name, 'createAIFunction missing required "spec.name"') + assert(name, 'createAIFunction missing required "name"') + assert(inputSchema, 'createAIFunction missing required "inputSchema"') assert( - spec.inputSchema, - 'createAIFunction missing required "spec.inputSchema"' + execute || executeArg, + 'createAIFunction missing required "execute" function implementation' ) - assert(implementation, 'createAIFunction missing required "implementation"') assert( - typeof implementation === 'function', - 'createAIFunction "implementation" must be a function' + !(execute && executeArg), + 'createAIFunction: cannot provide both "execute" and a second function argument. there should only be one function implementation.' + ) + execute ??= executeArg + assert( + execute, + 'createAIFunction missing required "execute" function implementation' + ) + assert( + typeof execute === 'function', + 'createAIFunction "execute" must be a function' ) + const inputAgenticSchema = asAgenticSchema(inputSchema, { strict }) + /** Parse the arguments string, optionally reading from a message. */ - const parseInput = (input: string | types.Msg) => { + const parseInput = ( + input: string | types.Msg + ): types.inferInput => { if (typeof input === 'string') { - return parseStructuredOutput(input, spec.inputSchema) + return inputAgenticSchema.parse(input) } else { const args = input.function_call?.arguments assert( args, - `Missing required function_call.arguments for function ${spec.name}` + `Missing required function_call.arguments for function ${name}` ) - return parseStructuredOutput(args, spec.inputSchema) + return inputAgenticSchema.parse(args) } } - // Call the implementation function with the parsed arguments. + // Call the underlying function implementation with the parsed arguments. const aiFunction: types.AIFunction = ( input: string | types.Msg ) => { const parsedInput = parseInput(input) - return implementation(parsedInput) + return execute(parsedInput) } // Override the default function name with the intended name. Object.defineProperty(aiFunction, 'name', { - value: spec.name, + value: name, writable: false }) - const strict = !!spec.strict - - aiFunction.inputSchema = spec.inputSchema + aiFunction.inputSchema = inputSchema aiFunction.parseInput = parseInput + aiFunction.execute = execute aiFunction.spec = { - name: spec.name, - description: spec.description?.trim() ?? '', - parameters: zodToJsonSchema(spec.inputSchema, { strict }), + name, + description, + parameters: inputAgenticSchema.jsonSchema, type: 'function', strict } - aiFunction.impl = ( - params: z.infer - ): types.MaybePromise => { - return implementation(params) - } return aiFunction } diff --git a/packages/core/src/fns.ts b/packages/core/src/fns.ts index 6ea7f3c..6c51678 100644 --- a/packages/core/src/fns.ts +++ b/packages/core/src/fns.ts @@ -1,5 +1,3 @@ -import type { z } from 'zod' - import type * as types from './types' import { AIFunctionSet } from './ai-function-set' import { createAIFunction } from './create-ai-function' @@ -8,7 +6,7 @@ import { assert } from './utils' export interface PrivateAIFunctionMetadata { name: string description: string - inputSchema: z.AnyZodObject + inputSchema: types.AIFunctionInputSchema methodName: string strict?: boolean } @@ -35,8 +33,15 @@ if (typeof Symbol === 'function' && Symbol.metadata) { } export abstract class AIFunctionsProvider { - private _functions?: AIFunctionSet + protected _functions?: AIFunctionSet + /** + * An `AIFunctionSet` containing all of the AI-compatible functions exposed + * by this class. + * + * This property is useful for manipulating AI functions across multiple + * sources, picking specific functions, ommitting certain functions, etc. + */ get functions(): AIFunctionSet { if (!this._functions) { const metadata = this.constructor[Symbol.metadata] @@ -46,7 +51,6 @@ export abstract class AIFunctionsProvider { ) const invocables = (metadata?.invocables as PrivateAIFunctionMetadata[]) ?? [] - // console.log({ metadata, invocables }) const aiFunctions = invocables.map((invocable) => { const impl = (this as any)[invocable.methodName] @@ -64,7 +68,7 @@ export abstract class AIFunctionsProvider { export function aiFunction< This extends AIFunctionsProvider, - InputSchema extends z.SomeZodObject, + InputSchema extends types.AIFunctionInputSchema, OptionalArgs extends Array, Return extends types.MaybePromise >({ @@ -81,14 +85,14 @@ export function aiFunction< return ( _targetMethod: ( this: This, - input: z.infer, + input: types.inferInput, ...optionalArgs: OptionalArgs ) => Return, context: ClassMethodDecoratorContext< This, ( this: This, - input: z.infer, + input: types.inferInput, ...optionalArgs: OptionalArgs ) => Return > @@ -108,6 +112,23 @@ export function aiFunction< context.addInitializer(function () { ;(this as any)[methodName] = (this as any)[methodName].bind(this) + // ;(this as any)[methodName].aiFunction = this.functions.get( + // name ?? methodName + // ) }) } } + +// declare module './fns' { +// // Define a type for methods decorated with @aiFunction +// type AIFunctionMethod< +// T extends z.ZodObject = z.ZodObject, +// R = any +// > = ((...args: any[]) => R) & { +// aiFunction?: AIFunction +// } + +// interface AIFunctionsProvider { +// [methodName: string]: AIFunctionMethod +// } +// } diff --git a/packages/core/src/schema.test.ts b/packages/core/src/schema.test.ts new file mode 100644 index 0000000..9b40099 --- /dev/null +++ b/packages/core/src/schema.test.ts @@ -0,0 +1,18 @@ +import { expect, test } from 'vitest' +import { z } from 'zod' + +import { asAgenticSchema, createJsonSchema, isZodSchema } from './schema' + +test('isZodSchema', () => { + expect(isZodSchema(z.object({}))).toBe(true) + expect(isZodSchema({})).toBe(false) +}) + +test('asAgenticSchema', () => { + expect(asAgenticSchema(z.object({})).jsonSchema).toEqual({ + type: 'object', + properties: {}, + additionalProperties: false + }) + expect(asAgenticSchema(createJsonSchema({})).jsonSchema).toEqual({}) +}) diff --git a/packages/core/src/schema.ts b/packages/core/src/schema.ts index 53ab248..1bf8e88 100644 --- a/packages/core/src/schema.ts +++ b/packages/core/src/schema.ts @@ -10,7 +10,14 @@ import { zodToJsonSchema } from './zod-to-json-schema' */ export const schemaSymbol = Symbol('agentic.schema') -export type Schema = { +/** + * Structured schema used across Agentic, which wraps either a Zod schema or a + * JSON Schema. + * + * JSON Schema support is important to support more dynamic tool sources such as + * MCP. + */ +export type AgenticSchema = { /** * The JSON Schema. */ @@ -39,9 +46,14 @@ export type Schema = { * Schema type for inference. */ _type: TData + + /** + * Source Zod schema if this object was created from a Zod schema. + */ + _source?: any } -export function isSchema(value: unknown): value is Schema { +export function isAgenticSchema(value: unknown): value is AgenticSchema { return ( typeof value === 'object' && value !== null && @@ -54,37 +66,51 @@ export function isSchema(value: unknown): value is Schema { export function isZodSchema(value: unknown): value is z.ZodType { return ( + !!value && typeof value === 'object' && - value !== null && - '_type' in value && - '_output' in value && - '_input' in value && '_def' in value && - 'parse' in value && - 'safeParse' in value + '~standard' in value && + (value['~standard'] as any)?.vendor === 'zod' ) } -export function asSchema( - schema: z.Schema | Schema, +export function asAgenticSchema( + schema: z.Schema | AgenticSchema, opts: { strict?: boolean } = {} -): Schema { - return isSchema(schema) ? schema : createSchemaFromZodSchema(schema, opts) +): AgenticSchema { + return isAgenticSchema(schema) + ? schema + : createAgenticSchemaFromZodSchema(schema, opts) +} + +export function asZodOrJsonSchema( + schema: z.Schema | AgenticSchema +): z.Schema | types.JSONSchema { + return isZodSchema(schema) ? schema : schema.jsonSchema } /** - * Create a schema from a JSON Schema. + * Create an AgenticSchema from a JSON Schema. + * + * All `AIFunction` input schemas accept either a Zod schema or a custom JSON + * Schema. Use this function to wrap JSON schemas for use with `AIFunction`. + * + * Note that JSON Schemas are not validated by default, so you have to pass + * in an optional `parse` function (using `ajv`, for instance) if you'd like to + * validate them at runtime. */ -export function createSchema( +export function createJsonSchema( jsonSchema: types.JSONSchema, { parse = (value) => value as TData, - safeParse + safeParse, + source }: { parse?: types.ParseFn safeParse?: types.SafeParseFn + source?: any } = {} -): Schema { +): AgenticSchema { safeParse ??= (value: unknown) => { try { const result = parse(value) @@ -99,18 +125,20 @@ export function createSchema( _type: undefined as TData, jsonSchema, parse, - safeParse + safeParse, + _source: source } } -export function createSchemaFromZodSchema( +export function createAgenticSchemaFromZodSchema( zodSchema: z.Schema, opts: { strict?: boolean } = {} -): Schema { - return createSchema(zodToJsonSchema(zodSchema, opts), { +): AgenticSchema { + return createJsonSchema(zodToJsonSchema(zodSchema, opts), { parse: (value) => { return parseStructuredOutput(value, zodSchema) - } + }, + source: zodSchema }) } diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 2a78805..dcb4e6c 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -4,9 +4,10 @@ import type { z } from 'zod' import type { AIFunctionSet } from './ai-function-set' import type { AIFunctionsProvider } from './fns' import type { Msg } from './message' +import type { AgenticSchema } from './schema' export type { Msg } from './message' -export type { Schema } from './schema' +export type { AgenticSchema } from './schema' export type { KyInstance } from 'ky' export type { ThrottledFunction } from 'p-throttle' export type { SetOptional, SetRequired, Simplify } from 'type-fest' @@ -19,7 +20,6 @@ export type DeepNullable = T extends object export type MaybePromise = T | Promise -// TODO: use a more specific type export type JSONSchema = Record export type RelaxedJsonifiable = Jsonifiable | Record @@ -52,6 +52,20 @@ export interface AIToolSpec { function: AIFunctionSpec } +/** + * A Zod object schema or a custom schema created from a JSON schema via + * `createSchema()`. + */ +export type AIFunctionInputSchema = z.ZodObject | AgenticSchema + +// eslint-disable-next-line @typescript-eslint/naming-convention +export type inferInput = + InputSchema extends AgenticSchema + ? InputSchema['_type'] + : InputSchema extends z.ZodTypeAny + ? z.infer + : never + /** The implementation of the function, with arg parsing and validation. */ export type AIFunctionImpl = Omit< (input: string | Msg) => MaybePromise, @@ -65,27 +79,32 @@ export type AIFunctionImpl = Omit< * via the `.functions` property * - `AIFunction` - Individual functions */ -export type AIFunctionLike = AIFunctionsProvider | AIFunction | AIFunctionSet +export type AIFunctionLike = + | AIFunctionsProvider + | AIFunction + | AIFunctionSet /** * A function meant to be used with LLM function calling. */ export interface AIFunction< - InputSchema extends z.ZodObject = z.ZodObject, + // TODO + // InputSchema extends AIFunctionInputSchema = z.ZodObject, + InputSchema extends AIFunctionInputSchema = AIFunctionInputSchema, Output = any > { /** - * Invokes the underlying AI function `impl` but first validates the input + * Invokes the underlying AI function `execute` but first validates the input * against this function's `inputSchema`. This method is callable and is * meant to be passed the raw LLM JSON string or an OpenAI-compatible Message. */ (input: string | Msg): MaybePromise - /** The Zod schema for the input object. */ + /** The schema for the input object (zod or custom schema). */ inputSchema: InputSchema /** Parse the function arguments from a message. */ - parseInput(input: string | Msg): z.infer + parseInput(input: string | Msg): inferInput /** The JSON schema function spec for the OpenAI API `functions` property. */ spec: AIFunctionSpec @@ -94,7 +113,7 @@ export interface AIFunction< * The underlying function implementation without any arg parsing or validation. */ // TODO: this `any` shouldn't be necessary, but it is for `createAIFunction` results to be assignable to `AIFunctionLike` - impl: (params: z.infer | any) => MaybePromise + execute: (params: inferInput | any) => MaybePromise } export type SafeParseResult = diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index 8b110f6..3437959 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -232,9 +232,18 @@ export function sanitizeSearchParams( /** * Stringifies a JSON value in a way that's optimized for use with LLM prompts. + * + * Replacement for `JSON.stringify` when working with LLMs. + * + * @example + * ```ts + * stringifyForModel({ a: 1, b: 2 }) // '{"a":1,"b":2}' + * ``` */ export function stringifyForModel( - jsonObject?: types.RelaxedJsonifiable + jsonObject?: types.RelaxedJsonifiable, + replacer: (number | string)[] | null = null, + space: string | number = 0 ): string { if (jsonObject === undefined) { return '' @@ -244,13 +253,13 @@ export function stringifyForModel( return jsonObject } - return JSON.stringify(jsonObject, null, 0) + return JSON.stringify(jsonObject, replacer, space) } const dedenter = dedent.withOptions({ escapeSpecialCharacters: true }) /** - * Clean a string by removing extra newlines and indentation. + * Cleans a string by removing extra newlines and indentation. * * @see: https://github.com/dmnd/dedent */ @@ -264,7 +273,7 @@ export function isAIFunction(obj: any): obj is types.AIFunction { if (!obj.inputSchema) return false if (!obj.parseInput) return false if (!obj.spec) return false - if (!obj.impl) return false + if (!obj.execute) return false if (!obj.spec.name || typeof obj.spec.name !== 'string') return false return true diff --git a/packages/dexter/src/dexter.ts b/packages/dexter/src/dexter.ts index 0429b49..5c37594 100644 --- a/packages/dexter/src/dexter.ts +++ b/packages/dexter/src/dexter.ts @@ -1,4 +1,4 @@ -import { type AIFunctionLike, AIFunctionSet } from '@agentic/core' +import { type AIFunctionLike, AIFunctionSet, isZodSchema } from '@agentic/core' import { createAIFunction } from '@dexaai/dexter' /** @@ -10,14 +10,20 @@ export function createDexterFunctions( ) { const fns = new AIFunctionSet(aiFunctionLikeTools) - return fns.map((fn) => - createAIFunction( + return fns.map((fn) => { + if (!isZodSchema(fn.inputSchema)) { + throw new Error( + `Dexter tools only support Zod schemas: ${fn.spec.name} tool uses a custom JSON Schema, which is currently not supported.` + ) + } + + return createAIFunction( { name: fn.spec.name, description: fn.spec.description, argsSchema: fn.inputSchema }, - fn.impl + fn.execute ) - ) + }) } diff --git a/packages/duck-duck-go/package.json b/packages/duck-duck-go/package.json new file mode 100644 index 0000000..82e2b7e --- /dev/null +++ b/packages/duck-duck-go/package.json @@ -0,0 +1,48 @@ +{ + "name": "@agentic/duck-duck-go", + "version": "7.5.3", + "description": "Agentic SDK for DuckDuckGo.", + "author": "Travis Fischer ", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/transitive-bullshit/agentic.git" + }, + "type": "module", + "source": "./src/index.ts", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "sideEffects": false, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "clean": "del dist", + "test": "run-s test:*", + "test:lint": "eslint .", + "test:typecheck": "tsc --noEmit" + }, + "dependencies": { + "@agentic/core": "workspace:*", + "duck-duck-scrape": "^2.2.7", + "string-strip-html": "^13.4.12" + }, + "peerDependencies": { + "zod": "catalog:" + }, + "devDependencies": { + "@agentic/tsconfig": "workspace:*" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/duck-duck-go/readme.md b/packages/duck-duck-go/readme.md new file mode 100644 index 0000000..38781f3 --- /dev/null +++ b/packages/duck-duck-go/readme.md @@ -0,0 +1,24 @@ +

+ + Agentic + +

+ +

+ AI agent stdlib that works with any LLM and TypeScript AI SDK. +

+ +

+ Build Status + NPM + MIT License + Prettier Code Formatting +

+ +# Agentic + +**See the [github repo](https://github.com/transitive-bullshit/agentic) or [docs](https://agentic.so) for more info.** + +## License + +MIT © [Travis Fischer](https://x.com/transitive_bs) diff --git a/packages/duck-duck-go/src/duck-duck-go-client.ts b/packages/duck-duck-go/src/duck-duck-go-client.ts new file mode 100644 index 0000000..0b79488 --- /dev/null +++ b/packages/duck-duck-go/src/duck-duck-go-client.ts @@ -0,0 +1,78 @@ +import { aiFunction, AIFunctionsProvider } from '@agentic/core' +import { SafeSearchType, search, type SearchOptions } from 'duck-duck-scrape' +import { z } from 'zod' + +import { paginate } from './paginate' + +export namespace duckduckgo { + export interface DuckDuckGoSearchToolOptions { + search?: SearchOptions + maxResults: number + } + + export interface DuckDuckGoSearchToolRunOptions { + search?: SearchOptions + } +} +/** + * DuckDuckGo search client. + * + * @see https://duckduckgo.com + */ +export class DuckDuckGoClient extends AIFunctionsProvider { + /** + * Searches the web using DuckDuckGo for a given query. + */ + @aiFunction({ + name: 'duck_duck_go_search', + description: 'Searches the web using DuckDuckGo for a given query.', + inputSchema: z.object({ + query: z.string({ description: 'Search query' }).min(1).max(128), + maxResults: z.number().min(1).max(100).optional() + }) + }) + async search( + queryOrOptions: + | string + | { query: string; maxResults?: number; search?: SearchOptions } + ) { + const options = + typeof queryOrOptions === 'string' + ? { query: queryOrOptions } + : queryOrOptions + + const results = await paginate({ + size: options.maxResults ?? 10, + handler: async ({ cursor = 0 }) => { + const { results: data, noResults: done } = await search( + options.query, + { + safeSearch: SafeSearchType.MODERATE, + ...options.search, + offset: cursor + }, + { + uri_modifier: (rawUrl: string) => { + const url = new URL(rawUrl) + url.searchParams.delete('ss_mkt') + return url.toString() + } + } + ) + + return { + data, + nextCursor: done ? undefined : cursor + data.length + } + } + }) + + const { stripHtml } = await import('string-strip-html') + + return results.map((result) => ({ + url: result.url, + title: stripHtml(result.title).result, + description: stripHtml(result.description).result + })) + } +} diff --git a/packages/duck-duck-go/src/index.ts b/packages/duck-duck-go/src/index.ts new file mode 100644 index 0000000..4340e47 --- /dev/null +++ b/packages/duck-duck-go/src/index.ts @@ -0,0 +1 @@ +export * from './duck-duck-go-client' diff --git a/packages/duck-duck-go/src/paginate.ts b/packages/duck-duck-go/src/paginate.ts new file mode 100644 index 0000000..51791e9 --- /dev/null +++ b/packages/duck-duck-go/src/paginate.ts @@ -0,0 +1,34 @@ +export interface PaginateInput { + size: number + handler: (data: { + cursor?: C + limit: number + }) => Promise<{ data: T[]; nextCursor?: C }> +} + +export async function paginate( + input: PaginateInput +): Promise { + const acc: T[] = [] + let cursor: C | undefined + + while (acc.length < input.size) { + const { data, nextCursor } = await input.handler({ + cursor, + limit: input.size - acc.length + }) + acc.push(...data) + + if (nextCursor === undefined || data.length === 0) { + break + } + + cursor = nextCursor + } + + if (acc.length > input.size) { + acc.length = input.size + } + + return acc +} diff --git a/packages/duck-duck-go/tsconfig.json b/packages/duck-duck-go/tsconfig.json new file mode 100644 index 0000000..6c8d720 --- /dev/null +++ b/packages/duck-duck-go/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@agentic/tsconfig/base.json", + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/genkit/src/genkit.ts b/packages/genkit/src/genkit.ts index 31e144c..e9d3fb9 100644 --- a/packages/genkit/src/genkit.ts +++ b/packages/genkit/src/genkit.ts @@ -1,5 +1,10 @@ import type { Genkit } from 'genkit' -import { type AIFunctionLike, AIFunctionSet } from '@agentic/core' +import { + type AIFunctionLike, + AIFunctionSet, + asZodOrJsonSchema, + isZodSchema +} from '@agentic/core' import { z } from 'zod' /** @@ -12,15 +17,19 @@ export function createGenkitTools( ) { const fns = new AIFunctionSet(aiFunctionLikeTools) - return fns.map((fn) => - genkit.defineTool( + return fns.map((fn) => { + const inputSchemaKey = isZodSchema(fn.inputSchema) + ? ('inputSchema' as const) + : ('inputJsonSchema' as const) + + return genkit.defineTool( { name: fn.spec.name, description: fn.spec.description, - inputSchema: fn.inputSchema, + [inputSchemaKey]: asZodOrJsonSchema(fn.inputSchema), outputSchema: z.any() }, - fn.impl + fn.execute ) - ) + }) } diff --git a/packages/langchain/src/langchain.ts b/packages/langchain/src/langchain.ts index 920ed76..3add090 100644 --- a/packages/langchain/src/langchain.ts +++ b/packages/langchain/src/langchain.ts @@ -1,6 +1,7 @@ import { type AIFunctionLike, AIFunctionSet, + asZodOrJsonSchema, stringifyForModel } from '@agentic/core' import { DynamicStructuredTool } from '@langchain/core/tools' @@ -17,9 +18,9 @@ export function createLangChainTools(...aiFunctionLikeTools: AIFunctionLike[]) { new DynamicStructuredTool({ name: fn.spec.name, description: fn.spec.description, - schema: fn.inputSchema, + schema: asZodOrJsonSchema(fn.inputSchema), func: async (input) => { - const result = await Promise.resolve(fn.impl(input)) + const result = await Promise.resolve(fn.execute(input)) // LangChain tools require the output to be a string return stringifyForModel(result) } diff --git a/packages/llamaindex/src/llamaindex.ts b/packages/llamaindex/src/llamaindex.ts index d2929b2..7c85068 100644 --- a/packages/llamaindex/src/llamaindex.ts +++ b/packages/llamaindex/src/llamaindex.ts @@ -1,4 +1,8 @@ -import { type AIFunctionLike, AIFunctionSet } from '@agentic/core' +import { + type AIFunctionLike, + AIFunctionSet, + asZodOrJsonSchema +} from '@agentic/core' import { FunctionTool } from 'llamaindex' /** @@ -11,10 +15,11 @@ export function createLlamaIndexTools( const fns = new AIFunctionSet(aiFunctionLikeTools) return fns.map((fn) => - FunctionTool.from(fn.impl, { + FunctionTool.from(fn.execute, { name: fn.spec.name, description: fn.spec.description, - parameters: fn.spec.parameters as any + // TODO: Investigate types here + parameters: asZodOrJsonSchema(fn.inputSchema) as any }) ) } diff --git a/packages/mastra/src/mastra.ts b/packages/mastra/src/mastra.ts index adf8892..9de752d 100644 --- a/packages/mastra/src/mastra.ts +++ b/packages/mastra/src/mastra.ts @@ -1,4 +1,4 @@ -import { type AIFunctionLike, AIFunctionSet } from '@agentic/core' +import { type AIFunctionLike, AIFunctionSet, isZodSchema } from '@agentic/core' import { createTool } from '@mastra/core/tools' /** @@ -9,14 +9,22 @@ export function createMastraTools(...aiFunctionLikeTools: AIFunctionLike[]) { const fns = new AIFunctionSet(aiFunctionLikeTools) return Object.fromEntries( - fns.map((fn) => [ - fn.spec.name, - createTool({ - id: fn.spec.name, - description: fn.spec.description, - inputSchema: fn.inputSchema, - execute: (ctx) => fn.impl(ctx.context) - }) - ]) + fns.map((fn) => { + if (!isZodSchema(fn.inputSchema)) { + throw new Error( + `Mastra tools only support Zod schemas: ${fn.spec.name} tool uses a custom JSON Schema, which is currently not supported.` + ) + } + + return [ + fn.spec.name, + createTool({ + id: fn.spec.name, + description: fn.spec.description, + inputSchema: fn.inputSchema, + execute: (ctx) => fn.execute(ctx.context) + }) + ] + }) ) } diff --git a/packages/mcp/package.json b/packages/mcp/package.json new file mode 100644 index 0000000..3832311 --- /dev/null +++ b/packages/mcp/package.json @@ -0,0 +1,46 @@ +{ + "name": "@agentic/mcp", + "version": "0.1.0", + "description": "Agentic SDK wrapping an MCP client.", + "author": "Travis Fischer ", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/transitive-bullshit/agentic.git" + }, + "type": "module", + "source": "./src/index.ts", + "types": "./dist/index.d.ts", + "sideEffects": false, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "clean": "del dist", + "test": "run-s test:*", + "test:lint": "eslint .", + "test:typecheck": "tsc --noEmit" + }, + "dependencies": { + "@agentic/core": "workspace:*", + "@modelcontextprotocol/sdk": "catalog:" + }, + "peerDependencies": { + "zod": "catalog:" + }, + "devDependencies": { + "@agentic/tsconfig": "workspace:*" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/mcp/readme.md b/packages/mcp/readme.md new file mode 100644 index 0000000..38781f3 --- /dev/null +++ b/packages/mcp/readme.md @@ -0,0 +1,24 @@ +

+ + Agentic + +

+ +

+ AI agent stdlib that works with any LLM and TypeScript AI SDK. +

+ +

+ Build Status + NPM + MIT License + Prettier Code Formatting +

+ +# Agentic + +**See the [github repo](https://github.com/transitive-bullshit/agentic) or [docs](https://agentic.so) for more info.** + +## License + +MIT © [Travis Fischer](https://x.com/transitive_bs) diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts new file mode 100644 index 0000000..dcba8e4 --- /dev/null +++ b/packages/mcp/src/index.ts @@ -0,0 +1,2 @@ +export * from './mcp-tools' +export type * from './types' diff --git a/packages/mcp/src/mcp-tools.ts b/packages/mcp/src/mcp-tools.ts new file mode 100644 index 0000000..0648fbf --- /dev/null +++ b/packages/mcp/src/mcp-tools.ts @@ -0,0 +1,216 @@ +import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js' +import type { + CallToolResult, + ListToolsResult +} from '@modelcontextprotocol/sdk/types.js' +import { + AIFunctionSet, + AIFunctionsProvider, + assert, + createAIFunction, + createJsonSchema +} from '@agentic/core' +import { Client as McpClient } from '@modelcontextprotocol/sdk/client/index.js' +import { type z } from 'zod' + +import type { McpClientOptions, McpToolsFilter } from './types' +import { paginate } from './paginate' + +/** + * Agentic tools provider wrapping an MCP client. + * + * You likely want to use `createMcpTools` to create an instance of `McpTools` + * which enables exposing MCP server tools to the agentic ecosystem. + * + * @see https://modelcontextprotocol.io + */ +export class McpTools extends AIFunctionsProvider { + readonly name: string + readonly client: McpClient + readonly rawToolResponses: boolean + + protected _toolsMap: Map | undefined + protected readonly _toolsFilter: McpToolsFilter | undefined + + protected constructor({ + name, + client, + toolsFilter, + rawToolResponses = false + }: { + client: McpClient + } & McpClientOptions) { + super() + + this.name = name + this.client = client + this.rawToolResponses = rawToolResponses + + this._toolsFilter = toolsFilter + } + + override get functions(): AIFunctionSet { + assert(this._functions) + return this._functions + } + + /** + * Initialize the McpTools instance by fetching all available tools from the MCP client. + * This method must be called before using this class' tools. + * It is called automatically when using `McpTools.from()`. + */ + protected async _init() { + const capabilties = this.client.getServerCapabilities() + const initPromises: Promise[] = [] + + if (capabilties?.tools) { + initPromises.push(this._initTools()) + } + + // TODO: handle prompts, resources, etc. + await Promise.all(initPromises) + } + + protected async _initTools() { + const tools = await paginate({ + size: Infinity, + handler: async ({ cursor }: { cursor?: string }) => { + const { tools, nextCursor } = await this.client.listTools({ cursor }) + return { data: tools, nextCursor } as const + } + }) + + const enabledTools = this._toolsFilter + ? tools.filter((tool) => this._toolsFilter!(tool.name)) + : tools + + this._toolsMap = new Map(enabledTools.map((tool) => [tool.name, tool])) + this._updateFunctions() + } + + protected _updateFunctions() { + assert(this._toolsMap) + + this._functions = new AIFunctionSet( + Array.from(this._toolsMap.entries()).map(([_name, tool]) => { + return createAIFunction( + { + name: `${this.name}_${tool.name}`, + description: tool.description, + inputSchema: createJsonSchema(tool.inputSchema), + strict: true + }, + async (args) => { + const result = await this.client.callTool({ + name: tool.name, + arguments: args + }) + + if (this.rawToolResponses) { + return result + } + + return processToolCallResult(result as CallToolResult) + } + ) + }) + ) + } + + async callTool(name: string, args: z.infer>) { + const tool = + this._toolsMap?.get(name) ?? this._toolsMap?.get(`${this.name}_${name}`) + assert(tool, `Tool ${name} not found`) + + const result = await this.client.callTool({ name, arguments: args }) + return result + } + + /** + * Creates a new McpTools instance from an existing, fully initialized + * MCP client. + * + * You probably want to use `createMcpTool` instead, which makes initializing + * the MCP client and connecting to its transport easier. + * + * All tools within the `McpTools` instance will be namespaced under the given + * `name`. + */ + static async fromMcpClient(params: { client: McpClient } & McpClientOptions) { + const mcpTools = new McpTools(params) + await mcpTools._init() + return mcpTools + } +} + +/** + * Creates a new McpTools instance by connecting to an MCP server. You must + * provide either an existing `transport`, an existing `serverUrl`, or a + * `serverProcess` to spawn. + * + * All tools within the `McpTools` instance will be namespaced under the given + * `name`. + */ +export async function createMcpTools( + params: McpClientOptions +): Promise { + const transport = await createMcpTransport(params) + const client = new McpClient( + { name: params.name, version: params.version || '1.0.0' }, + { capabilities: {} } + ) + await client.connect(transport) + + return McpTools.fromMcpClient({ client, ...params }) +} + +/** + * Creates a new MCP transport from either an existing `transport`, an existing + * `serverUrl`, or a `serverProcess` to spawn. + */ +export async function createMcpTransport( + params: McpClientOptions +): Promise { + if (params.transport) return params.transport + + if (params.serverUrl) { + const { SSEClientTransport } = await import( + '@modelcontextprotocol/sdk/client/sse.js' + ) + return new SSEClientTransport(new URL(params.serverUrl)) + } + + if (params.serverProcess) { + const { StdioClientTransport } = await import( + '@modelcontextprotocol/sdk/client/stdio.js' + ) + return new StdioClientTransport(params.serverProcess) + } + + throw new Error( + 'Unable to create a server connection with supplied options. Must provide transport, stdio, or sseUrl.' + ) +} + +function toText(c: CallToolResult['content']) { + return c.map((p) => p.text || '').join('') +} + +function processToolCallResult(result: CallToolResult) { + if (result.isError) return { error: toText(result.content) } + + if (result.content.every((c) => !!c.text)) { + const text = toText(result.content) + if (text.trim().startsWith('{') || text.trim().startsWith('[')) { + try { + return JSON.parse(text) + } catch { + return text + } + } + return text + } + + if (result.content.length === 1) return result.content[0] + return result +} diff --git a/packages/mcp/src/paginate.ts b/packages/mcp/src/paginate.ts new file mode 100644 index 0000000..51791e9 --- /dev/null +++ b/packages/mcp/src/paginate.ts @@ -0,0 +1,34 @@ +export interface PaginateInput { + size: number + handler: (data: { + cursor?: C + limit: number + }) => Promise<{ data: T[]; nextCursor?: C }> +} + +export async function paginate( + input: PaginateInput +): Promise { + const acc: T[] = [] + let cursor: C | undefined + + while (acc.length < input.size) { + const { data, nextCursor } = await input.handler({ + cursor, + limit: input.size - acc.length + }) + acc.push(...data) + + if (nextCursor === undefined || data.length === 0) { + break + } + + cursor = nextCursor + } + + if (acc.length > input.size) { + acc.length = input.size + } + + return acc +} diff --git a/packages/mcp/src/types.ts b/packages/mcp/src/types.ts new file mode 100644 index 0000000..2ae2694 --- /dev/null +++ b/packages/mcp/src/types.ts @@ -0,0 +1,53 @@ +import type { StdioServerParameters } from '@modelcontextprotocol/sdk/client/stdio.js' +import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js' + +export type McpToolsFilter = (toolName: string) => boolean + +export interface McpClientOptions { + /** + * Provide a name for this client which will be its namespace for all tools and prompts. + */ + name: string + + /** + * Provide a version number for this client (defaults to 1.0.0). + */ + version?: string + + /** + * If you already have an MCP transport you'd like to use, pass it here to connect to the server. + */ + transport?: Transport + + /** + * Start a local server process using the stdio MCP transport. + */ + serverProcess?: StdioServerParameters + + /** + * Connect to a remote server process using the SSE MCP transport. + */ + serverUrl?: string + + /** + * Return tool responses in raw MCP form instead of processing them for Genkit compatibility. + */ + rawToolResponses?: boolean + + /** + * An optional filter function to determine which tools should be enabled. + * + * By default, all tools available on the MCP server will be enabled, but you + * can use this to filter a subset of those tools. + */ + toolsFilter?: McpToolsFilter +} + +// TODO +// export interface McpServerOptions { +// /** The name you want to give your server for MCP inspection. */ +// name: string +// +// /** The version you want the server to advertise to clients. Defaults to 1.0.0. */ +// version?: string +// } diff --git a/packages/mcp/tsconfig.json b/packages/mcp/tsconfig.json new file mode 100644 index 0000000..6c8d720 --- /dev/null +++ b/packages/mcp/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@agentic/tsconfig/base.json", + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/openapi-to-ts/bin/openapi-to-ts.ts b/packages/openapi-to-ts/bin/openapi-to-ts.ts new file mode 100644 index 0000000..c76063b --- /dev/null +++ b/packages/openapi-to-ts/bin/openapi-to-ts.ts @@ -0,0 +1,72 @@ +import { cli } from 'cleye' +import { gracefulExit } from 'exit-hook' + +import { generateTSFromOpenAPI } from '../src' + +async function main() { + const args = cli( + { + name: 'openapi-to-ts', + parameters: [''], + flags: { + debug: { + type: Boolean, + description: 'Enables verbose debug logging', + alias: 'v', + default: false + }, + outputDir: { + type: String, + description: 'Path to the output directory (defaults to cwd)', + alias: 'o' + }, + dryRun: { + type: Boolean, + description: 'Disables all side effects', + default: false + }, + noPrettier: { + type: Boolean, + description: 'Disables prettier formatting', + default: false + }, + noEslint: { + type: Boolean, + description: 'Disables eslint formatting', + default: false + } + } + }, + () => {}, + process.argv + ) + + const openapiFilePath = args._[2]! + + if (!openapiFilePath) { + console.error('Missing required argument: \n') + args.showHelp() + gracefulExit(1) + return + } + + const output = await generateTSFromOpenAPI({ + openapiFilePath, + outputDir: args.flags.outputDir || process.cwd(), + dryRun: args.flags.dryRun, + prettier: !args.flags.noPrettier, + eslint: !args.flags.noEslint + }) + + if (args.flags.dryRun) { + console.log(output) + } +} + +try { + await main() + gracefulExit(0) +} catch (err) { + console.error(err) + gracefulExit(1) +} diff --git a/packages/openapi-to-ts/fixtures/generated/firecrawl-client.ts b/packages/openapi-to-ts/fixtures/generated/firecrawl-client.ts new file mode 100644 index 0000000..32ae615 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/generated/firecrawl-client.ts @@ -0,0 +1,619 @@ +/* eslint-disable unicorn/no-unreadable-iife */ +/* eslint-disable unicorn/no-array-reduce */ + +/** + * This file was auto-generated from an OpenAPI spec. + */ + +import { aiFunction, AIFunctionsProvider, assert, getEnv } from '@agentic/core' +import defaultKy, { type KyInstance } from 'ky' +import { z } from 'zod' + +export namespace firecrawl { + export const apiBaseUrl = 'https://api.firecrawl.dev/v0' + + // ----------------------------------------------------------------------------- + // Component schemas + // ----------------------------------------------------------------------------- + + export const ScrapeResponseSchema = z.object({ + success: z.boolean().optional(), + /** Warning message to let you know of any issues. */ + warning: z + .string() + .nullable() + .describe('Warning message to let you know of any issues.') + .optional(), + data: z + .object({ + /** Markdown content of the page if the `markdown` format was specified (default) */ + markdown: z + .string() + .nullable() + .describe( + 'Markdown content of the page if the `markdown` format was specified (default)' + ) + .optional(), + /** HTML version of the content on page if the `html` format was specified */ + html: z + .string() + .nullable() + .describe( + 'HTML version of the content on page if the `html` format was specified' + ) + .optional(), + /** Raw HTML content of the page if the `rawHtml` format was specified */ + rawHtml: z + .string() + .nullable() + .describe( + 'Raw HTML content of the page if the `rawHtml` format was specified' + ) + .optional(), + /** Links on the page if the `links` format was specified */ + links: z + .array(z.string().url()) + .nullable() + .describe('Links on the page if the `links` format was specified') + .optional(), + /** URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified */ + screenshot: z + .string() + .nullable() + .describe( + 'URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified' + ) + .optional(), + metadata: z + .object({ + title: z.string().optional(), + description: z.string().optional(), + language: z.string().nullable().optional(), + sourceURL: z.string().url().optional(), + ' ': z.string().optional(), + /** The status code of the page */ + statusCode: z + .number() + .int() + .describe('The status code of the page') + .optional(), + /** The error message of the page */ + error: z + .string() + .nullable() + .describe('The error message of the page') + .optional() + }) + .optional() + }) + .optional() + }) + export type ScrapeResponse = z.infer + + export const CrawlResponseSchema = z.object({ + success: z.boolean().optional(), + id: z.string().optional(), + url: z.string().url().optional() + }) + export type CrawlResponse = z.infer + + export const SearchResponseSchema = z.object({ + success: z.boolean().optional(), + data: z.array(z.any()).optional() + }) + export type SearchResponse = z.infer + + export const CrawlStatusResponseObjSchema = z.object({ + /** Markdown content of the page if the `markdown` format was specified (default) */ + markdown: z + .string() + .nullable() + .describe( + 'Markdown content of the page if the `markdown` format was specified (default)' + ) + .optional(), + /** HTML version of the content on page if the `html` format was specified */ + html: z + .string() + .nullable() + .describe( + 'HTML version of the content on page if the `html` format was specified' + ) + .optional(), + /** Raw HTML content of the page if the `rawHtml` format was specified */ + rawHtml: z + .string() + .nullable() + .describe( + 'Raw HTML content of the page if the `rawHtml` format was specified' + ) + .optional(), + /** Links on the page if the `links` format was specified */ + links: z + .array(z.string().url()) + .nullable() + .describe('Links on the page if the `links` format was specified') + .optional(), + /** URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified */ + screenshot: z + .string() + .nullable() + .describe( + 'URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified' + ) + .optional(), + metadata: z + .object({ + title: z.string().optional(), + description: z.string().optional(), + language: z.string().nullable().optional(), + sourceURL: z.string().url().optional(), + ' ': z.string().optional(), + /** The status code of the page */ + statusCode: z + .number() + .int() + .describe('The status code of the page') + .optional(), + /** The error message of the page */ + error: z + .string() + .nullable() + .describe('The error message of the page') + .optional() + }) + .optional() + }) + export type CrawlStatusResponseObj = z.infer< + typeof CrawlStatusResponseObjSchema + > + + // ----------------------------------------------------------------------------- + // Operation schemas + // ----------------------------------------------------------------------------- + + export const ScrapeParamsSchema = z.object({ + /** The URL to scrape */ + url: z.string().url().describe('The URL to scrape'), + /** + * Specific formats to return. + * + * - markdown: The page in Markdown format. + * - html: The page's HTML, trimmed to include only meaningful content. + * - rawHtml: The page's original HTML. + * - links: The links on the page. + * - screenshot: A screenshot of the top of the page. + * - screenshot@fullPage: A screenshot of the full page. (overridden by screenshot if present) + */ + formats: z + .array( + z.enum([ + 'markdown', + 'html', + 'rawHtml', + 'links', + 'screenshot', + 'screenshot@fullPage' + ]) + ) + .describe( + "Specific formats to return.\n\n - markdown: The page in Markdown format.\n - html: The page's HTML, trimmed to include only meaningful content.\n - rawHtml: The page's original HTML.\n - links: The links on the page.\n - screenshot: A screenshot of the top of the page.\n - screenshot@fullPage: A screenshot of the full page. (overridden by screenshot if present)" + ) + .default(['markdown']), + /** Headers to send with the request. Can be used to send cookies, user-agent, etc. */ + headers: z + .record(z.any()) + .describe( + 'Headers to send with the request. Can be used to send cookies, user-agent, etc.' + ) + .optional(), + /** Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: 'script, .ad, #footer' */ + includeTags: z + .array(z.string()) + .describe( + "Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: 'script, .ad, #footer'" + ) + .optional(), + /** Tags, classes and ids to remove from the page. Use comma separated values. Example: 'script, .ad, #footer' */ + excludeTags: z + .array(z.string()) + .describe( + "Tags, classes and ids to remove from the page. Use comma separated values. Example: 'script, .ad, #footer'" + ) + .optional(), + /** Only return the main content of the page excluding headers, navs, footers, etc. */ + onlyMainContent: z + .boolean() + .describe( + 'Only return the main content of the page excluding headers, navs, footers, etc.' + ) + .default(true), + /** Timeout in milliseconds for the request */ + timeout: z + .number() + .int() + .describe('Timeout in milliseconds for the request') + .default(30_000), + /** Wait x amount of milliseconds for the page to load to fetch content */ + waitFor: z + .number() + .int() + .describe( + 'Wait x amount of milliseconds for the page to load to fetch content' + ) + .default(0) + }) + export type ScrapeParams = z.infer + + export const CrawlUrlsParamsSchema = z.object({ + /** The base URL to start crawling from */ + url: z.string().url().describe('The base URL to start crawling from'), + crawlerOptions: z + .object({ + /** URL patterns to include */ + includes: z + .array(z.string()) + .describe('URL patterns to include') + .optional(), + /** URL patterns to exclude */ + excludes: z + .array(z.string()) + .describe('URL patterns to exclude') + .optional(), + /** Generate alt text for images using LLMs (must have a paid plan) */ + generateImgAltText: z + .boolean() + .describe( + 'Generate alt text for images using LLMs (must have a paid plan)' + ) + .default(false), + /** If true, returns only the URLs as a list on the crawl status. Attention: the return response will be a list of URLs inside the data, not a list of documents. */ + returnOnlyUrls: z + .boolean() + .describe( + 'If true, returns only the URLs as a list on the crawl status. Attention: the return response will be a list of URLs inside the data, not a list of documents.' + ) + .default(false), + /** Maximum depth to crawl relative to the entered URL. A maxDepth of 0 scrapes only the entered URL. A maxDepth of 1 scrapes the entered URL and all pages one level deep. A maxDepth of 2 scrapes the entered URL and all pages up to two levels deep. Higher values follow the same pattern. */ + maxDepth: z + .number() + .int() + .describe( + 'Maximum depth to crawl relative to the entered URL. A maxDepth of 0 scrapes only the entered URL. A maxDepth of 1 scrapes the entered URL and all pages one level deep. A maxDepth of 2 scrapes the entered URL and all pages up to two levels deep. Higher values follow the same pattern.' + ) + .optional(), + /** The crawling mode to use. Fast mode crawls 4x faster websites without sitemap, but may not be as accurate and shouldn't be used in heavy js-rendered websites. */ + mode: z + .enum(['default', 'fast']) + .describe( + "The crawling mode to use. Fast mode crawls 4x faster websites without sitemap, but may not be as accurate and shouldn't be used in heavy js-rendered websites." + ) + .default('default'), + /** Ignore the website sitemap when crawling */ + ignoreSitemap: z + .boolean() + .describe('Ignore the website sitemap when crawling') + .default(false), + /** Maximum number of pages to crawl */ + limit: z + .number() + .int() + .describe('Maximum number of pages to crawl') + .default(10_000), + /** Enables the crawler to navigate from a specific URL to previously linked pages. For instance, from 'example.com/product/123' back to 'example.com/product' */ + allowBackwardCrawling: z + .boolean() + .describe( + "Enables the crawler to navigate from a specific URL to previously linked pages. For instance, from 'example.com/product/123' back to 'example.com/product'" + ) + .default(false), + /** Allows the crawler to follow links to external websites. */ + allowExternalContentLinks: z + .boolean() + .describe('Allows the crawler to follow links to external websites.') + .default(false) + }) + .optional(), + pageOptions: z + .object({ + /** Headers to send with the request. Can be used to send cookies, user-agent, etc. */ + headers: z + .record(z.any()) + .describe( + 'Headers to send with the request. Can be used to send cookies, user-agent, etc.' + ) + .optional(), + /** Include the HTML version of the content on page. Will output a html key in the response. */ + includeHtml: z + .boolean() + .describe( + 'Include the HTML version of the content on page. Will output a html key in the response.' + ) + .default(false), + /** Include the raw HTML content of the page. Will output a rawHtml key in the response. */ + includeRawHtml: z + .boolean() + .describe( + 'Include the raw HTML content of the page. Will output a rawHtml key in the response.' + ) + .default(false), + /** Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: 'script, .ad, #footer' */ + onlyIncludeTags: z + .array(z.string()) + .describe( + "Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: 'script, .ad, #footer'" + ) + .optional(), + /** Only return the main content of the page excluding headers, navs, footers, etc. */ + onlyMainContent: z + .boolean() + .describe( + 'Only return the main content of the page excluding headers, navs, footers, etc.' + ) + .default(false), + /** Tags, classes and ids to remove from the page. Use comma separated values. Example: 'script, .ad, #footer' */ + removeTags: z + .array(z.string()) + .describe( + "Tags, classes and ids to remove from the page. Use comma separated values. Example: 'script, .ad, #footer'" + ) + .optional(), + /** Replace all relative paths with absolute paths for images and links */ + replaceAllPathsWithAbsolutePaths: z + .boolean() + .describe( + 'Replace all relative paths with absolute paths for images and links' + ) + .default(false), + /** Include a screenshot of the top of the page that you are scraping. */ + screenshot: z + .boolean() + .describe( + 'Include a screenshot of the top of the page that you are scraping.' + ) + .default(false), + /** Include a full page screenshot of the page that you are scraping. */ + fullPageScreenshot: z + .boolean() + .describe( + 'Include a full page screenshot of the page that you are scraping.' + ) + .default(false), + /** Wait x amount of milliseconds for the page to load to fetch content */ + waitFor: z + .number() + .int() + .describe( + 'Wait x amount of milliseconds for the page to load to fetch content' + ) + .default(0) + }) + .optional() + }) + export type CrawlUrlsParams = z.infer + + export const CrawlUrlsResponseSchema = CrawlResponseSchema + export type CrawlUrlsResponse = z.infer + + export const SearchGoogleParamsSchema = z.object({ + /** The query to search for */ + query: z.string().url().describe('The query to search for'), + pageOptions: z + .object({ + /** Only return the main content of the page excluding headers, navs, footers, etc. */ + onlyMainContent: z + .boolean() + .describe( + 'Only return the main content of the page excluding headers, navs, footers, etc.' + ) + .default(false), + /** Fetch the content of each page. If false, defaults to a basic fast serp API. */ + fetchPageContent: z + .boolean() + .describe( + 'Fetch the content of each page. If false, defaults to a basic fast serp API.' + ) + .default(true), + /** Include the HTML version of the content on page. Will output a html key in the response. */ + includeHtml: z + .boolean() + .describe( + 'Include the HTML version of the content on page. Will output a html key in the response.' + ) + .default(false), + /** Include the raw HTML content of the page. Will output a rawHtml key in the response. */ + includeRawHtml: z + .boolean() + .describe( + 'Include the raw HTML content of the page. Will output a rawHtml key in the response.' + ) + .default(false) + }) + .optional(), + searchOptions: z + .object({ + /** Maximum number of results. Max is 20 during beta. */ + limit: z + .number() + .int() + .describe('Maximum number of results. Max is 20 during beta.') + .optional() + }) + .optional() + }) + export type SearchGoogleParams = z.infer + + export const SearchGoogleResponseSchema = SearchResponseSchema + export type SearchGoogleResponse = z.infer + + export const GetCrawlStatusParamsSchema = z.object({ + /** ID of the crawl job */ + jobId: z.string().describe('ID of the crawl job') + }) + export type GetCrawlStatusParams = z.infer + + export const GetCrawlStatusResponseSchema = z.object({ + /** Status of the job (completed, active, failed, paused) */ + status: z + .string() + .describe('Status of the job (completed, active, failed, paused)') + .optional(), + /** Current page number */ + current: z.number().int().describe('Current page number').optional(), + /** Total number of pages */ + total: z.number().int().describe('Total number of pages').optional(), + /** Data returned from the job (null when it is in progress) */ + data: z + .array(CrawlStatusResponseObjSchema) + .describe('Data returned from the job (null when it is in progress)') + .optional(), + /** Partial documents returned as it is being crawled (streaming). **This feature is currently in alpha - expect breaking changes** When a page is ready, it will append to the partial_data array, so there is no need to wait for the entire website to be crawled. When the crawl is done, partial_data will become empty and the result will be available in `data`. There is a max of 50 items in the array response. The oldest item (top of the array) will be removed when the new item is added to the array. */ + partial_data: z + .array(CrawlStatusResponseObjSchema) + .describe( + 'Partial documents returned as it is being crawled (streaming). **This feature is currently in alpha - expect breaking changes** When a page is ready, it will append to the partial_data array, so there is no need to wait for the entire website to be crawled. When the crawl is done, partial_data will become empty and the result will be available in `data`. There is a max of 50 items in the array response. The oldest item (top of the array) will be removed when the new item is added to the array.' + ) + .optional() + }) + export type GetCrawlStatusResponse = z.infer< + typeof GetCrawlStatusResponseSchema + > + + export const CancelCrawlJobParamsSchema = z.object({ + /** ID of the crawl job */ + jobId: z.string().describe('ID of the crawl job') + }) + export type CancelCrawlJobParams = z.infer + + export const CancelCrawlJobResponseSchema = z.object({ + /** Returns cancelled. */ + status: z.string().describe('Returns cancelled.').optional() + }) + export type CancelCrawlJobResponse = z.infer< + typeof CancelCrawlJobResponseSchema + > +} + +/** + * Agentic Firecrawl client. + * + * API for interacting with Firecrawl services to perform web scraping and crawling tasks. + */ +export class FirecrawlClient extends AIFunctionsProvider { + protected readonly ky: KyInstance + protected readonly apiKey: string + protected readonly apiBaseUrl: string + + constructor({ + apiKey = getEnv('FIRECRAWL_API_KEY'), + apiBaseUrl = firecrawl.apiBaseUrl, + ky = defaultKy + }: { + apiKey?: string + apiBaseUrl?: string + ky?: KyInstance + } = {}) { + assert( + apiKey, + 'FirecrawlClient missing required "apiKey" (defaults to "FIRECRAWL_API_KEY")' + ) + super() + + this.apiKey = apiKey + this.apiBaseUrl = apiBaseUrl + + this.ky = ky.extend({ + prefixUrl: apiBaseUrl, + headers: { + Authorization: apiKey + } + }) + } + + /** + * Scrape a single URL. + */ + @aiFunction({ + name: 'scrape', + description: 'Scrape a single URL.', + inputSchema: firecrawl.ScrapeParamsSchema + }) + async scrape( + params: firecrawl.ScrapeParams + ): Promise { + return this.ky + .post('/scrape', { + json: params + }) + .json() + } + + /** + * Crawl multiple URLs based on options. + */ + @aiFunction({ + name: 'crawl_urls', + description: 'Crawl multiple URLs based on options.', + inputSchema: firecrawl.CrawlUrlsParamsSchema + }) + async crawlUrls( + params: firecrawl.CrawlUrlsParams + ): Promise { + return this.ky + .post('/crawl', { + json: params + }) + .json() + } + + /** + * Search for a keyword in Google, returns top page results with markdown content for each page. + */ + @aiFunction({ + name: 'search_google', + description: + 'Search for a keyword in Google, returns top page results with markdown content for each page.', + inputSchema: firecrawl.SearchGoogleParamsSchema + }) + async searchGoogle( + params: firecrawl.SearchGoogleParams + ): Promise { + return this.ky + .post('/search', { + json: params + }) + .json() + } + + /** + * Get the status of a crawl job. + */ + @aiFunction({ + name: 'get_crawl_status', + description: 'Get the status of a crawl job.', + inputSchema: firecrawl.GetCrawlStatusParamsSchema + }) + async getCrawlStatus( + params: firecrawl.GetCrawlStatusParams + ): Promise { + return this.ky + .get(`/crawl/status/${params.jobId}`) + .json() + } + + /** + * Cancel a crawl job. + */ + @aiFunction({ + name: 'cancel_crawl_job', + description: 'Cancel a crawl job.', + inputSchema: firecrawl.CancelCrawlJobParamsSchema + }) + async cancelCrawlJob( + params: firecrawl.CancelCrawlJobParams + ): Promise { + return this.ky + .delete(`/crawl/cancel/${params.jobId}`) + .json() + } +} diff --git a/packages/openapi-to-ts/fixtures/generated/notion-client.ts b/packages/openapi-to-ts/fixtures/generated/notion-client.ts new file mode 100644 index 0000000..0d47592 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/generated/notion-client.ts @@ -0,0 +1,1912 @@ +/* eslint-disable unicorn/no-unreadable-iife */ +/* eslint-disable unicorn/no-array-reduce */ + +/** + * This file was auto-generated from an OpenAPI spec. + */ + +import { + aiFunction, + AIFunctionsProvider, + assert, + getEnv, + pick, + sanitizeSearchParams +} from '@agentic/core' +import defaultKy, { type KyInstance } from 'ky' +import { z } from 'zod' + +export namespace notion { + export const apiBaseUrl = 'https://api.notion.so' + + // ----------------------------------------------------------------------------- + // Component schemas + // ----------------------------------------------------------------------------- + + export const UserObjectResponseSchema = z.object({ + object: z.literal('user'), + id: z.string(), + type: z.enum(['person', 'bot']), + name: z.string(), + avatar_url: z.string() + }) + export type UserObjectResponse = z.infer + + export const AnnotationRequestSchema = z.object({ + bold: z.boolean().optional(), + italic: z.boolean().optional(), + strikethrough: z.boolean().optional(), + underline: z.boolean().optional(), + code: z.boolean().optional(), + color: z + .enum([ + 'default', + 'gray', + 'brown', + 'orange', + 'yellow', + 'green', + 'blue', + 'purple', + 'pink', + 'red', + 'gray_background', + 'brown_background', + 'orange_background', + 'yellow_background', + 'green_background', + 'blue_background', + 'purple_background', + 'pink_background', + 'red_background' + ]) + .optional() + }) + export type AnnotationRequest = z.infer + + export const DateRequestSchema = z.object({ + start: z.string(), + end: z.union([z.string(), z.null()]).optional(), + time_zone: z.union([z.string(), z.null()]).optional() + }) + export type DateRequest = z.infer + + export const PageObjectResponseSchema = z.object({ + object: z.literal('page'), + id: z.string(), + created_time: z.string(), + last_edited_time: z.string(), + archived: z.boolean(), + url: z.string() + }) + export type PageObjectResponse = z.infer + + export const PartialPageObjectResponseSchema = z.object({ + object: z.literal('page'), + id: z.string() + }) + export type PartialPageObjectResponse = z.infer< + typeof PartialPageObjectResponseSchema + > + + export const PropertyItemObjectResponseSchema = z.object({ + type: z.string(), + id: z.string() + }) + export type PropertyItemObjectResponse = z.infer< + typeof PropertyItemObjectResponseSchema + > + + export const PartialBlockObjectResponseSchema = z.object({ + object: z.literal('block'), + id: z.string() + }) + export type PartialBlockObjectResponse = z.infer< + typeof PartialBlockObjectResponseSchema + > + + export const BlockObjectResponseSchema = z.object({ + object: z.literal('block'), + id: z.string(), + type: z.string(), + created_time: z.string(), + last_edited_time: z.string(), + has_children: z.boolean(), + archived: z.boolean() + }) + export type BlockObjectResponse = z.infer + + export const TitlePropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('title'), + title: z.record(z.any()) + }) + export type TitlePropertyResponse = z.infer< + typeof TitlePropertyResponseSchema + > + + export const RichTextPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('rich_text'), + rich_text: z.record(z.any()) + }) + export type RichTextPropertyResponse = z.infer< + typeof RichTextPropertyResponseSchema + > + + export const NumberPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('number'), + number: z.object({ format: z.string() }) + }) + export type NumberPropertyResponse = z.infer< + typeof NumberPropertyResponseSchema + > + + export const SelectOptionSchema = z.object({ + id: z.string(), + name: z.string(), + color: z.string() + }) + export type SelectOption = z.infer + + export const DatePropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('date'), + date: z.record(z.any()) + }) + export type DatePropertyResponse = z.infer + + export const PeoplePropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('people'), + people: z.record(z.any()) + }) + export type PeoplePropertyResponse = z.infer< + typeof PeoplePropertyResponseSchema + > + + export const FilePropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('files'), + files: z.record(z.any()) + }) + export type FilePropertyResponse = z.infer + + export const CheckboxPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('checkbox'), + checkbox: z.record(z.any()) + }) + export type CheckboxPropertyResponse = z.infer< + typeof CheckboxPropertyResponseSchema + > + + export const UrlPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('url'), + url: z.record(z.any()) + }) + export type UrlPropertyResponse = z.infer + + export const EmailPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('email'), + email: z.record(z.any()) + }) + export type EmailPropertyResponse = z.infer< + typeof EmailPropertyResponseSchema + > + + export const PhoneNumberPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('phone_number'), + phone_number: z.record(z.any()) + }) + export type PhoneNumberPropertyResponse = z.infer< + typeof PhoneNumberPropertyResponseSchema + > + + export const FormulaPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('formula'), + formula: z.object({ expression: z.string() }) + }) + export type FormulaPropertyResponse = z.infer< + typeof FormulaPropertyResponseSchema + > + + export const RelationPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('relation'), + relation: z.object({ + database_id: z.string(), + synced_property_name: z.string(), + synced_property_id: z.string() + }) + }) + export type RelationPropertyResponse = z.infer< + typeof RelationPropertyResponseSchema + > + + export const RollupPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('rollup'), + rollup: z.object({ + relation_property_name: z.string(), + relation_property_id: z.string(), + rollup_property_name: z.string(), + rollup_property_id: z.string(), + function: z.string() + }) + }) + export type RollupPropertyResponse = z.infer< + typeof RollupPropertyResponseSchema + > + + export const CreatedTimePropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('created_time'), + created_time: z.record(z.any()) + }) + export type CreatedTimePropertyResponse = z.infer< + typeof CreatedTimePropertyResponseSchema + > + + export const CreatedByPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('created_by'), + created_by: z.record(z.any()) + }) + export type CreatedByPropertyResponse = z.infer< + typeof CreatedByPropertyResponseSchema + > + + export const LastEditedTimePropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('last_edited_time'), + last_edited_time: z.record(z.any()) + }) + export type LastEditedTimePropertyResponse = z.infer< + typeof LastEditedTimePropertyResponseSchema + > + + export const LastEditedByPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('last_edited_by'), + last_edited_by: z.record(z.any()) + }) + export type LastEditedByPropertyResponse = z.infer< + typeof LastEditedByPropertyResponseSchema + > + + export const PartialUserObjectResponseSchema = z.object({ + object: z.literal('user'), + id: z.string() + }) + export type PartialUserObjectResponse = z.infer< + typeof PartialUserObjectResponseSchema + > + + export const AnnotationResponseSchema = z.object({ + bold: z.boolean(), + italic: z.boolean(), + strikethrough: z.boolean(), + underline: z.boolean(), + code: z.boolean(), + color: z.enum([ + 'default', + 'gray', + 'brown', + 'orange', + 'yellow', + 'green', + 'blue', + 'purple', + 'pink', + 'red', + 'gray_background', + 'brown_background', + 'orange_background', + 'yellow_background', + 'green_background', + 'blue_background', + 'purple_background', + 'pink_background', + 'red_background' + ]) + }) + export type AnnotationResponse = z.infer + + export const DateResponseSchema = z.object({ + start: z.string(), + end: z.union([z.string(), z.null()]), + time_zone: z.union([z.string(), z.null()]) + }) + export type DateResponse = z.infer + + export const PropertyUpdateSchemaSchema = z.object({ + name: z.string().optional(), + type: z.string().optional() + }) + export type PropertyUpdateSchema = z.infer + + export const TextPropertyFilterSchema = z.object({ + equals: z.string().optional(), + does_not_equal: z.string().optional(), + contains: z.string().optional(), + does_not_contain: z.string().optional(), + starts_with: z.string().optional(), + ends_with: z.string().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type TextPropertyFilter = z.infer + + export const NumberPropertyFilterSchema = z.object({ + equals: z.number().optional(), + does_not_equal: z.number().optional(), + greater_than: z.number().optional(), + less_than: z.number().optional(), + greater_than_or_equal_to: z.number().optional(), + less_than_or_equal_to: z.number().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type NumberPropertyFilter = z.infer + + export const CheckboxPropertyFilterSchema = z.object({ + equals: z.boolean().optional(), + does_not_equal: z.boolean().optional() + }) + export type CheckboxPropertyFilter = z.infer< + typeof CheckboxPropertyFilterSchema + > + + export const SelectPropertyFilterSchema = z.object({ + equals: z.string().optional(), + does_not_equal: z.string().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type SelectPropertyFilter = z.infer + + export const MultiSelectPropertyFilterSchema = z.object({ + contains: z.string().optional(), + does_not_contain: z.string().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type MultiSelectPropertyFilter = z.infer< + typeof MultiSelectPropertyFilterSchema + > + + export const DatePropertyFilterSchema = z.object({ + equals: z.string().optional(), + before: z.string().optional(), + after: z.string().optional(), + on_or_before: z.string().optional(), + on_or_after: z.string().optional(), + past_week: z.any().optional(), + past_month: z.any().optional(), + past_year: z.any().optional(), + next_week: z.any().optional(), + next_month: z.any().optional(), + next_year: z.any().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type DatePropertyFilter = z.infer + + export const PeoplePropertyFilterSchema = z.object({ + contains: z.string().optional(), + does_not_contain: z.string().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type PeoplePropertyFilter = z.infer + + export const FilesPropertyFilterSchema = z.object({ + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type FilesPropertyFilter = z.infer + + export const RelationPropertyFilterSchema = z.object({ + contains: z.string().optional(), + does_not_contain: z.string().optional(), + is_empty: z.boolean().optional(), + is_not_empty: z.boolean().optional() + }) + export type RelationPropertyFilter = z.infer< + typeof RelationPropertyFilterSchema + > + + export const PropertySchemaSchema = z.object({ + type: z.string(), + name: z.union([z.string(), z.null()]).optional() + }) + export type PropertySchema = z.infer + + export const SearchParametersSchema = z.object({ + query: z.string().optional(), + sort: z + .object({ + direction: z.enum(['ascending', 'descending']), + timestamp: z.literal('last_edited_time') + }) + .optional(), + filter: z + .object({ + value: z.enum(['page', 'database']), + property: z.literal('object') + }) + .optional(), + start_cursor: z.string().optional(), + page_size: z.number().int().optional() + }) + export type SearchParameters = z.infer + + export const PartialCommentObjectResponseSchema = z.object({ + object: z.literal('comment'), + id: z.string() + }) + export type PartialCommentObjectResponse = z.infer< + typeof PartialCommentObjectResponseSchema + > + + export const OauthTokenParametersSchema = z.object({ + grant_type: z.string(), + code: z.string(), + redirect_uri: z.string().optional(), + external_account: z.object({ key: z.string(), name: z.string() }).optional() + }) + export type OauthTokenParameters = z.infer + + export const ListUsersResponseSchema = z.object({ + results: z.array(UserObjectResponseSchema), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type ListUsersResponse = z.infer + + export const PropertyItemListResponseSchema = z.object({ + results: z.array(PropertyItemObjectResponseSchema), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type PropertyItemListResponse = z.infer< + typeof PropertyItemListResponseSchema + > + + export const SelectPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('select'), + select: z.object({ options: z.array(SelectOptionSchema) }) + }) + export type SelectPropertyResponse = z.infer< + typeof SelectPropertyResponseSchema + > + + export const MultiSelectPropertyResponseSchema = z.object({ + id: z.string(), + type: z.literal('multi_select'), + multi_select: z.object({ options: z.array(SelectOptionSchema) }) + }) + export type MultiSelectPropertyResponse = z.infer< + typeof MultiSelectPropertyResponseSchema + > + + export const TextRichTextItemResponseSchema = z.object({ + type: z.literal('text'), + text: z.object({ + content: z.string(), + link: z.union([z.object({ url: z.string() }), z.null()]) + }), + annotations: AnnotationResponseSchema, + plain_text: z.string(), + href: z.union([z.string(), z.null()]) + }) + export type TextRichTextItemResponse = z.infer< + typeof TextRichTextItemResponseSchema + > + + export const EquationRichTextItemResponseSchema = z.object({ + type: z.literal('equation'), + equation: z.object({ expression: z.string() }), + annotations: AnnotationResponseSchema, + plain_text: z.string(), + href: z.union([z.string(), z.null()]) + }) + export type EquationRichTextItemResponse = z.infer< + typeof EquationRichTextItemResponseSchema + > + + export const ListBlockChildrenResponseSchema = z.object({ + object: z.literal('list'), + results: z.array( + z.union([PartialBlockObjectResponseSchema, BlockObjectResponseSchema]) + ), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type ListBlockChildrenResponse = z.infer< + typeof ListBlockChildrenResponseSchema + > + + export const AppendBlockChildrenResponseSchema = z.object({ + object: z.literal('list'), + results: z.array( + z.union([PartialBlockObjectResponseSchema, BlockObjectResponseSchema]) + ), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type AppendBlockChildrenResponse = z.infer< + typeof AppendBlockChildrenResponseSchema + > + + export const QueryDatabaseResponseSchema = z.object({ + object: z.literal('list'), + results: z.array( + z.union([PageObjectResponseSchema, PartialPageObjectResponseSchema]) + ), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type QueryDatabaseResponse = z.infer< + typeof QueryDatabaseResponseSchema + > + + export const OauthTokenResponseSchema = z.object({ + access_token: z.string(), + token_type: z.literal('bearer'), + bot_id: z.string(), + workspace_name: z.union([z.string(), z.null()]), + workspace_icon: z.union([z.string(), z.null()]), + workspace_id: z.string(), + owner: z.union([ + z.object({ + type: z.literal('user'), + user: z.union([ + UserObjectResponseSchema, + PartialUserObjectResponseSchema + ]) + }), + z.object({ type: z.literal('workspace'), workspace: z.literal(true) }) + ]), + duplicated_template_id: z.union([z.string(), z.null()]) + }) + export type OauthTokenResponse = z.infer + + export const RichTextItemRequestSchema = z.union([ + z.object({ + text: z.object({ + content: z.string(), + link: z.union([z.object({ url: z.string() }), z.null()]).optional() + }), + type: z.literal('text').optional(), + annotations: AnnotationRequestSchema.optional() + }), + z.object({ + mention: z.union([ + z.object({ + user: z.union([ + z.object({ id: z.string() }), + UserObjectResponseSchema + ]) + }), + z.object({ page: z.object({ id: z.string() }) }), + z.object({ database: z.object({ id: z.string() }) }), + z.object({ date: DateRequestSchema }) + ]), + type: z.literal('mention').optional(), + annotations: AnnotationRequestSchema.optional() + }), + z.object({ + equation: z.object({ expression: z.string() }), + type: z.literal('equation').optional(), + annotations: AnnotationRequestSchema.optional() + }) + ]) + export type RichTextItemRequest = z.infer + + export const CreatePageParametersSchema = z.object({ + parent: z + .record(z.any()) + .and( + z.union([ + z.object({ type: z.literal('page_id'), page_id: z.string() }), + z.object({ type: z.literal('database_id'), database_id: z.string() }) + ]) + ), + properties: z.record( + z.union([ + z.object({ title: z.array(RichTextItemRequestSchema) }), + z.object({ rich_text: z.array(RichTextItemRequestSchema) }), + z.object({ number: z.union([z.number(), z.null()]) }), + z.object({ + select: z.union([z.object({ name: z.string() }), z.null()]) + }) + ]) + ) + }) + export type CreatePageParameters = z.infer + + export const UpdatePageParametersSchema = z.object({ + properties: z + .record( + z.union([ + z.object({ title: z.array(RichTextItemRequestSchema) }), + z.object({ rich_text: z.array(RichTextItemRequestSchema) }), + z.object({ number: z.union([z.number(), z.null()]) }), + z.object({ + select: z.union([z.object({ name: z.string() }), z.null()]) + }) + ]) + ) + .optional(), + archived: z.boolean().optional() + }) + export type UpdatePageParameters = z.infer + + export const UpdateBlockParametersSchema = z.object({ + paragraph: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + heading_1: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + heading_2: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + heading_3: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + bulleted_list_item: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + numbered_list_item: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + quote: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + to_do: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + checked: z.boolean().optional(), + color: z.string().optional() + }) + .optional(), + toggle: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + color: z.string().optional() + }) + .optional(), + code: z + .object({ + rich_text: z.array(RichTextItemRequestSchema).optional(), + language: z.string().optional() + }) + .optional(), + embed: z.object({ url: z.string().optional() }).optional(), + image: z + .object({ external: z.object({ url: z.string().optional() }).optional() }) + .optional(), + video: z + .object({ external: z.object({ url: z.string().optional() }).optional() }) + .optional(), + file: z + .object({ external: z.object({ url: z.string().optional() }).optional() }) + .optional(), + pdf: z + .object({ external: z.object({ url: z.string().optional() }).optional() }) + .optional(), + bookmark: z.object({ url: z.string().optional() }).optional(), + equation: z.object({ expression: z.string().optional() }).optional(), + divider: z.record(z.any()).optional(), + table_of_contents: z.object({ color: z.string().optional() }).optional(), + breadcrumb: z.record(z.any()).optional(), + column_list: z.record(z.any()).optional(), + column: z.record(z.any()).optional(), + link_to_page: z + .object({ + type: z.enum(['page_id', 'database_id']).optional(), + page_id: z.string().optional(), + database_id: z.string().optional() + }) + .optional(), + table_row: z + .object({ cells: z.array(z.array(RichTextItemRequestSchema)).optional() }) + .optional(), + archived: z.boolean().optional() + }) + export type UpdateBlockParameters = z.infer< + typeof UpdateBlockParametersSchema + > + + export const BlockObjectRequestSchema = z.union([ + z.object({ + object: z.literal('block'), + type: z.literal('paragraph'), + paragraph: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('heading_1'), + heading_1: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('heading_2'), + heading_2: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('heading_3'), + heading_3: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('bulleted_list_item'), + bulleted_list_item: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('numbered_list_item'), + numbered_list_item: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('to_do'), + to_do: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + checked: z.boolean(), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('toggle'), + toggle: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + color: z.string().optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('code'), + code: z.object({ + rich_text: z.array(RichTextItemRequestSchema), + language: z.string(), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('child_page'), + child_page: z.object({ title: z.string() }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('child_database'), + child_database: z.object({ title: z.string() }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('embed'), + embed: z.object({ + url: z.string(), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('image'), + image: z.object({ + external: z.object({ url: z.string() }), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('video'), + video: z.object({ + external: z.object({ url: z.string() }), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('file'), + file: z.object({ + external: z.object({ url: z.string() }), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('pdf'), + pdf: z.object({ + external: z.object({ url: z.string() }), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('bookmark'), + bookmark: z.object({ + url: z.string(), + caption: z.array(RichTextItemRequestSchema).optional() + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('equation'), + equation: z.object({ expression: z.string() }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('divider'), + divider: z.record(z.any()) + }), + z.object({ + object: z.literal('block'), + type: z.literal('table_of_contents'), + table_of_contents: z.object({ color: z.string().optional() }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('column_list'), + column_list: z.record(z.any()) + }), + z.object({ + object: z.literal('block'), + type: z.literal('column'), + column: z.record(z.any()) + }), + z.object({ + object: z.literal('block'), + type: z.literal('link_to_page'), + link_to_page: z.union([ + z.object({ type: z.literal('page_id'), page_id: z.string() }), + z.object({ type: z.literal('database_id'), database_id: z.string() }) + ]) + }), + z.object({ + object: z.literal('block'), + type: z.literal('table'), + table: z.object({ + table_width: z.number().int(), + has_column_header: z.boolean().optional(), + has_row_header: z.boolean().optional(), + children: z.array( + // TODO: Support recursive types for `BlockObjectRequestSchema`. + z.any() + ) + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('table_row'), + table_row: z.object({ + cells: z.array(z.array(RichTextItemRequestSchema)) + }) + }), + z.object({ + object: z.literal('block'), + type: z.literal('synced_block'), + synced_block: z.object({ + synced_from: z + .union([ + z.object({ type: z.literal('block_id'), block_id: z.string() }), + z.null() + ]) + .optional(), + children: z + .array( + // TODO: Support recursive types for `BlockObjectRequestSchema`. + z.any() + ) + .optional() + }) + }) + ]) + export type BlockObjectRequest = z.infer + + export const MentionRichTextItemResponseSchema = z.object({ + type: z.literal('mention'), + mention: z.union([ + z.object({ + type: z.literal('user'), + user: z.union([ + PartialUserObjectResponseSchema, + UserObjectResponseSchema + ]) + }), + z.object({ type: z.literal('date'), date: DateResponseSchema }), + z.object({ + type: z.literal('link_preview'), + link_preview: z.object({ url: z.string() }) + }), + z.object({ type: z.literal('page'), page: z.object({ id: z.string() }) }), + z.object({ + type: z.literal('database'), + database: z.object({ id: z.string() }) + }) + ]), + annotations: AnnotationResponseSchema, + plain_text: z.string(), + href: z.union([z.string(), z.null()]) + }) + export type MentionRichTextItemResponse = z.infer< + typeof MentionRichTextItemResponseSchema + > + + export const CreateCommentParametersSchema = z.union([ + z.object({ + parent: z.object({ + page_id: z.string(), + type: z.literal('page_id').optional() + }), + rich_text: z.array(RichTextItemRequestSchema) + }), + z.object({ + discussion_id: z.string(), + rich_text: z.array(RichTextItemRequestSchema) + }) + ]) + export type CreateCommentParameters = z.infer< + typeof CreateCommentParametersSchema + > + + export const AppendBlockChildrenParametersSchema = z.object({ + children: z.array(BlockObjectRequestSchema) + }) + export type AppendBlockChildrenParameters = z.infer< + typeof AppendBlockChildrenParametersSchema + > + + export const UpdateDatabaseParametersSchema = z.object({ + title: z.array(RichTextItemRequestSchema).optional(), + description: z.array(RichTextItemRequestSchema).optional(), + icon: z + .union([ + z.object({ emoji: z.string(), type: z.literal('emoji') }), + z.object({ + external: z.object({ url: z.string() }), + type: z.literal('external') + }), + z.null() + ]) + .optional(), + cover: z + .union([ + z.object({ + external: z.object({ url: z.string() }), + type: z.literal('external') + }), + z.null() + ]) + .optional(), + properties: z.record(PropertyUpdateSchemaSchema).optional(), + is_inline: z.boolean().optional(), + archived: z.boolean().optional() + }) + export type UpdateDatabaseParameters = z.infer< + typeof UpdateDatabaseParametersSchema + > + + export const CreateDatabaseParametersSchema = z.object({ + parent: z.union([ + z.object({ type: z.literal('page_id'), page_id: z.string() }), + z.object({ type: z.literal('database_id'), database_id: z.string() }) + ]), + properties: z.record(PropertySchemaSchema), + icon: z + .union([ + z.object({ type: z.literal('emoji'), emoji: z.string() }), + z.object({ + type: z.literal('external'), + external: z.object({ url: z.string() }) + }), + z.null() + ]) + .optional(), + cover: z + .union([ + z.object({ + type: z.literal('external'), + external: z.object({ url: z.string() }) + }), + z.null() + ]) + .optional(), + title: z.array(RichTextItemRequestSchema), + description: z.array(RichTextItemRequestSchema).optional(), + is_inline: z.boolean().optional() + }) + export type CreateDatabaseParameters = z.infer< + typeof CreateDatabaseParametersSchema + > + + export const RichTextItemResponseSchema = z.union([ + TextRichTextItemResponseSchema, + MentionRichTextItemResponseSchema, + EquationRichTextItemResponseSchema + ]) + export type RichTextItemResponse = z.infer + + export const CommentObjectResponseSchema = z.object({ + object: z.literal('comment'), + id: z.string(), + parent: z.union([ + z.object({ type: z.literal('page_id'), page_id: z.string() }), + z.object({ type: z.literal('block_id'), block_id: z.string() }) + ]), + discussion_id: z.string(), + rich_text: z.array(RichTextItemResponseSchema), + created_by: PartialUserObjectResponseSchema, + created_time: z.string(), + last_edited_time: z.string() + }) + export type CommentObjectResponse = z.infer< + typeof CommentObjectResponseSchema + > + + export const PropertyFilterSchema = z.union([ + z.object({ property: z.string(), title: TextPropertyFilterSchema }), + z.object({ property: z.string(), rich_text: TextPropertyFilterSchema }), + z.object({ property: z.string(), number: NumberPropertyFilterSchema }), + z.object({ property: z.string(), checkbox: CheckboxPropertyFilterSchema }), + z.object({ property: z.string(), select: SelectPropertyFilterSchema }), + z.object({ + property: z.string(), + multi_select: MultiSelectPropertyFilterSchema + }), + z.object({ property: z.string(), date: DatePropertyFilterSchema }), + z.object({ property: z.string(), people: PeoplePropertyFilterSchema }), + z.object({ property: z.string(), files: FilesPropertyFilterSchema }), + z.object({ property: z.string(), url: TextPropertyFilterSchema }), + z.object({ property: z.string(), email: TextPropertyFilterSchema }), + z.object({ property: z.string(), phone_number: TextPropertyFilterSchema }), + z.object({ property: z.string(), relation: RelationPropertyFilterSchema }), + z.object({ property: z.string(), created_by: PeoplePropertyFilterSchema }), + z.object({ property: z.string(), created_time: DatePropertyFilterSchema }), + z.object({ + property: z.string(), + last_edited_by: PeoplePropertyFilterSchema + }), + z.object({ + property: z.string(), + last_edited_time: DatePropertyFilterSchema + }), + z.object({ + timestamp: z.enum(['created_time', 'last_edited_time']), + created_time: DatePropertyFilterSchema + }), + z.object({ + timestamp: z.enum(['created_time', 'last_edited_time']), + last_edited_time: DatePropertyFilterSchema + }) + ]) + export type PropertyFilter = z.infer + + export const ListCommentsResponseSchema = z.object({ + object: z.literal('list'), + results: z.array(CommentObjectResponseSchema), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type ListCommentsResponse = z.infer + + export const CompoundFilterSchema = z.object({ + and: z.array(PropertyFilterSchema).optional(), + or: z.array(PropertyFilterSchema).optional() + }) + export type CompoundFilter = z.infer + + export const QueryDatabaseParametersSchema = z.object({ + sorts: z + .array( + z.union([ + z.object({ + property: z.string(), + direction: z.enum(['ascending', 'descending']) + }), + z.object({ + timestamp: z.enum(['created_time', 'last_edited_time']), + direction: z.enum(['ascending', 'descending']) + }) + ]) + ) + .optional(), + filter: z.union([PropertyFilterSchema, CompoundFilterSchema]).optional(), + start_cursor: z.string().optional(), + page_size: z.number().int().optional(), + archived: z.boolean().optional() + }) + export type QueryDatabaseParameters = z.infer< + typeof QueryDatabaseParametersSchema + > + + export const DatabasePropertyConfigResponseSchema = z.union([ + TitlePropertyResponseSchema, + RichTextPropertyResponseSchema, + NumberPropertyResponseSchema, + SelectPropertyResponseSchema, + MultiSelectPropertyResponseSchema, + DatePropertyResponseSchema, + PeoplePropertyResponseSchema, + FilePropertyResponseSchema, + CheckboxPropertyResponseSchema, + UrlPropertyResponseSchema, + EmailPropertyResponseSchema, + PhoneNumberPropertyResponseSchema, + FormulaPropertyResponseSchema, + RelationPropertyResponseSchema, + RollupPropertyResponseSchema, + CreatedTimePropertyResponseSchema, + CreatedByPropertyResponseSchema, + LastEditedTimePropertyResponseSchema, + LastEditedByPropertyResponseSchema + ]) + export type DatabasePropertyConfigResponse = z.infer< + typeof DatabasePropertyConfigResponseSchema + > + + export const PartialDatabaseObjectResponseSchema = z.object({ + object: z.literal('database'), + id: z.string(), + properties: z.record(DatabasePropertyConfigResponseSchema) + }) + export type PartialDatabaseObjectResponse = z.infer< + typeof PartialDatabaseObjectResponseSchema + > + + export const DatabaseObjectResponseSchema = z.object({ + object: z.literal('database'), + id: z.string(), + cover: z + .union([ + z.object({ + type: z.literal('external'), + external: z.object({ url: z.string() }) + }), + z.null() + ]) + .optional(), + icon: z + .union([ + z.object({ type: z.literal('emoji'), emoji: z.string() }), + z.object({ + type: z.literal('external'), + external: z.object({ url: z.string() }) + }), + z.null() + ]) + .optional(), + created_time: z.string(), + created_by: PartialUserObjectResponseSchema, + last_edited_time: z.string(), + last_edited_by: PartialUserObjectResponseSchema, + title: z.array(RichTextItemResponseSchema), + description: z.array(RichTextItemResponseSchema), + is_inline: z.boolean(), + properties: z.record(DatabasePropertyConfigResponseSchema), + parent: z.union([ + z.object({ type: z.literal('page_id'), page_id: z.string() }), + z.object({ type: z.literal('workspace'), workspace: z.literal(true) }) + ]), + url: z.string(), + archived: z.boolean() + }) + export type DatabaseObjectResponse = z.infer< + typeof DatabaseObjectResponseSchema + > + + export const ListDatabasesResponseSchema = z.object({ + object: z.literal('list'), + results: z.array( + z.union([ + PartialDatabaseObjectResponseSchema, + DatabaseObjectResponseSchema + ]) + ), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type ListDatabasesResponse = z.infer< + typeof ListDatabasesResponseSchema + > + + export const SearchResponseSchema = z.object({ + object: z.literal('list'), + results: z.array( + z.union([ + PageObjectResponseSchema, + PartialPageObjectResponseSchema, + PartialDatabaseObjectResponseSchema, + DatabaseObjectResponseSchema + ]) + ), + next_cursor: z.union([z.string(), z.null()]), + has_more: z.boolean() + }) + export type SearchResponse = z.infer + + // ----------------------------------------------------------------------------- + // Operation schemas + // ----------------------------------------------------------------------------- + + export const GetSelfParamsSchema = z.object({}) + export type GetSelfParams = z.infer + + export const GetSelfResponseSchema = UserObjectResponseSchema + export type GetSelfResponse = z.infer + + export const GetUserParamsSchema = z.object({ user_id: z.string() }) + export type GetUserParams = z.infer + + export const GetUserResponseSchema = UserObjectResponseSchema + export type GetUserResponse = z.infer + + export const ListUsersParamsSchema = z.object({ + start_cursor: z.string().optional(), + page_size: z.number().int().optional() + }) + export type ListUsersParams = z.infer + + export const CreatePageParamsSchema = CreatePageParametersSchema + export type CreatePageParams = z.infer + + export const CreatePageResponseSchema = z.union([ + PageObjectResponseSchema, + PartialPageObjectResponseSchema + ]) + export type CreatePageResponse = z.infer + + export const GetPageParamsSchema = z.object({ + page_id: z.string(), + filter_properties: z.array(z.string()).optional() + }) + export type GetPageParams = z.infer + + export const GetPageResponseSchema = z.union([ + PageObjectResponseSchema, + PartialPageObjectResponseSchema + ]) + export type GetPageResponse = z.infer + + export const UpdatePageParamsSchema = z + .object({ page_id: z.string() }) + .merge(UpdatePageParametersSchema) + export type UpdatePageParams = z.infer + + export const UpdatePageResponseSchema = z.union([ + PageObjectResponseSchema, + PartialPageObjectResponseSchema + ]) + export type UpdatePageResponse = z.infer + + export const GetPagePropertyParamsSchema = z.object({ + page_id: z.string(), + property_id: z.string(), + start_cursor: z.string().optional(), + page_size: z.number().int().optional() + }) + export type GetPagePropertyParams = z.infer< + typeof GetPagePropertyParamsSchema + > + + export const GetPagePropertyResponseSchema = z.union([ + PropertyItemObjectResponseSchema, + PropertyItemListResponseSchema + ]) + export type GetPagePropertyResponse = z.infer< + typeof GetPagePropertyResponseSchema + > + + export const GetBlockParamsSchema = z.object({ block_id: z.string() }) + export type GetBlockParams = z.infer + + export const GetBlockResponseSchema = z.union([ + PartialBlockObjectResponseSchema, + BlockObjectResponseSchema + ]) + export type GetBlockResponse = z.infer + + export const DeleteBlockParamsSchema = z.object({ block_id: z.string() }) + export type DeleteBlockParams = z.infer + + export const DeleteBlockResponseSchema = z.union([ + PartialBlockObjectResponseSchema, + BlockObjectResponseSchema + ]) + export type DeleteBlockResponse = z.infer + + export const UpdateBlockParamsSchema = z + .object({ block_id: z.string() }) + .merge(UpdateBlockParametersSchema) + export type UpdateBlockParams = z.infer + + export const UpdateBlockResponseSchema = z.union([ + PartialBlockObjectResponseSchema, + BlockObjectResponseSchema + ]) + export type UpdateBlockResponse = z.infer + + export const ListBlockChildrenParamsSchema = z.object({ + block_id: z.string(), + start_cursor: z.string().optional(), + page_size: z.number().int().optional() + }) + export type ListBlockChildrenParams = z.infer< + typeof ListBlockChildrenParamsSchema + > + + export const AppendBlockChildrenParamsSchema = z + .object({ block_id: z.string() }) + .merge(AppendBlockChildrenParametersSchema) + export type AppendBlockChildrenParams = z.infer< + typeof AppendBlockChildrenParamsSchema + > + + export const GetDatabaseParamsSchema = z.object({ database_id: z.string() }) + export type GetDatabaseParams = z.infer + + export const GetDatabaseResponseSchema = z.union([ + PartialDatabaseObjectResponseSchema, + DatabaseObjectResponseSchema + ]) + export type GetDatabaseResponse = z.infer + + export const UpdateDatabaseParamsSchema = z + .object({ database_id: z.string() }) + .merge(UpdateDatabaseParametersSchema) + export type UpdateDatabaseParams = z.infer + + export const UpdateDatabaseResponseSchema = z.union([ + PartialDatabaseObjectResponseSchema, + DatabaseObjectResponseSchema + ]) + export type UpdateDatabaseResponse = z.infer< + typeof UpdateDatabaseResponseSchema + > + + export const QueryDatabaseParamsSchema = z + .object({ + database_id: z.string(), + filter_properties: z.array(z.string()).optional() + }) + .merge(QueryDatabaseParametersSchema) + export type QueryDatabaseParams = z.infer + + export const ListDatabasesParamsSchema = z.object({ + start_cursor: z.string().optional(), + page_size: z.number().int().optional() + }) + export type ListDatabasesParams = z.infer + + export const CreateDatabaseParamsSchema = CreateDatabaseParametersSchema + export type CreateDatabaseParams = z.infer + + export const CreateDatabaseResponseSchema = z.union([ + PartialDatabaseObjectResponseSchema, + DatabaseObjectResponseSchema + ]) + export type CreateDatabaseResponse = z.infer< + typeof CreateDatabaseResponseSchema + > + + export const SearchParamsSchema = SearchParametersSchema + export type SearchParams = z.infer + + export const ListCommentsParamsSchema = z.object({ + block_id: z.string(), + start_cursor: z.string().optional(), + page_size: z.number().int().optional() + }) + export type ListCommentsParams = z.infer + + export const CreateCommentParamsSchema = CreateCommentParametersSchema + export type CreateCommentParams = z.infer + + export const CreateCommentResponseSchema = z.union([ + CommentObjectResponseSchema, + PartialCommentObjectResponseSchema + ]) + export type CreateCommentResponse = z.infer< + typeof CreateCommentResponseSchema + > + + export const OauthTokenParamsSchema = OauthTokenParametersSchema + export type OauthTokenParams = z.infer +} + +/** + * Agentic Notion client. + * + * API specification for Notion. + */ +export class NotionClient extends AIFunctionsProvider { + protected readonly ky: KyInstance + protected readonly apiKey: string + protected readonly apiBaseUrl: string + + constructor({ + apiKey = getEnv('NOTION_API_KEY'), + apiBaseUrl = notion.apiBaseUrl, + ky = defaultKy + }: { + apiKey?: string + apiBaseUrl?: string + ky?: KyInstance + } = {}) { + assert( + apiKey, + 'NotionClient missing required "apiKey" (defaults to "NOTION_API_KEY")' + ) + super() + + this.apiKey = apiKey + this.apiBaseUrl = apiBaseUrl + + this.ky = ky.extend({ + prefixUrl: apiBaseUrl, + headers: { + Authorization: `Bearer ${apiKey}` + } + }) + } + + /** + * Get current user. + */ + @aiFunction({ + name: 'get_self', + description: 'Get current user.', + inputSchema: notion.GetSelfParamsSchema + }) + async getSelf( + _params: notion.GetSelfParams + ): Promise { + return this.ky.get('/users/me').json() + } + + /** + * Get user. + */ + @aiFunction({ + name: 'get_user', + description: 'Get user.', + inputSchema: notion.GetUserParamsSchema + }) + async getUser(params: notion.GetUserParams): Promise { + return this.ky + .get(`/users/${params.user_id}`) + .json() + } + + /** + * List users. + */ + @aiFunction({ + name: 'list_users', + description: 'List users.', + inputSchema: notion.ListUsersParamsSchema + }) + async listUsers( + params: notion.ListUsersParams + ): Promise { + return this.ky + .get('/users', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + * Create page. + */ + @aiFunction({ + name: 'create_page', + description: 'Create page.', + inputSchema: notion.CreatePageParamsSchema + }) + async createPage( + params: notion.CreatePageParams + ): Promise { + return this.ky + .post('/pages', { + json: params + }) + .json() + } + + /** + * Get page. + */ + @aiFunction({ + name: 'get_page', + description: 'Get page.', + inputSchema: notion.GetPageParamsSchema + }) + async getPage(params: notion.GetPageParams): Promise { + return this.ky + .get(`/pages/${params.page_id}`, { + searchParams: sanitizeSearchParams(pick(params, 'filter_properties')) + }) + .json() + } + + /** + * Update page. + */ + @aiFunction({ + name: 'update_page', + description: 'Update page.', + inputSchema: notion.UpdatePageParamsSchema + }) + async updatePage( + params: notion.UpdatePageParams + ): Promise { + return this.ky + .patch(`/pages/${params.page_id}`, { + json: pick(params, 'properties', 'archived') + }) + .json() + } + + /** + * Get page property. + */ + @aiFunction({ + name: 'get_page_property', + description: 'Get page property.', + inputSchema: notion.GetPagePropertyParamsSchema + }) + async getPageProperty( + params: notion.GetPagePropertyParams + ): Promise { + return this.ky + .get(`/pages/${params.page_id}/properties/${params.property_id}`, { + searchParams: sanitizeSearchParams( + pick(params, 'start_cursor', 'page_size') + ) + }) + .json() + } + + /** + * Get block. + */ + @aiFunction({ + name: 'get_block', + description: 'Get block.', + inputSchema: notion.GetBlockParamsSchema + }) + async getBlock( + params: notion.GetBlockParams + ): Promise { + return this.ky + .get(`/blocks/${params.block_id}`) + .json() + } + + /** + * Delete block. + */ + @aiFunction({ + name: 'delete_block', + description: 'Delete block.', + inputSchema: notion.DeleteBlockParamsSchema + }) + async deleteBlock( + params: notion.DeleteBlockParams + ): Promise { + return this.ky + .delete(`/blocks/${params.block_id}`) + .json() + } + + /** + * Update block. + */ + @aiFunction({ + name: 'update_block', + description: 'Update block.', + inputSchema: notion.UpdateBlockParamsSchema + }) + async updateBlock( + params: notion.UpdateBlockParams + ): Promise { + return this.ky + .patch(`/blocks/${params.block_id}`, { + json: pick( + params, + 'paragraph', + 'heading_1', + 'heading_2', + 'heading_3', + 'bulleted_list_item', + 'numbered_list_item', + 'quote', + 'to_do', + 'toggle', + 'code', + 'embed', + 'image', + 'video', + 'file', + 'pdf', + 'bookmark', + 'equation', + 'divider', + 'table_of_contents', + 'breadcrumb', + 'column_list', + 'column', + 'link_to_page', + 'table_row', + 'archived' + ) + }) + .json() + } + + /** + * List block children. + */ + @aiFunction({ + name: 'list_block_children', + description: 'List block children.', + inputSchema: notion.ListBlockChildrenParamsSchema + }) + async listBlockChildren( + params: notion.ListBlockChildrenParams + ): Promise { + return this.ky + .get(`/blocks/${params.block_id}/children`, { + searchParams: sanitizeSearchParams( + pick(params, 'start_cursor', 'page_size') + ) + }) + .json() + } + + /** + * Append block children. + */ + @aiFunction({ + name: 'append_block_children', + description: 'Append block children.', + inputSchema: notion.AppendBlockChildrenParamsSchema + }) + async appendBlockChildren( + params: notion.AppendBlockChildrenParams + ): Promise { + return this.ky + .patch(`/blocks/${params.block_id}/children`, { + json: pick(params, 'children') + }) + .json() + } + + /** + * Get database. + */ + @aiFunction({ + name: 'get_database', + description: 'Get database.', + inputSchema: notion.GetDatabaseParamsSchema + }) + async getDatabase( + params: notion.GetDatabaseParams + ): Promise { + return this.ky + .get(`/databases/${params.database_id}`) + .json() + } + + /** + * Update database. + */ + @aiFunction({ + name: 'update_database', + description: 'Update database.', + inputSchema: notion.UpdateDatabaseParamsSchema + }) + async updateDatabase( + params: notion.UpdateDatabaseParams + ): Promise { + return this.ky + .patch(`/databases/${params.database_id}`, { + json: pick( + params, + 'title', + 'description', + 'icon', + 'cover', + 'properties', + 'is_inline', + 'archived' + ) + }) + .json() + } + + /** + * Query database. + */ + @aiFunction({ + name: 'query_database', + description: 'Query database.', + inputSchema: notion.QueryDatabaseParamsSchema + }) + async queryDatabase( + params: notion.QueryDatabaseParams + ): Promise { + return this.ky + .post(`/databases/${params.database_id}/query`, { + searchParams: sanitizeSearchParams(pick(params, 'filter_properties')), + json: pick( + params, + 'sorts', + 'filter', + 'start_cursor', + 'page_size', + 'archived' + ) + }) + .json() + } + + /** + * List databases. + */ + @aiFunction({ + name: 'list_databases', + description: 'List databases.', + inputSchema: notion.ListDatabasesParamsSchema + }) + async listDatabases( + params: notion.ListDatabasesParams + ): Promise { + return this.ky + .get('/databases', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + * Create database. + */ + @aiFunction({ + name: 'create_database', + description: 'Create database.', + inputSchema: notion.CreateDatabaseParamsSchema + }) + async createDatabase( + params: notion.CreateDatabaseParams + ): Promise { + return this.ky + .post('/databases', { + json: params + }) + .json() + } + + /** + * Search. + */ + @aiFunction({ + name: 'search', + description: 'Search.', + inputSchema: notion.SearchParamsSchema + }) + async search(params: notion.SearchParams): Promise { + return this.ky + .post('/search', { + json: params + }) + .json() + } + + /** + * List comments. + */ + @aiFunction({ + name: 'list_comments', + description: 'List comments.', + inputSchema: notion.ListCommentsParamsSchema + }) + async listComments( + params: notion.ListCommentsParams + ): Promise { + return this.ky + .get('/comments', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + * Create comment. + */ + @aiFunction({ + name: 'create_comment', + description: 'Create comment.', + // TODO: Improve handling of union params + inputSchema: notion.CreateCommentParamsSchema as any + }) + async createComment( + params: notion.CreateCommentParams + ): Promise { + return this.ky + .post('/comments', { + json: params + }) + .json() + } + + /** + * OAuth token. + */ + @aiFunction({ + name: 'oauth_token', + description: 'OAuth token.', + inputSchema: notion.OauthTokenParamsSchema + }) + async oauthToken( + params: notion.OauthTokenParams + ): Promise { + return this.ky + .post('/oauth/token', { + json: params + }) + .json() + } +} diff --git a/packages/openapi-to-ts/fixtures/generated/pet-store-client.ts b/packages/openapi-to-ts/fixtures/generated/pet-store-client.ts new file mode 100644 index 0000000..27122bf --- /dev/null +++ b/packages/openapi-to-ts/fixtures/generated/pet-store-client.ts @@ -0,0 +1,142 @@ +/* eslint-disable unicorn/no-unreadable-iife */ +/* eslint-disable unicorn/no-array-reduce */ + +/** + * This file was auto-generated from an OpenAPI spec. + */ + +import { + aiFunction, + AIFunctionsProvider, + sanitizeSearchParams +} from '@agentic/core' +import defaultKy, { type KyInstance } from 'ky' +import { z } from 'zod' + +export namespace petstore { + export const apiBaseUrl = 'http://petstore.swagger.io/v1' + + // ----------------------------------------------------------------------------- + // Component schemas + // ----------------------------------------------------------------------------- + + export const PetSchema = z.object({ + id: z.number().int(), + name: z.string(), + tag: z.string().optional() + }) + export type Pet = z.infer + + export const PetsSchema = z.array(PetSchema).max(100) + export type Pets = z.infer + + // ----------------------------------------------------------------------------- + // Operation schemas + // ----------------------------------------------------------------------------- + + export const ListPetsParamsSchema = z.object({ + /** How many items to return at one time (max 100) */ + limit: z + .number() + .int() + .lte(100) + .describe('How many items to return at one time (max 100)') + .optional() + }) + export type ListPetsParams = z.infer + + export const ListPetsResponseSchema = PetsSchema + export type ListPetsResponse = z.infer + + export const CreatePetsParamsSchema = PetSchema + export type CreatePetsParams = z.infer + + export type CreatePetsResponse = undefined + + export const ShowPetByIdParamsSchema = z.object({ + /** The id of the pet to retrieve */ + petId: z.string().describe('The id of the pet to retrieve') + }) + export type ShowPetByIdParams = z.infer + + export const ShowPetByIdResponseSchema = PetSchema + export type ShowPetByIdResponse = z.infer +} + +/** + * Agentic PetStore client. + */ +export class PetStoreClient extends AIFunctionsProvider { + protected readonly ky: KyInstance + + protected readonly apiBaseUrl: string + + constructor({ + apiBaseUrl = petstore.apiBaseUrl, + ky = defaultKy + }: { + apiKey?: string + apiBaseUrl?: string + ky?: KyInstance + } = {}) { + super() + + this.apiBaseUrl = apiBaseUrl + + this.ky = ky.extend({ + prefixUrl: apiBaseUrl + }) + } + + /** + * List all pets. + */ + @aiFunction({ + name: 'list_pets', + description: 'List all pets.', + inputSchema: petstore.ListPetsParamsSchema + }) + async listPets( + params: petstore.ListPetsParams + ): Promise { + return this.ky + .get('/pets', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + * Create a pet. + */ + @aiFunction({ + name: 'create_pets', + description: 'Create a pet.', + inputSchema: petstore.CreatePetsParamsSchema + }) + async createPets( + params: petstore.CreatePetsParams + ): Promise { + return this.ky + .post('/pets', { + json: params + }) + .json() + } + + /** + * Info for a specific pet. + */ + @aiFunction({ + name: 'show_pet_by_id', + description: 'Info for a specific pet.', + inputSchema: petstore.ShowPetByIdParamsSchema + }) + async showPetById( + params: petstore.ShowPetByIdParams + ): Promise { + return this.ky + .get(`/pets/${params.petId}`) + .json() + } +} diff --git a/packages/openapi-to-ts/fixtures/generated/stripe-client.ts b/packages/openapi-to-ts/fixtures/generated/stripe-client.ts new file mode 100644 index 0000000..b71fa1e --- /dev/null +++ b/packages/openapi-to-ts/fixtures/generated/stripe-client.ts @@ -0,0 +1,72016 @@ +/* eslint-disable unicorn/no-unreadable-iife */ +/* eslint-disable unicorn/no-array-reduce */ + +/** + * This file was auto-generated from an OpenAPI spec. + */ + +import { + aiFunction, + AIFunctionsProvider, + assert, + getEnv, + pick, + sanitizeSearchParams +} from '@agentic/core' +import defaultKy, { type KyInstance } from 'ky' +import { z } from 'zod' + +export namespace stripe { + export const apiBaseUrl = 'https://api.stripe.com/' + + // ----------------------------------------------------------------------------- + // Component schemas + // ----------------------------------------------------------------------------- + + export const AccountAnnualRevenueSchema = z.object({ + /** A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). */ + amount: z + .number() + .int() + .nullable() + .describe( + 'A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + '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).' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.' + ) + .optional() + }) + export type AccountAnnualRevenue = z.infer + + export const AccountMonthlyEstimatedRevenueSchema = z.object({ + /** A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). */ + amount: z + .number() + .int() + .describe( + 'A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).' + ), + /** 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: z + .string() + .describe( + '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).' + ) + }) + export type AccountMonthlyEstimatedRevenue = z.infer< + typeof AccountMonthlyEstimatedRevenueSchema + > + + export const AddressSchema = z.object({ + /** City, district, suburb, town, or village. */ + city: z + .string() + .max(5000) + .nullable() + .describe('City, district, suburb, town, or village.') + .optional(), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ) + .optional(), + /** Address line 1 (e.g., street, PO Box, or company name). */ + line1: z + .string() + .max(5000) + .nullable() + .describe('Address line 1 (e.g., street, PO Box, or company name).') + .optional(), + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + line2: z + .string() + .max(5000) + .nullable() + .describe('Address line 2 (e.g., apartment, suite, unit, or building).') + .optional(), + /** ZIP or postal code. */ + postal_code: z + .string() + .max(5000) + .nullable() + .describe('ZIP or postal code.') + .optional(), + /** State, county, province, or region. */ + state: z + .string() + .max(5000) + .nullable() + .describe('State, county, province, or region.') + .optional() + }) + export type Address = z.infer + + export const AccountCapabilitiesSchema = z.object({ + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. */ + affirm_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.' + ) + .optional(), + /** The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. */ + afterpay_clearpay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.' + ) + .optional(), + /** The status of the Alma capability of the account, or whether the account can directly process Alma payments. */ + alma_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Alma capability of the account, or whether the account can directly process Alma payments.' + ) + .optional(), + /** The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. */ + amazon_pay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.' + ) + .optional(), + /** The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. */ + bancontact_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.' + ) + .optional(), + /** The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. */ + bank_transfer_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.' + ) + .optional(), + /** The status of the blik payments capability of the account, or whether the account can directly process blik charges. */ + blik_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the blik payments capability of the account, or whether the account can directly process blik charges.' + ) + .optional(), + /** The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. */ + boleto_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.' + ) + .optional(), + /** The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards */ + card_issuing: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards' + ) + .optional(), + /** The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. */ + card_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. */ + cashapp_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.' + ) + .optional(), + /** The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. */ + eps_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.' + ) + .optional(), + /** The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. */ + fpx_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. */ + giropay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the giropay payments capability of the account, or whether the account can directly process giropay charges.' + ) + .optional(), + /** The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. */ + grabpay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.' + ) + .optional(), + /** The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. */ + ideal_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. */ + kakao_pay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments.' + ) + .optional(), + /** The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. */ + klarna_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges.' + ) + .optional(), + /** The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. */ + konbini_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the konbini payments capability of the account, or whether the account can directly process konbini charges.' + ) + .optional(), + /** The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. */ + kr_card_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the KrCard capability of the account, or whether the account can directly process KrCard payments.' + ) + .optional(), + /** The status of the legacy payments capability of the account. */ + legacy_payments: z + .enum(['active', 'inactive', 'pending']) + .describe('The status of the legacy payments capability of the account.') + .optional(), + /** The status of the link_payments capability of the account, or whether the account can directly process Link charges. */ + link_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the link_payments capability of the account, or whether the account can directly process Link charges.' + ) + .optional(), + /** The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. */ + mobilepay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.' + ) + .optional(), + /** The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. */ + multibanco_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. */ + naver_pay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.' + ) + .optional(), + /** The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. */ + oxxo_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.' + ) + .optional(), + /** The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. */ + p24_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the P24 payments capability of the account, or whether the account can directly process P24 charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.' + ) + .optional(), + /** The status of the Payco capability of the account, or whether the account can directly process Payco payments. */ + payco_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Payco capability of the account, or whether the account can directly process Payco payments.' + ) + .optional(), + /** The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. */ + paynow_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.' + ) + .optional(), + /** The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. */ + promptpay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.' + ) + .optional(), + /** The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. */ + revolut_pay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.' + ) + .optional(), + /** The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. */ + samsung_pay_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.' + ) + .optional(), + /** The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. */ + sofort_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.' + ) + .optional(), + /** The status of the Swish capability of the account, or whether the account can directly process Swish payments. */ + swish_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Swish capability of the account, or whether the account can directly process Swish payments.' + ) + .optional(), + /** The status of the tax reporting 1099-K (US) capability of the account. */ + tax_reporting_us_1099_k: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the tax reporting 1099-K (US) capability of the account.' + ) + .optional(), + /** The status of the tax reporting 1099-MISC (US) capability of the account. */ + tax_reporting_us_1099_misc: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the tax reporting 1099-MISC (US) capability of the account.' + ) + .optional(), + /** The status of the transfers capability of the account, or whether your platform can transfer funds to the account. */ + transfers: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the transfers capability of the account, or whether your platform can transfer funds to the account.' + ) + .optional(), + /** The status of the banking capability, or whether the account can have bank accounts. */ + treasury: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the banking capability, or whether the account can have bank accounts.' + ) + .optional(), + /** The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. */ + twint_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.' + ) + .optional(), + /** 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: z + .enum(['active', 'inactive', 'pending']) + .describe( + '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.' + ) + .optional(), + /** The status of the Zip capability of the account, or whether the account can directly process Zip charges. */ + zip_payments: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The status of the Zip capability of the account, or whether the account can directly process Zip charges.' + ) + .optional() + }) + export type AccountCapabilities = z.infer + + export const LegalEntityJapanAddressSchema = z.object({ + /** City/Ward. */ + city: z.string().max(5000).nullable().describe('City/Ward.').optional(), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ) + .optional(), + /** Block/Building number. */ + line1: z + .string() + .max(5000) + .nullable() + .describe('Block/Building number.') + .optional(), + /** Building details. */ + line2: z + .string() + .max(5000) + .nullable() + .describe('Building details.') + .optional(), + /** ZIP or postal code. */ + postal_code: z + .string() + .max(5000) + .nullable() + .describe('ZIP or postal code.') + .optional(), + /** Prefecture. */ + state: z.string().max(5000).nullable().describe('Prefecture.').optional(), + /** Town/cho-me. */ + town: z.string().max(5000).nullable().describe('Town/cho-me.').optional() + }) + export type LegalEntityJapanAddress = z.infer< + typeof LegalEntityJapanAddressSchema + > + + export const LegalEntityDirectorshipDeclarationSchema = z.object({ + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the directorship declaration attestation was made.' + ) + .optional(), + /** The IP address from which the directorship declaration attestation was made. */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the directorship declaration attestation was made.' + ) + .optional(), + /** The user-agent string from the browser where the directorship declaration attestation was made. */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The user-agent string from the browser where the directorship declaration attestation was made.' + ) + .optional() + }) + export type LegalEntityDirectorshipDeclaration = z.infer< + typeof LegalEntityDirectorshipDeclarationSchema + > + + export const LegalEntityUboDeclarationSchema = z.object({ + /** The Unix timestamp marking when the beneficial owner attestation was made. */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the beneficial owner attestation was made.' + ) + .optional(), + /** The IP address from which the beneficial owner attestation was made. */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the beneficial owner attestation was made.' + ) + .optional(), + /** The user-agent string from the browser where the beneficial owner attestation was made. */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The user-agent string from the browser where the beneficial owner attestation was made.' + ) + .optional() + }) + export type LegalEntityUboDeclaration = z.infer< + typeof LegalEntityUboDeclarationSchema + > + + export const AccountUnificationAccountControllerFeesSchema = z.object({ + /** 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: z + .enum([ + 'account', + 'application', + 'application_custom', + 'application_express' + ]) + .describe( + '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).' + ) + }) + export type AccountUnificationAccountControllerFees = z.infer< + typeof AccountUnificationAccountControllerFeesSchema + > + + export const AccountUnificationAccountControllerLossesSchema = z.object({ + /** A value indicating who is liable when this account can't pay back negative balances from payments. */ + payments: z + .enum(['application', 'stripe']) + .describe( + "A value indicating who is liable when this account can't pay back negative balances from payments." + ) + }) + export type AccountUnificationAccountControllerLosses = z.infer< + typeof AccountUnificationAccountControllerLossesSchema + > + + export const AccountUnificationAccountControllerStripeDashboardSchema = + z.object({ + /** A value indicating the Stripe dashboard this account has access to independent of the Connect application. */ + type: z + .enum(['express', 'full', 'none']) + .describe( + 'A value indicating the Stripe dashboard this account has access to independent of the Connect application.' + ) + }) + export type AccountUnificationAccountControllerStripeDashboard = z.infer< + typeof AccountUnificationAccountControllerStripeDashboardSchema + > + + export const CustomerBalanceCustomerBalanceSettingsSchema = z.object({ + /** The configuration for how funds that land in the customer cash balance are reconciled. */ + reconciliation_mode: z + .enum(['automatic', 'manual']) + .describe( + 'The configuration for how funds that land in the customer cash balance are reconciled.' + ), + /** A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance */ + using_merchant_default: z + .boolean() + .describe( + "A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance" + ) + }) + export type CustomerBalanceCustomerBalanceSettings = z.infer< + typeof CustomerBalanceCustomerBalanceSettingsSchema + > + + export const DeletedCustomerSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('customer') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedCustomer = z.infer + + export const TokenCardNetworksSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type TokenCardNetworks = z.infer + + export const SourceTypeAchCreditTransferSchema = z.object({ + account_number: z.string().nullable().optional(), + bank_name: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + refund_account_holder_name: z.string().nullable().optional(), + refund_account_holder_type: z.string().nullable().optional(), + refund_routing_number: z.string().nullable().optional(), + routing_number: z.string().nullable().optional(), + swift_code: z.string().nullable().optional() + }) + export type SourceTypeAchCreditTransfer = z.infer< + typeof SourceTypeAchCreditTransferSchema + > + + export const SourceTypeAchDebitSchema = z.object({ + bank_name: z.string().nullable().optional(), + country: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + routing_number: z.string().nullable().optional(), + type: z.string().nullable().optional() + }) + export type SourceTypeAchDebit = z.infer + + export const SourceTypeAcssDebitSchema = z.object({ + bank_address_city: z.string().nullable().optional(), + bank_address_line_1: z.string().nullable().optional(), + bank_address_line_2: z.string().nullable().optional(), + bank_address_postal_code: z.string().nullable().optional(), + bank_name: z.string().nullable().optional(), + category: z.string().nullable().optional(), + country: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + routing_number: z.string().nullable().optional() + }) + export type SourceTypeAcssDebit = z.infer + + export const SourceTypeAlipaySchema = z.object({ + data_string: z.string().nullable().optional(), + native_url: z.string().nullable().optional(), + statement_descriptor: z.string().nullable().optional() + }) + export type SourceTypeAlipay = z.infer + + export const SourceTypeAuBecsDebitSchema = z.object({ + bsb_number: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional() + }) + export type SourceTypeAuBecsDebit = z.infer< + typeof SourceTypeAuBecsDebitSchema + > + + export const SourceTypeBancontactSchema = z.object({ + bank_code: z.string().nullable().optional(), + bank_name: z.string().nullable().optional(), + bic: z.string().nullable().optional(), + iban_last4: z.string().nullable().optional(), + preferred_language: z.string().nullable().optional(), + statement_descriptor: z.string().nullable().optional() + }) + export type SourceTypeBancontact = z.infer + + export const SourceTypeCardSchema = z.object({ + address_line1_check: z.string().nullable().optional(), + address_zip_check: z.string().nullable().optional(), + brand: z.string().nullable().optional(), + country: z.string().nullable().optional(), + cvc_check: z.string().nullable().optional(), + dynamic_last4: z.string().nullable().optional(), + exp_month: z.number().int().nullable().optional(), + exp_year: z.number().int().nullable().optional(), + fingerprint: z.string().optional(), + funding: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + name: z.string().nullable().optional(), + three_d_secure: z.string().optional(), + tokenization_method: z.string().nullable().optional() + }) + export type SourceTypeCard = z.infer + + export const SourceTypeCardPresentSchema = z.object({ + application_cryptogram: z.string().optional(), + application_preferred_name: z.string().optional(), + authorization_code: z.string().nullable().optional(), + authorization_response_code: z.string().optional(), + brand: z.string().nullable().optional(), + country: z.string().nullable().optional(), + cvm_type: z.string().optional(), + data_type: z.string().nullable().optional(), + dedicated_file_name: z.string().optional(), + emv_auth_data: z.string().optional(), + evidence_customer_signature: z.string().nullable().optional(), + evidence_transaction_certificate: z.string().nullable().optional(), + exp_month: z.number().int().nullable().optional(), + exp_year: z.number().int().nullable().optional(), + fingerprint: z.string().optional(), + funding: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + pos_device_id: z.string().nullable().optional(), + pos_entry_mode: z.string().optional(), + read_method: z.string().nullable().optional(), + reader: z.string().nullable().optional(), + terminal_verification_results: z.string().optional(), + transaction_status_information: z.string().optional() + }) + export type SourceTypeCardPresent = z.infer< + typeof SourceTypeCardPresentSchema + > + + export const SourceCodeVerificationFlowSchema = z.object({ + /** The number of attempts remaining to authenticate the source object with a verification code. */ + attempts_remaining: z + .number() + .int() + .describe( + 'The number of attempts remaining to authenticate the source object with a verification code.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ) + }) + export type SourceCodeVerificationFlow = z.infer< + typeof SourceCodeVerificationFlowSchema + > + + export const SourceTypeEpsSchema = z.object({ + reference: z.string().nullable().optional(), + statement_descriptor: z.string().nullable().optional() + }) + export type SourceTypeEps = z.infer + + export const SourceTypeGiropaySchema = z.object({ + bank_code: z.string().nullable().optional(), + bank_name: z.string().nullable().optional(), + bic: z.string().nullable().optional(), + statement_descriptor: z.string().nullable().optional() + }) + export type SourceTypeGiropay = z.infer + + export const SourceTypeIdealSchema = z.object({ + bank: z.string().nullable().optional(), + bic: z.string().nullable().optional(), + iban_last4: z.string().nullable().optional(), + statement_descriptor: z.string().nullable().optional() + }) + export type SourceTypeIdeal = z.infer + + export const SourceTypeKlarnaSchema = z.object({ + background_image_url: z.string().optional(), + client_token: z.string().nullable().optional(), + first_name: z.string().optional(), + last_name: z.string().optional(), + locale: z.string().optional(), + logo_url: z.string().optional(), + page_title: z.string().optional(), + pay_later_asset_urls_descriptive: z.string().optional(), + pay_later_asset_urls_standard: z.string().optional(), + pay_later_name: z.string().optional(), + pay_later_redirect_url: z.string().optional(), + pay_now_asset_urls_descriptive: z.string().optional(), + pay_now_asset_urls_standard: z.string().optional(), + pay_now_name: z.string().optional(), + pay_now_redirect_url: z.string().optional(), + pay_over_time_asset_urls_descriptive: z.string().optional(), + pay_over_time_asset_urls_standard: z.string().optional(), + pay_over_time_name: z.string().optional(), + pay_over_time_redirect_url: z.string().optional(), + payment_method_categories: z.string().optional(), + purchase_country: z.string().optional(), + purchase_type: z.string().optional(), + redirect_url: z.string().optional(), + shipping_delay: z.number().int().optional(), + shipping_first_name: z.string().optional(), + shipping_last_name: z.string().optional() + }) + export type SourceTypeKlarna = z.infer + + export const SourceTypeMultibancoSchema = z.object({ + entity: z.string().nullable().optional(), + reference: z.string().nullable().optional(), + refund_account_holder_address_city: z.string().nullable().optional(), + refund_account_holder_address_country: z.string().nullable().optional(), + refund_account_holder_address_line1: z.string().nullable().optional(), + refund_account_holder_address_line2: z.string().nullable().optional(), + refund_account_holder_address_postal_code: z.string().nullable().optional(), + refund_account_holder_address_state: z.string().nullable().optional(), + refund_account_holder_name: z.string().nullable().optional(), + refund_iban: z.string().nullable().optional() + }) + export type SourceTypeMultibanco = z.infer + + export const SourceTypeP24Schema = z.object({ + reference: z.string().nullable().optional() + }) + export type SourceTypeP24 = z.infer + + export const SourceReceiverFlowSchema = z.object({ + /** The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. */ + address: z + .string() + .max(5000) + .nullable() + .describe( + 'The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.' + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ), + /** 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: z + .number() + .int() + .describe( + "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." + ), + /** The total amount that was returned to the customer. The amount returned is expressed in the source's currency. */ + amount_returned: z + .number() + .int() + .describe( + "The total amount that was returned to the customer. The amount returned is expressed in the source's currency." + ), + /** Type of refund attribute method, one of `email`, `manual`, or `none`. */ + refund_attributes_method: z + .string() + .max(5000) + .describe( + 'Type of refund attribute method, one of `email`, `manual`, or `none`.' + ), + /** Type of refund attribute status, one of `missing`, `requested`, or `available`. */ + refund_attributes_status: z + .string() + .max(5000) + .describe( + 'Type of refund attribute status, one of `missing`, `requested`, or `available`.' + ) + }) + export type SourceReceiverFlow = z.infer + + export const SourceRedirectFlowSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** The URL you provide to redirect the customer to after they authenticated their payment. */ + return_url: z + .string() + .max(5000) + .describe( + 'The URL you provide to redirect the customer to after they authenticated their payment.' + ), + /** The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). */ + status: z + .string() + .max(5000) + .describe( + 'The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).' + ), + /** The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ + url: z + .string() + .max(2048) + .describe( + 'The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.' + ) + }) + export type SourceRedirectFlow = z.infer + + export const SourceTypeSepaDebitSchema = z.object({ + bank_code: z.string().nullable().optional(), + branch_code: z.string().nullable().optional(), + country: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + mandate_reference: z.string().nullable().optional(), + mandate_url: z.string().nullable().optional() + }) + export type SourceTypeSepaDebit = z.infer + + export const SourceTypeSofortSchema = z.object({ + bank_code: z.string().nullable().optional(), + bank_name: z.string().nullable().optional(), + bic: z.string().nullable().optional(), + country: z.string().nullable().optional(), + iban_last4: z.string().nullable().optional(), + preferred_language: z.string().nullable().optional(), + statement_descriptor: z.string().nullable().optional() + }) + export type SourceTypeSofort = z.infer + + export const SourceOrderItemSchema = z.object({ + /** The amount (price) for this order item. */ + amount: z + .number() + .int() + .nullable() + .describe('The amount (price) for this order item.') + .optional(), + /** This currency of this order item. Required when `amount` is present. */ + currency: z + .string() + .max(5000) + .nullable() + .describe( + 'This currency of this order item. Required when `amount` is present.' + ) + .optional(), + /** Human-readable description for this order item. */ + description: z + .string() + .max(5000) + .nullable() + .describe('Human-readable description for this order item.') + .optional(), + /** The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ + parent: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).' + ) + .optional(), + /** The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. */ + quantity: z + .number() + .int() + .describe( + 'The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.' + ) + .optional(), + /** The type of this order item. Must be `sku`, `tax`, or `shipping`. */ + type: z + .string() + .max(5000) + .nullable() + .describe( + 'The type of this order item. Must be `sku`, `tax`, or `shipping`.' + ) + .optional() + }) + export type SourceOrderItem = z.infer + + export const SourceTypeThreeDSecureSchema = z.object({ + address_line1_check: z.string().nullable().optional(), + address_zip_check: z.string().nullable().optional(), + authenticated: z.boolean().nullable().optional(), + brand: z.string().nullable().optional(), + card: z.string().nullable().optional(), + country: z.string().nullable().optional(), + customer: z.string().nullable().optional(), + cvc_check: z.string().nullable().optional(), + dynamic_last4: z.string().nullable().optional(), + exp_month: z.number().int().nullable().optional(), + exp_year: z.number().int().nullable().optional(), + fingerprint: z.string().optional(), + funding: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + name: z.string().nullable().optional(), + three_d_secure: z.string().optional(), + tokenization_method: z.string().nullable().optional() + }) + export type SourceTypeThreeDSecure = z.infer< + typeof SourceTypeThreeDSecureSchema + > + + export const SourceTypeWechatSchema = z.object({ + prepay_id: z.string().optional(), + qr_code_url: z.string().nullable().optional(), + statement_descriptor: z.string().optional() + }) + export type SourceTypeWechat = z.infer + + export const CouponAppliesToSchema = z.object({ + /** A list of product IDs this coupon applies to */ + products: z + .array(z.string().max(5000)) + .describe('A list of product IDs this coupon applies to') + }) + export type CouponAppliesTo = z.infer + + export const CouponCurrencyOptionSchema = z.object({ + /** Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: z + .number() + .int() + .describe( + 'Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.' + ) + }) + export type CouponCurrencyOption = z.infer + + export const PromotionCodeCurrencyOptionSchema = z.object({ + /** Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: z + .number() + .int() + .describe( + 'Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).' + ) + }) + export type PromotionCodeCurrencyOption = z.infer< + typeof PromotionCodeCurrencyOptionSchema + > + + export const InvoiceSettingCustomFieldSchema = z.object({ + /** The name of the custom field. */ + name: z.string().max(5000).describe('The name of the custom field.'), + /** The value of the custom field. */ + value: z.string().max(5000).describe('The value of the custom field.') + }) + export type InvoiceSettingCustomField = z.infer< + typeof InvoiceSettingCustomFieldSchema + > + + export const PaymentMethodAcssDebitSchema = z.object({ + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Institution number of the bank account. */ + institution_number: z + .string() + .max(5000) + .nullable() + .describe('Institution number of the bank account.') + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** Transit number of the bank account. */ + transit_number: z + .string() + .max(5000) + .nullable() + .describe('Transit number of the bank account.') + .optional() + }) + export type PaymentMethodAcssDebit = z.infer< + typeof PaymentMethodAcssDebitSchema + > + + export const PaymentMethodAffirmSchema = z.object({}) + export type PaymentMethodAffirm = z.infer + + export const PaymentMethodAfterpayClearpaySchema = z.object({}) + export type PaymentMethodAfterpayClearpay = z.infer< + typeof PaymentMethodAfterpayClearpaySchema + > + + export const PaymentFlowsPrivatePaymentMethodsAlipaySchema = z.object({}) + export type PaymentFlowsPrivatePaymentMethodsAlipay = z.infer< + typeof PaymentFlowsPrivatePaymentMethodsAlipaySchema + > + + export const PaymentMethodAlmaSchema = z.object({}) + export type PaymentMethodAlma = z.infer + + export const PaymentMethodAmazonPaySchema = z.object({}) + export type PaymentMethodAmazonPay = z.infer< + typeof PaymentMethodAmazonPaySchema + > + + export const PaymentMethodAuBecsDebitSchema = z.object({ + /** Six-digit number identifying bank and branch associated with this bank account. */ + bsb_number: z + .string() + .max(5000) + .nullable() + .describe( + 'Six-digit number identifying bank and branch associated with this bank account.' + ) + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional() + }) + export type PaymentMethodAuBecsDebit = z.infer< + typeof PaymentMethodAuBecsDebitSchema + > + + export const PaymentMethodBacsDebitSchema = z.object({ + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** Sort code of the bank account. (e.g., `10-20-30`) */ + sort_code: z + .string() + .max(5000) + .nullable() + .describe('Sort code of the bank account. (e.g., `10-20-30`)') + .optional() + }) + export type PaymentMethodBacsDebit = z.infer< + typeof PaymentMethodBacsDebitSchema + > + + export const PaymentMethodBancontactSchema = z.object({}) + export type PaymentMethodBancontact = z.infer< + typeof PaymentMethodBancontactSchema + > + + export const PaymentMethodBlikSchema = z.object({}) + export type PaymentMethodBlik = z.infer + + export const PaymentMethodBoletoSchema = z.object({ + /** Uniquely identifies the customer tax id (CNPJ or CPF) */ + tax_id: z + .string() + .max(5000) + .describe('Uniquely identifies the customer tax id (CNPJ or CPF)') + }) + export type PaymentMethodBoleto = z.infer + + export const PaymentMethodCardChecksSchema = z.object({ + /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional() + }) + export type PaymentMethodCardChecks = z.infer< + typeof PaymentMethodCardChecksSchema + > + + export const PaymentMethodDetailsCardPresentOfflineSchema = z.object({ + /** Time at which the payment was collected while offline */ + stored_at: z + .number() + .int() + .nullable() + .describe('Time at which the payment was collected while offline') + .optional(), + /** The method used to process this payment method offline. Only deferred is allowed. */ + type: z + .literal('deferred') + .nullable() + .describe( + 'The method used to process this payment method offline. Only deferred is allowed.' + ) + .optional() + }) + export type PaymentMethodDetailsCardPresentOffline = z.infer< + typeof PaymentMethodDetailsCardPresentOfflineSchema + > + + export const PaymentMethodDetailsCardPresentReceiptSchema = z.object({ + /** The type of account being debited or credited */ + account_type: z + .enum(['checking', 'credit', 'prepaid', 'unknown']) + .describe('The type of account being debited or credited') + .optional(), + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram: z + .string() + .max(5000) + .nullable() + .describe( + 'EMV tag 9F26, cryptogram generated by the integrated circuit chip.' + ) + .optional(), + /** Mnenomic of the Application Identifier. */ + application_preferred_name: z + .string() + .max(5000) + .nullable() + .describe('Mnenomic of the Application Identifier.') + .optional(), + /** Identifier for this transaction. */ + authorization_code: z + .string() + .max(5000) + .nullable() + .describe('Identifier for this transaction.') + .optional(), + /** EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code: z + .string() + .max(5000) + .nullable() + .describe('EMV tag 8A. A code returned by the card issuer.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name: z + .string() + .max(5000) + .nullable() + .describe( + 'EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.' + ) + .optional(), + /** The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results: z + .string() + .max(5000) + .nullable() + .describe( + 'The outcome of a series of EMV functions performed by the card reader.' + ) + .optional(), + /** An indication of various EMV functions performed during the transaction. */ + transaction_status_information: z + .string() + .max(5000) + .nullable() + .describe( + 'An indication of various EMV functions performed during the transaction.' + ) + .optional() + }) + export type PaymentMethodDetailsCardPresentReceipt = z.infer< + typeof PaymentMethodDetailsCardPresentReceiptSchema + > + + export const PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletSchema = + z.object({ + /** The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. */ + type: z + .enum(['apple_pay', 'google_pay', 'samsung_pay', 'unknown']) + .describe( + 'The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.' + ) + }) + export type PaymentFlowsPrivatePaymentMethodsCardPresentCommonWallet = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletSchema + > + + export const ApplicationSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The name of the application. */ + name: z + .string() + .max(5000) + .nullable() + .describe('The name of the application.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('application') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type Application = z.infer + + export const SetupAttemptPaymentMethodDetailsAcssDebitSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsAcssDebit = z.infer< + typeof SetupAttemptPaymentMethodDetailsAcssDebitSchema + > + + export const SetupAttemptPaymentMethodDetailsAmazonPaySchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsAmazonPay = z.infer< + typeof SetupAttemptPaymentMethodDetailsAmazonPaySchema + > + + export const SetupAttemptPaymentMethodDetailsAuBecsDebitSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsAuBecsDebit = z.infer< + typeof SetupAttemptPaymentMethodDetailsAuBecsDebitSchema + > + + export const SetupAttemptPaymentMethodDetailsBacsDebitSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsBacsDebit = z.infer< + typeof SetupAttemptPaymentMethodDetailsBacsDebitSchema + > + + export const OfflineAcceptanceSchema = z.object({}) + export type OfflineAcceptance = z.infer + + export const OnlineAcceptanceSchema = z.object({ + /** The customer accepts the mandate from this IP address. */ + ip_address: z + .string() + .max(5000) + .nullable() + .describe('The customer accepts the mandate from this IP address.') + .optional(), + /** The customer accepts the mandate using the user agent of the browser. */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The customer accepts the mandate using the user agent of the browser.' + ) + .optional() + }) + export type OnlineAcceptance = z.infer + + export const MandateMultiUseSchema = z.object({}) + export type MandateMultiUse = z.infer + + export const MandateAcssDebitSchema = z.object({ + /** List of Stripe products where this mandate can be selected automatically. */ + default_for: z + .array(z.enum(['invoice', 'subscription'])) + .describe( + 'List of Stripe products where this mandate can be selected automatically.' + ) + .optional(), + /** Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description: z + .string() + .max(5000) + .nullable() + .describe( + "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'." + ) + .optional(), + /** Payment schedule for the mandate. */ + payment_schedule: z + .enum(['combined', 'interval', 'sporadic']) + .describe('Payment schedule for the mandate.'), + /** Transaction type of the mandate. */ + transaction_type: z + .enum(['business', 'personal']) + .describe('Transaction type of the mandate.') + }) + export type MandateAcssDebit = z.infer + + export const MandateAmazonPaySchema = z.object({}) + export type MandateAmazonPay = z.infer + + export const MandateAuBecsDebitSchema = z.object({ + /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: z + .string() + .max(5000) + .describe( + 'The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.' + ) + }) + export type MandateAuBecsDebit = z.infer + + export const MandateBacsDebitSchema = z.object({ + /** The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. */ + network_status: z + .enum(['accepted', 'pending', 'refused', 'revoked']) + .describe( + 'The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.' + ), + /** The unique reference identifying the mandate on the Bacs network. */ + reference: z + .string() + .max(5000) + .describe( + 'The unique reference identifying the mandate on the Bacs network.' + ), + /** When the mandate is revoked on the Bacs network this field displays the reason for the revocation. */ + revocation_reason: z + .enum([ + 'account_closed', + 'bank_account_restricted', + 'bank_ownership_changed', + 'could_not_process', + 'debit_not_authorized' + ]) + .nullable() + .describe( + 'When the mandate is revoked on the Bacs network this field displays the reason for the revocation.' + ) + .optional(), + /** The URL that will contain the mandate that the customer has signed. */ + url: z + .string() + .max(5000) + .describe( + 'The URL that will contain the mandate that the customer has signed.' + ) + }) + export type MandateBacsDebit = z.infer + + export const CardMandatePaymentMethodDetailsSchema = z.object({}) + export type CardMandatePaymentMethodDetails = z.infer< + typeof CardMandatePaymentMethodDetailsSchema + > + + export const MandateCashappSchema = z.object({}) + export type MandateCashapp = z.infer + + export const MandateKakaoPaySchema = z.object({}) + export type MandateKakaoPay = z.infer + + export const MandateKrCardSchema = z.object({}) + export type MandateKrCard = z.infer + + export const MandateLinkSchema = z.object({}) + export type MandateLink = z.infer + + export const MandatePaypalSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.' + ) + .optional(), + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + payer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'PayPal account PayerID. This identifier uniquely identifies the PayPal customer.' + ) + .optional() + }) + export type MandatePaypal = z.infer + + export const MandateRevolutPaySchema = z.object({}) + export type MandateRevolutPay = z.infer + + export const MandateSepaDebitSchema = z.object({ + /** The unique reference of the mandate. */ + reference: z + .string() + .max(5000) + .describe('The unique reference of the mandate.'), + /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: z + .string() + .max(5000) + .describe( + 'The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.' + ) + }) + export type MandateSepaDebit = z.infer + + export const MandateUsBankAccountSchema = z.object({ + /** Mandate collection method */ + collection_method: z + .literal('paper') + .describe('Mandate collection method') + .optional() + }) + export type MandateUsBankAccount = z.infer + + export const MandateSingleUseSchema = z.object({ + /** The amount of the payment on a single use mandate. */ + amount: z + .number() + .int() + .describe('The amount of the payment on a single use mandate.'), + /** The currency of the payment on a single use mandate. */ + currency: z + .string() + .describe('The currency of the payment on a single use mandate.') + }) + export type MandateSingleUse = z.infer + + export const SetupAttemptPaymentMethodDetailsBoletoSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsBoleto = z.infer< + typeof SetupAttemptPaymentMethodDetailsBoletoSchema + > + + export const SetupAttemptPaymentMethodDetailsCardChecksSchema = z.object({ + /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional() + }) + export type SetupAttemptPaymentMethodDetailsCardChecks = z.infer< + typeof SetupAttemptPaymentMethodDetailsCardChecksSchema + > + + export const ThreeDSecureDetailsSchema = z.object({ + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ + authentication_flow: z + .enum(['challenge', 'frictionless']) + .nullable() + .describe( + 'For authenticated transactions: how the customer was authenticated by\nthe issuing bank.' + ) + .optional(), + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ + electronic_commerce_indicator: z + .enum(['01', '02', '05', '06', '07']) + .nullable() + .describe( + 'The Electronic Commerce Indicator (ECI). A protocol-level field\nindicating what degree of authentication was performed.' + ) + .optional(), + /** Indicates the outcome of 3D Secure authentication. */ + result: z + .enum([ + 'attempt_acknowledged', + 'authenticated', + 'exempted', + 'failed', + 'not_supported', + 'processing_error' + ]) + .nullable() + .describe('Indicates the outcome of 3D Secure authentication.') + .optional(), + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ + result_reason: z + .enum([ + 'abandoned', + 'bypassed', + 'canceled', + 'card_not_enrolled', + 'network_not_supported', + 'protocol_error', + 'rejected' + ]) + .nullable() + .describe( + 'Additional information about why 3D Secure succeeded or failed based\non the `result`.' + ) + .optional(), + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe( + 'The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID\n(dsTransId) for this payment.' + ) + .optional(), + /** The version of 3D Secure that was used. */ + version: z + .enum(['1.0.2', '2.1.0', '2.2.0']) + .nullable() + .describe('The version of 3D Secure that was used.') + .optional() + }) + export type ThreeDSecureDetails = z.infer + + export const PaymentMethodDetailsCardWalletApplePaySchema = z.object({}) + export type PaymentMethodDetailsCardWalletApplePay = z.infer< + typeof PaymentMethodDetailsCardWalletApplePaySchema + > + + export const PaymentMethodDetailsCardWalletGooglePaySchema = z.object({}) + export type PaymentMethodDetailsCardWalletGooglePay = z.infer< + typeof PaymentMethodDetailsCardWalletGooglePaySchema + > + + export const SetupAttemptPaymentMethodDetailsCashappSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsCashapp = z.infer< + typeof SetupAttemptPaymentMethodDetailsCashappSchema + > + + export const SetupAttemptPaymentMethodDetailsKakaoPaySchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsKakaoPay = z.infer< + typeof SetupAttemptPaymentMethodDetailsKakaoPaySchema + > + + export const SetupAttemptPaymentMethodDetailsKlarnaSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsKlarna = z.infer< + typeof SetupAttemptPaymentMethodDetailsKlarnaSchema + > + + export const SetupAttemptPaymentMethodDetailsKrCardSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsKrCard = z.infer< + typeof SetupAttemptPaymentMethodDetailsKrCardSchema + > + + export const SetupAttemptPaymentMethodDetailsLinkSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsLink = z.infer< + typeof SetupAttemptPaymentMethodDetailsLinkSchema + > + + export const SetupAttemptPaymentMethodDetailsPaypalSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsPaypal = z.infer< + typeof SetupAttemptPaymentMethodDetailsPaypalSchema + > + + export const SetupAttemptPaymentMethodDetailsRevolutPaySchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsRevolutPay = z.infer< + typeof SetupAttemptPaymentMethodDetailsRevolutPaySchema + > + + export const SetupAttemptPaymentMethodDetailsSepaDebitSchema = z.object({}) + export type SetupAttemptPaymentMethodDetailsSepaDebit = z.infer< + typeof SetupAttemptPaymentMethodDetailsSepaDebitSchema + > + + export const SetupAttemptPaymentMethodDetailsUsBankAccountSchema = z.object( + {} + ) + export type SetupAttemptPaymentMethodDetailsUsBankAccount = z.infer< + typeof SetupAttemptPaymentMethodDetailsUsBankAccountSchema + > + + export const PaymentFlowsAmountDetailsClientResourceTipSchema = z.object({ + /** Portion of the amount that corresponds to a tip. */ + amount: z + .number() + .int() + .describe('Portion of the amount that corresponds to a tip.') + .optional() + }) + export type PaymentFlowsAmountDetailsClientResourceTip = z.infer< + typeof PaymentFlowsAmountDetailsClientResourceTipSchema + > + + export const PaymentFlowsAutomaticPaymentMethodsPaymentIntentSchema = + z.object({ + /** + * 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: z + .enum(['always', 'never']) + .describe( + "Controls whether this PaymentIntent will accept redirect-based payment methods.\n\nRedirect-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." + ) + .optional(), + /** Automatically calculates compatible payment methods */ + enabled: z + .boolean() + .describe('Automatically calculates compatible payment methods') + }) + export type PaymentFlowsAutomaticPaymentMethodsPaymentIntent = z.infer< + typeof PaymentFlowsAutomaticPaymentMethodsPaymentIntentSchema + > + + export const TaxIdVerificationSchema = z.object({ + /** Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. */ + status: z + .enum(['pending', 'unavailable', 'unverified', 'verified']) + .describe( + 'Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.' + ), + /** Verified address. */ + verified_address: z + .string() + .max(5000) + .nullable() + .describe('Verified address.') + .optional(), + /** Verified name. */ + verified_name: z + .string() + .max(5000) + .nullable() + .describe('Verified name.') + .optional() + }) + export type TaxIdVerification = z.infer + + export const DeletedTaxIdSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax_id') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedTaxId = z.infer + + export const DeletedApplicationSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The name of the application. */ + name: z + .string() + .max(5000) + .nullable() + .describe('The name of the application.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('application') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedApplication = z.infer + + export const FeeSchema = z.object({ + /** Amount of the fee, in cents. */ + amount: z.number().int().describe('Amount of the fee, in cents.'), + /** ID of the Connect application that earned the fee. */ + application: z + .string() + .max(5000) + .nullable() + .describe('ID of the Connect application that earned the fee.') + .optional(), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. */ + type: z + .string() + .max(5000) + .describe( + 'Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.' + ) + }) + export type Fee = z.infer + + export const CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferSchema = + z.object({ + /** The BIC of the bank of the sender of the funding. */ + bic: z + .string() + .max(5000) + .nullable() + .describe('The BIC of the bank of the sender of the funding.') + .optional(), + /** The last 4 digits of the IBAN of the sender of the funding. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('The last 4 digits of the IBAN of the sender of the funding.') + .optional(), + /** The full name of the sender, as supplied by the sending bank. */ + sender_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The full name of the sender, as supplied by the sending bank.' + ) + .optional() + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferSchema = + z.object({ + /** The last 4 digits of the account number of the sender of the funding. */ + account_number_last4: z + .string() + .max(5000) + .nullable() + .describe( + 'The last 4 digits of the account number of the sender of the funding.' + ) + .optional(), + /** The full name of the sender, as supplied by the sending bank. */ + sender_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The full name of the sender, as supplied by the sending bank.' + ) + .optional(), + /** The sort code of the bank of the sender of the funding */ + sort_code: z + .string() + .max(5000) + .nullable() + .describe('The sort code of the bank of the sender of the funding') + .optional() + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferSchema = + z.object({ + /** The name of the bank of the sender of the funding. */ + sender_bank: z + .string() + .max(5000) + .nullable() + .describe('The name of the bank of the sender of the funding.') + .optional(), + /** The name of the bank branch of the sender of the funding. */ + sender_branch: z + .string() + .max(5000) + .nullable() + .describe('The name of the bank branch of the sender of the funding.') + .optional(), + /** The full name of the sender, as supplied by the sending bank. */ + sender_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The full name of the sender, as supplied by the sending bank.' + ) + .optional() + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferSchema = + z.object({ + /** The banking network used for this funding. */ + network: z + .enum(['ach', 'domestic_wire_us', 'swift']) + .describe('The banking network used for this funding.') + .optional(), + /** The full name of the sender, as supplied by the sending bank. */ + sender_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The full name of the sender, as supplied by the sending bank.' + ) + .optional() + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferSchema + > + + export const DestinationDetailsUnimplementedSchema = z.object({}) + export type DestinationDetailsUnimplemented = z.infer< + typeof DestinationDetailsUnimplementedSchema + > + + export const RefundDestinationDetailsBlikSchema = z.object({ + /** For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. */ + network_decline_code: z + .string() + .max(5000) + .nullable() + .describe( + 'For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.' + ) + .optional(), + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsBlik = z.infer< + typeof RefundDestinationDetailsBlikSchema + > + + export const RefundDestinationDetailsBrBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsBrBankTransfer = z.infer< + typeof RefundDestinationDetailsBrBankTransferSchema + > + + export const RefundDestinationDetailsCardSchema = z.object({ + /** Value of the reference number assigned to the refund. */ + reference: z + .string() + .max(5000) + .describe('Value of the reference number assigned to the refund.') + .optional(), + /** Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .describe( + 'Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional(), + /** Type of the reference number assigned to the refund. */ + reference_type: z + .string() + .max(5000) + .describe('Type of the reference number assigned to the refund.') + .optional(), + /** The type of refund. This can be `refund`, `reversal`, or `pending`. */ + type: z + .enum(['pending', 'refund', 'reversal']) + .describe( + 'The type of refund. This can be `refund`, `reversal`, or `pending`.' + ) + }) + export type RefundDestinationDetailsCard = z.infer< + typeof RefundDestinationDetailsCardSchema + > + + export const RefundDestinationDetailsEuBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsEuBankTransfer = z.infer< + typeof RefundDestinationDetailsEuBankTransferSchema + > + + export const RefundDestinationDetailsGbBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsGbBankTransfer = z.infer< + typeof RefundDestinationDetailsGbBankTransferSchema + > + + export const RefundDestinationDetailsJpBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsJpBankTransfer = z.infer< + typeof RefundDestinationDetailsJpBankTransferSchema + > + + export const RefundDestinationDetailsMultibancoSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsMultibanco = z.infer< + typeof RefundDestinationDetailsMultibancoSchema + > + + export const RefundDestinationDetailsMxBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsMxBankTransfer = z.infer< + typeof RefundDestinationDetailsMxBankTransferSchema + > + + export const RefundDestinationDetailsP24Schema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsP24 = z.infer< + typeof RefundDestinationDetailsP24Schema + > + + export const RefundDestinationDetailsSwishSchema = z.object({ + /** For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. */ + network_decline_code: z + .string() + .max(5000) + .nullable() + .describe( + 'For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.' + ) + .optional(), + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsSwish = z.infer< + typeof RefundDestinationDetailsSwishSchema + > + + export const RefundDestinationDetailsThBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsThBankTransfer = z.infer< + typeof RefundDestinationDetailsThBankTransferSchema + > + + export const RefundDestinationDetailsUsBankTransferSchema = z.object({ + /** The reference assigned to the refund. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The reference assigned to the refund.') + .optional(), + /** Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. */ + reference_status: z + .string() + .max(5000) + .nullable() + .describe( + 'Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.' + ) + .optional() + }) + export type RefundDestinationDetailsUsBankTransfer = z.infer< + typeof RefundDestinationDetailsUsBankTransferSchema + > + + export const EmailSentSchema = z.object({ + /** The timestamp when the email was sent. */ + email_sent_at: z + .number() + .int() + .describe('The timestamp when the email was sent.'), + /** The recipient's email address. */ + email_sent_to: z + .string() + .max(5000) + .describe("The recipient's email address.") + }) + export type EmailSent = z.infer + + export const DisputeTransactionShippingAddressSchema = z.object({ + /** City, district, suburb, town, or village. */ + city: z + .string() + .max(5000) + .nullable() + .describe('City, district, suburb, town, or village.') + .optional(), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ) + .optional(), + /** Address line 1 (e.g., street, PO Box, or company name). */ + line1: z + .string() + .max(5000) + .nullable() + .describe('Address line 1 (e.g., street, PO Box, or company name).') + .optional(), + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + line2: z + .string() + .max(5000) + .nullable() + .describe('Address line 2 (e.g., apartment, suite, unit, or building).') + .optional(), + /** ZIP or postal code. */ + postal_code: z + .string() + .max(5000) + .nullable() + .describe('ZIP or postal code.') + .optional(), + /** State, county, province, or region. */ + state: z + .string() + .max(5000) + .nullable() + .describe('State, county, province, or region.') + .optional() + }) + export type DisputeTransactionShippingAddress = z.infer< + typeof DisputeTransactionShippingAddressSchema + > + + export const DisputeEnhancedEvidenceVisaComplianceSchema = z.object({ + /** 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: z + .boolean() + .describe( + '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.' + ) + }) + export type DisputeEnhancedEvidenceVisaCompliance = z.infer< + typeof DisputeEnhancedEvidenceVisaComplianceSchema + > + + export const DisputeEnhancedEligibilityVisaCompellingEvidence3Schema = + z.object({ + /** List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. */ + required_actions: z + .array( + z.enum([ + 'missing_customer_identifiers', + 'missing_disputed_transaction_description', + 'missing_merchandise_or_services', + 'missing_prior_undisputed_transaction_description', + 'missing_prior_undisputed_transactions' + ]) + ) + .describe( + 'List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.' + ), + /** Visa Compelling Evidence 3.0 eligibility status. */ + status: z + .enum(['not_qualified', 'qualified', 'requires_action']) + .describe('Visa Compelling Evidence 3.0 eligibility status.') + }) + export type DisputeEnhancedEligibilityVisaCompellingEvidence3 = z.infer< + typeof DisputeEnhancedEligibilityVisaCompellingEvidence3Schema + > + + export const DisputeEnhancedEligibilityVisaComplianceSchema = z.object({ + /** Visa compliance eligibility status. */ + status: z + .enum(['fee_acknowledged', 'requires_fee_acknowledgement']) + .describe('Visa compliance eligibility status.') + }) + export type DisputeEnhancedEligibilityVisaCompliance = z.infer< + typeof DisputeEnhancedEligibilityVisaComplianceSchema + > + + export const DisputePaymentMethodDetailsAmazonPaySchema = z.object({ + /** The AmazonPay dispute type, chargeback or claim */ + dispute_type: z + .enum(['chargeback', 'claim']) + .nullable() + .describe('The AmazonPay dispute type, chargeback or claim') + .optional() + }) + export type DisputePaymentMethodDetailsAmazonPay = z.infer< + typeof DisputePaymentMethodDetailsAmazonPaySchema + > + + export const DisputePaymentMethodDetailsCardSchema = z.object({ + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ), + /** The type of dispute opened. Different case types may have varying fees and financial impact. */ + case_type: z + .enum(['chargeback', 'inquiry']) + .describe( + 'The type of dispute opened. Different case types may have varying fees and financial impact.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type DisputePaymentMethodDetailsCard = z.infer< + typeof DisputePaymentMethodDetailsCardSchema + > + + export const DisputePaymentMethodDetailsKlarnaSchema = z.object({ + /** The reason for the dispute as defined by Klarna */ + reason_code: z + .string() + .max(5000) + .nullable() + .describe('The reason for the dispute as defined by Klarna') + .optional() + }) + export type DisputePaymentMethodDetailsKlarna = z.infer< + typeof DisputePaymentMethodDetailsKlarnaSchema + > + + export const DisputePaymentMethodDetailsPaypalSchema = z.object({ + /** The ID of the dispute in PayPal. */ + case_id: z + .string() + .max(5000) + .nullable() + .describe('The ID of the dispute in PayPal.') + .optional(), + /** The reason for the dispute as defined by PayPal */ + reason_code: z + .string() + .max(5000) + .nullable() + .describe('The reason for the dispute as defined by PayPal') + .optional() + }) + export type DisputePaymentMethodDetailsPaypal = z.infer< + typeof DisputePaymentMethodDetailsPaypalSchema + > + + export const IssuingAuthorizationAmountDetailsSchema = z.object({ + /** The fee charged by the ATM for the cash withdrawal. */ + atm_fee: z + .number() + .int() + .nullable() + .describe('The fee charged by the ATM for the cash withdrawal.') + .optional(), + /** The amount of cash requested by the cardholder. */ + cashback_amount: z + .number() + .int() + .nullable() + .describe('The amount of cash requested by the cardholder.') + .optional() + }) + export type IssuingAuthorizationAmountDetails = z.infer< + typeof IssuingAuthorizationAmountDetailsSchema + > + + export const IssuingCardholderCompanySchema = z.object({ + /** Whether the company's business ID number was provided. */ + tax_id_provided: z + .boolean() + .describe("Whether the company's business ID number was provided.") + }) + export type IssuingCardholderCompany = z.infer< + typeof IssuingCardholderCompanySchema + > + + export const IssuingCardholderUserTermsAcceptanceSchema = z.object({ + /** The Unix timestamp marking when the cardholder accepted the Authorized User Terms. */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the cardholder accepted the Authorized User Terms.' + ) + .optional(), + /** The IP address from which the cardholder accepted the Authorized User Terms. */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the cardholder accepted the Authorized User Terms.' + ) + .optional(), + /** The user agent of the browser from which the cardholder accepted the Authorized User Terms. */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The user agent of the browser from which the cardholder accepted the Authorized User Terms.' + ) + .optional() + }) + export type IssuingCardholderUserTermsAcceptance = z.infer< + typeof IssuingCardholderUserTermsAcceptanceSchema + > + + export const IssuingCardholderIndividualDobSchema = z.object({ + /** The day of birth, between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('The day of birth, between 1 and 31.') + .optional(), + /** The month of birth, between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('The month of birth, between 1 and 12.') + .optional(), + /** The four-digit year of birth. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year of birth.') + .optional() + }) + export type IssuingCardholderIndividualDob = z.infer< + typeof IssuingCardholderIndividualDobSchema + > + + export const IssuingCardholderRequirementsSchema = z.object({ + /** If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. */ + disabled_reason: z + .enum([ + 'listed', + 'rejected.listed', + 'requirements.past_due', + 'under_review' + ]) + .nullable() + .describe( + 'If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.' + ) + .optional(), + /** Array of fields that need to be collected in order to verify and re-enable the cardholder. */ + past_due: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + 'Array of fields that need to be collected in order to verify and re-enable the cardholder.' + ) + .optional() + }) + export type IssuingCardholderRequirements = z.infer< + typeof IssuingCardholderRequirementsSchema + > + + export const IssuingCardholderSpendingLimitSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + "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)." + ), + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Interval (or event) to which the amount applies. */ + interval: z + .enum([ + 'all_time', + 'daily', + 'monthly', + 'per_authorization', + 'weekly', + 'yearly' + ]) + .describe('Interval (or event) to which the amount applies.') + }) + export type IssuingCardholderSpendingLimit = z.infer< + typeof IssuingCardholderSpendingLimitSchema + > + + export const IssuingPersonalizationDesignCarrierTextSchema = z.object({ + /** The footer body text of the carrier letter. */ + footer_body: z + .string() + .max(5000) + .nullable() + .describe('The footer body text of the carrier letter.') + .optional(), + /** The footer title text of the carrier letter. */ + footer_title: z + .string() + .max(5000) + .nullable() + .describe('The footer title text of the carrier letter.') + .optional(), + /** The header body text of the carrier letter. */ + header_body: z + .string() + .max(5000) + .nullable() + .describe('The header body text of the carrier letter.') + .optional(), + /** The header title text of the carrier letter. */ + header_title: z + .string() + .max(5000) + .nullable() + .describe('The header title text of the carrier letter.') + .optional() + }) + export type IssuingPersonalizationDesignCarrierText = z.infer< + typeof IssuingPersonalizationDesignCarrierTextSchema + > + + export const IssuingPhysicalBundleFeaturesSchema = z.object({ + /** The policy for how to use card logo images in a card design with this physical bundle. */ + card_logo: z + .enum(['optional', 'required', 'unsupported']) + .describe( + 'The policy for how to use card logo images in a card design with this physical bundle.' + ), + /** The policy for how to use carrier letter text in a card design with this physical bundle. */ + carrier_text: z + .enum(['optional', 'required', 'unsupported']) + .describe( + 'The policy for how to use carrier letter text in a card design with this physical bundle.' + ), + /** The policy for how to use a second line on a card with this physical bundle. */ + second_line: z + .enum(['optional', 'required', 'unsupported']) + .describe( + 'The policy for how to use a second line on a card with this physical bundle.' + ) + }) + export type IssuingPhysicalBundleFeatures = z.infer< + typeof IssuingPhysicalBundleFeaturesSchema + > + + export const IssuingPersonalizationDesignPreferencesSchema = z.object({ + /** 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: z + .boolean() + .describe( + "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." + ), + /** 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: z + .boolean() + .nullable() + .describe( + 'Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.' + ) + .optional() + }) + export type IssuingPersonalizationDesignPreferences = z.infer< + typeof IssuingPersonalizationDesignPreferencesSchema + > + + export const IssuingPersonalizationDesignRejectionReasonsSchema = z.object({ + /** The reason(s) the card logo was rejected. */ + card_logo: z + .array( + z.enum([ + 'geographic_location', + 'inappropriate', + 'network_name', + 'non_binary_image', + 'non_fiat_currency', + 'other', + 'other_entity', + 'promotional_material' + ]) + ) + .nullable() + .describe('The reason(s) the card logo was rejected.') + .optional(), + /** The reason(s) the carrier text was rejected. */ + carrier_text: z + .array( + z.enum([ + 'geographic_location', + 'inappropriate', + 'network_name', + 'non_fiat_currency', + 'other', + 'other_entity', + 'promotional_material' + ]) + ) + .nullable() + .describe('The reason(s) the carrier text was rejected.') + .optional() + }) + export type IssuingPersonalizationDesignRejectionReasons = z.infer< + typeof IssuingPersonalizationDesignRejectionReasonsSchema + > + + export const IssuingCardShippingCustomsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type IssuingCardShippingCustoms = z.infer< + typeof IssuingCardShippingCustomsSchema + > + + export const IssuingCardSpendingLimitSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + "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)." + ), + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Interval (or event) to which the amount applies. */ + interval: z + .enum([ + 'all_time', + 'daily', + 'monthly', + 'per_authorization', + 'weekly', + 'yearly' + ]) + .describe('Interval (or event) to which the amount applies.') + }) + export type IssuingCardSpendingLimit = z.infer< + typeof IssuingCardSpendingLimitSchema + > + + export const IssuingCardApplePaySchema = z.object({ + /** Apple Pay Eligibility */ + eligible: z.boolean().describe('Apple Pay Eligibility'), + /** Reason the card is ineligible for Apple Pay */ + ineligible_reason: z + .enum([ + 'missing_agreement', + 'missing_cardholder_contact', + 'unsupported_region' + ]) + .nullable() + .describe('Reason the card is ineligible for Apple Pay') + .optional() + }) + export type IssuingCardApplePay = z.infer + + export const IssuingCardGooglePaySchema = z.object({ + /** Google Pay Eligibility */ + eligible: z.boolean().describe('Google Pay Eligibility'), + /** Reason the card is ineligible for Google Pay */ + ineligible_reason: z + .enum([ + 'missing_agreement', + 'missing_cardholder_contact', + 'unsupported_region' + ]) + .nullable() + .describe('Reason the card is ineligible for Google Pay') + .optional() + }) + export type IssuingCardGooglePay = z.infer + + export const IssuingAuthorizationFleetCardholderPromptDataSchema = z.object({ + /** [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: z + .string() + .max(5000) + .nullable() + .describe( + '[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.' + ) + .optional(), + /** Driver ID. */ + driver_id: z + .string() + .max(5000) + .nullable() + .describe('Driver ID.') + .optional(), + /** Odometer reading. */ + odometer: z + .number() + .int() + .nullable() + .describe('Odometer reading.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** User ID. */ + user_id: z.string().max(5000).nullable().describe('User ID.').optional(), + /** Vehicle number. */ + vehicle_number: z + .string() + .max(5000) + .nullable() + .describe('Vehicle number.') + .optional() + }) + export type IssuingAuthorizationFleetCardholderPromptData = z.infer< + typeof IssuingAuthorizationFleetCardholderPromptDataSchema + > + + export const IssuingAuthorizationFleetFuelPriceDataSchema = z.object({ + /** Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. */ + gross_amount_decimal: z + .string() + .nullable() + .describe( + 'Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes.' + ) + .optional() + }) + export type IssuingAuthorizationFleetFuelPriceData = z.infer< + typeof IssuingAuthorizationFleetFuelPriceDataSchema + > + + export const IssuingAuthorizationFleetNonFuelPriceDataSchema = z.object({ + /** Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. */ + gross_amount_decimal: z + .string() + .nullable() + .describe( + 'Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.' + ) + .optional() + }) + export type IssuingAuthorizationFleetNonFuelPriceData = z.infer< + typeof IssuingAuthorizationFleetNonFuelPriceDataSchema + > + + export const IssuingAuthorizationFleetTaxDataSchema = z.object({ + /** 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: z + .string() + .nullable() + .describe( + 'Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax.' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + 'Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax.' + ) + .optional() + }) + export type IssuingAuthorizationFleetTaxData = z.infer< + typeof IssuingAuthorizationFleetTaxDataSchema + > + + export const IssuingAuthorizationFraudChallengeSchema = z.object({ + /** The method by which the fraud challenge was delivered to the cardholder. */ + channel: z + .literal('sms') + .describe( + 'The method by which the fraud challenge was delivered to the cardholder.' + ), + /** The status of the fraud challenge. */ + status: z + .enum(['expired', 'pending', 'rejected', 'undeliverable', 'verified']) + .describe('The status of the fraud challenge.'), + /** If the challenge is not deliverable, the reason why. */ + undeliverable_reason: z + .enum(['no_phone_number', 'unsupported_phone_number']) + .nullable() + .describe('If the challenge is not deliverable, the reason why.') + .optional() + }) + export type IssuingAuthorizationFraudChallenge = z.infer< + typeof IssuingAuthorizationFraudChallengeSchema + > + + export const IssuingAuthorizationFuelDataSchema = z.object({ + /** [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. */ + industry_product_code: z + .string() + .max(5000) + .nullable() + .describe( + '[Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.' + ) + .optional(), + /** The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. */ + quantity_decimal: z + .string() + .nullable() + .describe( + 'The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.' + ) + .optional(), + /** The type of fuel that was purchased. */ + type: z + .enum([ + 'diesel', + 'other', + 'unleaded_plus', + 'unleaded_regular', + 'unleaded_super' + ]) + .nullable() + .describe('The type of fuel that was purchased.') + .optional(), + /** The units for `quantity_decimal`. */ + unit: z + .enum([ + 'charging_minute', + 'imperial_gallon', + 'kilogram', + 'kilowatt_hour', + 'liter', + 'other', + 'pound', + 'us_gallon' + ]) + .nullable() + .describe('The units for `quantity_decimal`.') + .optional(), + /** The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. */ + unit_cost_decimal: z + .string() + .nullable() + .describe( + 'The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.' + ) + .optional() + }) + export type IssuingAuthorizationFuelData = z.infer< + typeof IssuingAuthorizationFuelDataSchema + > + + export const IssuingAuthorizationMerchantDataSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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." + ), + /** The merchant category code for the seller’s business */ + category_code: z + .string() + .max(5000) + .describe('The merchant category code for the seller’s business'), + /** City where the seller is located */ + city: z + .string() + .max(5000) + .nullable() + .describe('City where the seller is located') + .optional(), + /** Country where the seller is located */ + country: z + .string() + .max(5000) + .nullable() + .describe('Country where the seller is located') + .optional(), + /** Name of the seller */ + name: z + .string() + .max(5000) + .nullable() + .describe('Name of the seller') + .optional(), + /** Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. */ + network_id: z + .string() + .max(5000) + .describe( + 'Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.' + ), + /** Postal code where the seller is located */ + postal_code: z + .string() + .max(5000) + .nullable() + .describe('Postal code where the seller is located') + .optional(), + /** State where the seller is located */ + state: z + .string() + .max(5000) + .nullable() + .describe('State where the seller is located') + .optional(), + /** The seller's tax identification number. Currently populated for French merchants only. */ + tax_id: z + .string() + .max(5000) + .nullable() + .describe( + "The seller's tax identification number. Currently populated for French merchants only." + ) + .optional(), + /** An ID assigned by the seller to the location of the sale. */ + terminal_id: z + .string() + .max(5000) + .nullable() + .describe('An ID assigned by the seller to the location of the sale.') + .optional(), + /** URL provided by the merchant on a 3DS request */ + url: z + .string() + .max(5000) + .nullable() + .describe('URL provided by the merchant on a 3DS request') + .optional() + }) + export type IssuingAuthorizationMerchantData = z.infer< + typeof IssuingAuthorizationMerchantDataSchema + > + + export const IssuingAuthorizationNetworkDataSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe( + 'Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.' + ) + .optional() + }) + export type IssuingAuthorizationNetworkData = z.infer< + typeof IssuingAuthorizationNetworkDataSchema + > + + export const IssuingNetworkTokenDeviceSchema = z.object({ + /** An obfuscated ID derived from the device ID. */ + device_fingerprint: z + .string() + .max(5000) + .describe('An obfuscated ID derived from the device ID.') + .optional(), + /** The IP address of the device at provisioning time. */ + ip_address: z + .string() + .max(5000) + .describe('The IP address of the device at provisioning time.') + .optional(), + /** The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. */ + location: z + .string() + .max(5000) + .describe( + 'The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal.' + ) + .optional(), + /** The name of the device used for tokenization. */ + name: z + .string() + .max(5000) + .describe('The name of the device used for tokenization.') + .optional(), + /** The phone number of the device used for tokenization. */ + phone_number: z + .string() + .max(5000) + .describe('The phone number of the device used for tokenization.') + .optional(), + /** The type of device used for tokenization. */ + type: z + .enum(['other', 'phone', 'watch']) + .describe('The type of device used for tokenization.') + .optional() + }) + export type IssuingNetworkTokenDevice = z.infer< + typeof IssuingNetworkTokenDeviceSchema + > + + export const IssuingNetworkTokenMastercardSchema = z.object({ + /** A unique reference ID from MasterCard to represent the card account number. */ + card_reference_id: z + .string() + .max(5000) + .describe( + 'A unique reference ID from MasterCard to represent the card account number.' + ) + .optional(), + /** The network-unique identifier for the token. */ + token_reference_id: z + .string() + .max(5000) + .describe('The network-unique identifier for the token.'), + /** The ID of the entity requesting tokenization, specific to MasterCard. */ + token_requestor_id: z + .string() + .max(5000) + .describe( + 'The ID of the entity requesting tokenization, specific to MasterCard.' + ), + /** The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. */ + token_requestor_name: z + .string() + .max(5000) + .describe( + 'The name of the entity requesting tokenization, if known. This is directly provided from MasterCard.' + ) + .optional() + }) + export type IssuingNetworkTokenMastercard = z.infer< + typeof IssuingNetworkTokenMastercardSchema + > + + export const IssuingNetworkTokenVisaSchema = z.object({ + /** A unique reference ID from Visa to represent the card account number. */ + card_reference_id: z + .string() + .max(5000) + .describe( + 'A unique reference ID from Visa to represent the card account number.' + ), + /** The network-unique identifier for the token. */ + token_reference_id: z + .string() + .max(5000) + .describe('The network-unique identifier for the token.'), + /** The ID of the entity requesting tokenization, specific to Visa. */ + token_requestor_id: z + .string() + .max(5000) + .describe( + 'The ID of the entity requesting tokenization, specific to Visa.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional() + }) + export type IssuingNetworkTokenVisa = z.infer< + typeof IssuingNetworkTokenVisaSchema + > + + export const IssuingNetworkTokenAddressSchema = z.object({ + /** The street address of the cardholder tokenizing the card. */ + line1: z + .string() + .max(5000) + .describe('The street address of the cardholder tokenizing the card.'), + /** The postal code of the cardholder tokenizing the card. */ + postal_code: z + .string() + .max(5000) + .describe('The postal code of the cardholder tokenizing the card.') + }) + export type IssuingNetworkTokenAddress = z.infer< + typeof IssuingNetworkTokenAddressSchema + > + + export const IssuingTransactionAmountDetailsSchema = z.object({ + /** The fee charged by the ATM for the cash withdrawal. */ + atm_fee: z + .number() + .int() + .nullable() + .describe('The fee charged by the ATM for the cash withdrawal.') + .optional(), + /** The amount of cash requested by the cardholder. */ + cashback_amount: z + .number() + .int() + .nullable() + .describe('The amount of cash requested by the cardholder.') + .optional() + }) + export type IssuingTransactionAmountDetails = z.infer< + typeof IssuingTransactionAmountDetailsSchema + > + + export const IssuingDisputeTreasurySchema = z.object({ + /** The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + debit_reversal: z + .string() + .max(5000) + .nullable() + .describe( + 'The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute' + ) + .optional(), + /** The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + received_debit: z + .string() + .max(5000) + .describe( + 'The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.' + ) + }) + export type IssuingDisputeTreasury = z.infer< + typeof IssuingDisputeTreasurySchema + > + + export const IssuingTransactionNetworkDataSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe( + 'Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.' + ) + .optional() + }) + export type IssuingTransactionNetworkData = z.infer< + typeof IssuingTransactionNetworkDataSchema + > + + export const IssuingTransactionFleetCardholderPromptDataSchema = z.object({ + /** Driver ID. */ + driver_id: z + .string() + .max(5000) + .nullable() + .describe('Driver ID.') + .optional(), + /** Odometer reading. */ + odometer: z + .number() + .int() + .nullable() + .describe('Odometer reading.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** User ID. */ + user_id: z.string().max(5000).nullable().describe('User ID.').optional(), + /** Vehicle number. */ + vehicle_number: z + .string() + .max(5000) + .nullable() + .describe('Vehicle number.') + .optional() + }) + export type IssuingTransactionFleetCardholderPromptData = z.infer< + typeof IssuingTransactionFleetCardholderPromptDataSchema + > + + export const IssuingTransactionFleetFuelPriceDataSchema = z.object({ + /** Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. */ + gross_amount_decimal: z + .string() + .nullable() + .describe( + 'Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.' + ) + .optional() + }) + export type IssuingTransactionFleetFuelPriceData = z.infer< + typeof IssuingTransactionFleetFuelPriceDataSchema + > + + export const IssuingTransactionFleetNonFuelPriceDataSchema = z.object({ + /** Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. */ + gross_amount_decimal: z + .string() + .nullable() + .describe( + 'Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.' + ) + .optional() + }) + export type IssuingTransactionFleetNonFuelPriceData = z.infer< + typeof IssuingTransactionFleetNonFuelPriceDataSchema + > + + export const IssuingTransactionFleetTaxDataSchema = z.object({ + /** 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: z + .string() + .nullable() + .describe( + 'Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + 'Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.' + ) + .optional() + }) + export type IssuingTransactionFleetTaxData = z.infer< + typeof IssuingTransactionFleetTaxDataSchema + > + + export const IssuingTransactionFlightDataLegSchema = z.object({ + /** The three-letter IATA airport code of the flight's destination. */ + arrival_airport_code: z + .string() + .max(5000) + .nullable() + .describe( + "The three-letter IATA airport code of the flight's destination." + ) + .optional(), + /** The airline carrier code. */ + carrier: z + .string() + .max(5000) + .nullable() + .describe('The airline carrier code.') + .optional(), + /** The three-letter IATA airport code that the flight departed from. */ + departure_airport_code: z + .string() + .max(5000) + .nullable() + .describe( + 'The three-letter IATA airport code that the flight departed from.' + ) + .optional(), + /** The flight number. */ + flight_number: z + .string() + .max(5000) + .nullable() + .describe('The flight number.') + .optional(), + /** The flight's service class. */ + service_class: z + .string() + .max(5000) + .nullable() + .describe("The flight's service class.") + .optional(), + /** Whether a stopover is allowed on this flight. */ + stopover_allowed: z + .boolean() + .nullable() + .describe('Whether a stopover is allowed on this flight.') + .optional() + }) + export type IssuingTransactionFlightDataLeg = z.infer< + typeof IssuingTransactionFlightDataLegSchema + > + + export const IssuingTransactionFuelDataSchema = z.object({ + /** [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. */ + industry_product_code: z + .string() + .max(5000) + .nullable() + .describe( + '[Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.' + ) + .optional(), + /** The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. */ + quantity_decimal: z + .string() + .nullable() + .describe( + 'The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.' + ) + .optional(), + /** The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. */ + type: z + .string() + .max(5000) + .describe( + 'The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.' + ), + /** The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. */ + unit: z + .string() + .max(5000) + .describe( + 'The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.' + ), + /** The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. */ + unit_cost_decimal: z + .string() + .describe( + 'The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.' + ) + }) + export type IssuingTransactionFuelData = z.infer< + typeof IssuingTransactionFuelDataSchema + > + + export const IssuingTransactionLodgingDataSchema = z.object({ + /** The time of checking into the lodging. */ + check_in_at: z + .number() + .int() + .nullable() + .describe('The time of checking into the lodging.') + .optional(), + /** The number of nights stayed at the lodging. */ + nights: z + .number() + .int() + .nullable() + .describe('The number of nights stayed at the lodging.') + .optional() + }) + export type IssuingTransactionLodgingData = z.infer< + typeof IssuingTransactionLodgingDataSchema + > + + export const IssuingTransactionReceiptDataSchema = z.object({ + /** The description of the item. The maximum length of this field is 26 characters. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'The description of the item. The maximum length of this field is 26 characters.' + ) + .optional(), + /** The quantity of the item. */ + quantity: z + .number() + .nullable() + .describe('The quantity of the item.') + .optional(), + /** The total for this line item in cents. */ + total: z + .number() + .int() + .nullable() + .describe('The total for this line item in cents.') + .optional(), + /** The unit cost of the item in cents. */ + unit_cost: z + .number() + .int() + .nullable() + .describe('The unit cost of the item in cents.') + .optional() + }) + export type IssuingTransactionReceiptData = z.infer< + typeof IssuingTransactionReceiptDataSchema + > + + export const IssuingTransactionTreasurySchema = z.object({ + /** The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund */ + received_credit: z + .string() + .max(5000) + .nullable() + .describe( + 'The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund' + ) + .optional(), + /** The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture */ + received_debit: z + .string() + .max(5000) + .nullable() + .describe( + 'The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture' + ) + .optional() + }) + export type IssuingTransactionTreasury = z.infer< + typeof IssuingTransactionTreasurySchema + > + + export const IssuingAuthorizationTreasurySchema = z.object({ + /** The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + received_credits: z + .array(z.string().max(5000)) + .describe( + 'The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization' + ), + /** The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + received_debits: z + .array(z.string().max(5000)) + .describe( + 'The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization' + ), + /** The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + transaction: z + .string() + .max(5000) + .nullable() + .describe( + 'The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization' + ) + .optional() + }) + export type IssuingAuthorizationTreasury = z.infer< + typeof IssuingAuthorizationTreasurySchema + > + + export const IssuingAuthorizationAuthenticationExemptionSchema = z.object({ + /** The entity that requested the exemption, either the acquiring merchant or the Issuing user. */ + claimed_by: z + .enum(['acquirer', 'issuer']) + .describe( + 'The entity that requested the exemption, either the acquiring merchant or the Issuing user.' + ), + /** The specific exemption claimed for this authorization. */ + type: z + .enum(['low_value_transaction', 'transaction_risk_analysis', 'unknown']) + .describe('The specific exemption claimed for this authorization.') + }) + export type IssuingAuthorizationAuthenticationExemption = z.infer< + typeof IssuingAuthorizationAuthenticationExemptionSchema + > + + export const IssuingAuthorizationThreeDSecureSchema = z.object({ + /** The outcome of the 3D Secure authentication request. */ + result: z + .enum(['attempt_acknowledged', 'authenticated', 'failed', 'required']) + .describe('The outcome of the 3D Secure authentication request.') + }) + export type IssuingAuthorizationThreeDSecure = z.infer< + typeof IssuingAuthorizationThreeDSecureSchema + > + + export const DeletedBankAccountSchema = z.object({ + /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: z + .string() + .max(5000) + .nullable() + .describe( + 'Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.' + ) + .optional(), + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('bank_account') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedBankAccount = z.infer + + export const DeletedCardSchema = z.object({ + /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: z + .string() + .max(5000) + .nullable() + .describe( + 'Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.' + ) + .optional(), + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('card') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedCard = z.infer + + export const PayoutsTraceIdSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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`.' + ), + /** The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. */ + value: z + .string() + .max(5000) + .nullable() + .describe( + 'The trace ID value if `trace_id.status` is `supported`, otherwise `nil`.' + ) + .optional() + }) + export type PayoutsTraceId = z.infer + + export const ReserveTransactionSchema = z.object({ + amount: z.number().int(), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('reserve_transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type ReserveTransaction = z.infer + + export const TaxDeductedAtSourceSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax_deducted_at_source') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ + period_end: z + .number() + .int() + .describe( + 'The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.' + ), + /** The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ + period_start: z + .number() + .int() + .describe( + 'The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.' + ), + /** The TAN that was supplied to Stripe when TDS was assessed */ + tax_deduction_account_number: z + .string() + .max(5000) + .describe('The TAN that was supplied to Stripe when TDS was assessed') + }) + export type TaxDeductedAtSource = z.infer + + export const PlatformEarningFeeSourceSchema = z.object({ + /** Charge ID that created this application fee. */ + charge: z + .string() + .max(5000) + .describe('Charge ID that created this application fee.') + .optional(), + /** Payout ID that created this application fee. */ + payout: z + .string() + .max(5000) + .describe('Payout ID that created this application fee.') + .optional(), + /** Type of object that created the application fee, either `charge` or `payout`. */ + type: z + .enum(['charge', 'payout']) + .describe( + 'Type of object that created the application fee, either `charge` or `payout`.' + ) + }) + export type PlatformEarningFeeSource = z.infer< + typeof PlatformEarningFeeSourceSchema + > + + export const ChargeFraudDetailsSchema = z.object({ + /** Assessments from Stripe. If set, the value is `fraudulent`. */ + stripe_report: z + .string() + .max(5000) + .describe('Assessments from Stripe. If set, the value is `fraudulent`.') + .optional(), + /** Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ + user_report: z + .string() + .max(5000) + .describe( + 'Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.' + ) + .optional() + }) + export type ChargeFraudDetails = z.infer + + export const RuleSchema = z.object({ + /** The action taken on the payment. */ + action: z.string().max(5000).describe('The action taken on the payment.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The predicate to evaluate the payment against. */ + predicate: z + .string() + .max(5000) + .describe('The predicate to evaluate the payment against.') + }) + export type Rule = z.infer + + export const PaymentMethodDetailsAchCreditTransferSchema = z.object({ + /** Account number to transfer funds to. */ + account_number: z + .string() + .max(5000) + .nullable() + .describe('Account number to transfer funds to.') + .optional(), + /** Name of the bank associated with the routing number. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the routing number.') + .optional(), + /** Routing transit number for the bank account to transfer funds to. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe( + 'Routing transit number for the bank account to transfer funds to.' + ) + .optional(), + /** SWIFT code of the bank associated with the routing number. */ + swift_code: z + .string() + .max(5000) + .nullable() + .describe('SWIFT code of the bank associated with the routing number.') + .optional() + }) + export type PaymentMethodDetailsAchCreditTransfer = z.infer< + typeof PaymentMethodDetailsAchCreditTransferSchema + > + + export const PaymentMethodDetailsAchDebitSchema = z.object({ + /** Type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type: z + .enum(['company', 'individual']) + .nullable() + .describe( + 'Type of entity that holds the account. This can be either `individual` or `company`.' + ) + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Two-letter ISO code representing the country the bank account is located in. */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the country the bank account is located in.' + ) + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** Routing transit number of the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('Routing transit number of the bank account.') + .optional() + }) + export type PaymentMethodDetailsAchDebit = z.infer< + typeof PaymentMethodDetailsAchDebitSchema + > + + export const PaymentMethodDetailsAcssDebitSchema = z.object({ + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Institution number of the bank account */ + institution_number: z + .string() + .max(5000) + .nullable() + .describe('Institution number of the bank account') + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .string() + .max(5000) + .describe('ID of the mandate used to make this payment.') + .optional(), + /** Transit number of the bank account. */ + transit_number: z + .string() + .max(5000) + .nullable() + .describe('Transit number of the bank account.') + .optional() + }) + export type PaymentMethodDetailsAcssDebit = z.infer< + typeof PaymentMethodDetailsAcssDebitSchema + > + + export const PaymentMethodDetailsAffirmSchema = z.object({ + /** The Affirm transaction ID associated with this payment. */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe('The Affirm transaction ID associated with this payment.') + .optional() + }) + export type PaymentMethodDetailsAffirm = z.infer< + typeof PaymentMethodDetailsAffirmSchema + > + + export const PaymentMethodDetailsAfterpayClearpaySchema = z.object({ + /** The Afterpay order ID associated with this payment intent. */ + order_id: z + .string() + .max(5000) + .nullable() + .describe('The Afterpay order ID associated with this payment intent.') + .optional(), + /** Order identifier shown to the merchant in Afterpay’s online portal. */ + reference: z + .string() + .max(5000) + .nullable() + .describe( + 'Order identifier shown to the merchant in Afterpay’s online portal.' + ) + .optional() + }) + export type PaymentMethodDetailsAfterpayClearpay = z.infer< + typeof PaymentMethodDetailsAfterpayClearpaySchema + > + + export const PaymentFlowsPrivatePaymentMethodsAlipayDetailsSchema = z.object({ + /** Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. */ + buyer_id: z + .string() + .max(5000) + .describe( + 'Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.' + ) + .optional(), + /** Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.' + ) + .optional(), + /** Transaction ID of this particular Alipay transaction. */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe('Transaction ID of this particular Alipay transaction.') + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsAlipayDetails = z.infer< + typeof PaymentFlowsPrivatePaymentMethodsAlipayDetailsSchema + > + + export const PaymentMethodDetailsAlmaSchema = z.object({}) + export type PaymentMethodDetailsAlma = z.infer< + typeof PaymentMethodDetailsAlmaSchema + > + + export const PaymentMethodDetailsPassthroughCardSchema = z.object({ + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .nullable() + .describe("Two-digit number representing the card's expiration month.") + .optional(), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .nullable() + .describe("Four-digit number representing the card's expiration year.") + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional() + }) + export type PaymentMethodDetailsPassthroughCard = z.infer< + typeof PaymentMethodDetailsPassthroughCardSchema + > + + export const PaymentMethodDetailsAuBecsDebitSchema = z.object({ + /** Bank-State-Branch number of the bank account. */ + bsb_number: z + .string() + .max(5000) + .nullable() + .describe('Bank-State-Branch number of the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .string() + .max(5000) + .describe('ID of the mandate used to make this payment.') + .optional() + }) + export type PaymentMethodDetailsAuBecsDebit = z.infer< + typeof PaymentMethodDetailsAuBecsDebitSchema + > + + export const PaymentMethodDetailsBacsDebitSchema = z.object({ + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .string() + .max(5000) + .nullable() + .describe('ID of the mandate used to make this payment.') + .optional(), + /** Sort code of the bank account. (e.g., `10-20-30`) */ + sort_code: z + .string() + .max(5000) + .nullable() + .describe('Sort code of the bank account. (e.g., `10-20-30`)') + .optional() + }) + export type PaymentMethodDetailsBacsDebit = z.infer< + typeof PaymentMethodDetailsBacsDebitSchema + > + + export const PaymentMethodDetailsBlikSchema = z.object({ + /** A unique and immutable identifier assigned by BLIK to every buyer. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique and immutable identifier assigned by BLIK to every buyer.' + ) + .optional() + }) + export type PaymentMethodDetailsBlik = z.infer< + typeof PaymentMethodDetailsBlikSchema + > + + export const PaymentMethodDetailsBoletoSchema = z.object({ + /** The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ + tax_id: z + .string() + .max(5000) + .describe( + 'The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)' + ) + }) + export type PaymentMethodDetailsBoleto = z.infer< + typeof PaymentMethodDetailsBoletoSchema + > + + export const PaymentMethodDetailsCardChecksSchema = z.object({ + /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional() + }) + export type PaymentMethodDetailsCardChecks = z.infer< + typeof PaymentMethodDetailsCardChecksSchema + > + + export const PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationSchema = + z.object({ + /** Indicates whether or not the capture window is extended beyond the standard authorization. */ + status: z + .enum(['disabled', 'enabled']) + .describe( + 'Indicates whether or not the capture window is extended beyond the standard authorization.' + ) + }) + export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationSchema + > + + export const PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationSchema = + z.object({ + /** Indicates whether or not the incremental authorization feature is supported. */ + status: z + .enum(['available', 'unavailable']) + .describe( + 'Indicates whether or not the incremental authorization feature is supported.' + ) + }) + export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationSchema + > + + export const PaymentMethodDetailsCardInstallmentsPlanSchema = z.object({ + /** For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ + count: z + .number() + .int() + .nullable() + .describe( + 'For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.' + ) + .optional(), + /** + * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + */ + interval: z + .literal('month') + .nullable() + .describe( + 'For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.\nOne of `month`.' + ) + .optional(), + /** Type of installment plan, one of `fixed_count`. */ + type: z + .literal('fixed_count') + .describe('Type of installment plan, one of `fixed_count`.') + }) + export type PaymentMethodDetailsCardInstallmentsPlan = z.infer< + typeof PaymentMethodDetailsCardInstallmentsPlanSchema + > + + export const PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureSchema = + z.object({ + /** Indicates whether or not multiple captures are supported. */ + status: z + .enum(['available', 'unavailable']) + .describe('Indicates whether or not multiple captures are supported.') + }) + export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticapture = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureSchema + > + + export const PaymentMethodDetailsCardNetworkTokenSchema = z.object({ + /** Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. */ + used: z + .boolean() + .describe( + 'Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.' + ) + }) + export type PaymentMethodDetailsCardNetworkToken = z.infer< + typeof PaymentMethodDetailsCardNetworkTokenSchema + > + + export const PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureSchema = + z.object({ + /** The maximum amount that can be captured. */ + maximum_amount_capturable: z + .number() + .int() + .describe('The maximum amount that can be captured.'), + /** Indicates whether or not the authorized amount can be over-captured. */ + status: z + .enum(['available', 'unavailable']) + .describe( + 'Indicates whether or not the authorized amount can be over-captured.' + ) + }) + export type PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercapture = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureSchema + > + + export const ThreeDSecureDetailsChargeSchema = z.object({ + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ + authentication_flow: z + .enum(['challenge', 'frictionless']) + .nullable() + .describe( + 'For authenticated transactions: how the customer was authenticated by\nthe issuing bank.' + ) + .optional(), + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field + * indicating what degree of authentication was performed. + */ + electronic_commerce_indicator: z + .enum(['01', '02', '05', '06', '07']) + .nullable() + .describe( + 'The Electronic Commerce Indicator (ECI). A protocol-level field\nindicating what degree of authentication was performed.' + ) + .optional(), + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + exemption_indicator: z + .enum(['low_risk', 'none']) + .nullable() + .describe( + 'The exemption requested via 3DS and accepted by the issuer at authentication time.' + ) + .optional(), + /** + * 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: z + .boolean() + .describe( + "Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on\nthe outcome of Stripe's internal risk assessment." + ) + .optional(), + /** Indicates the outcome of 3D Secure authentication. */ + result: z + .enum([ + 'attempt_acknowledged', + 'authenticated', + 'exempted', + 'failed', + 'not_supported', + 'processing_error' + ]) + .nullable() + .describe('Indicates the outcome of 3D Secure authentication.') + .optional(), + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ + result_reason: z + .enum([ + 'abandoned', + 'bypassed', + 'canceled', + 'card_not_enrolled', + 'network_not_supported', + 'protocol_error', + 'rejected' + ]) + .nullable() + .describe( + 'Additional information about why 3D Secure succeeded or failed based\non the `result`.' + ) + .optional(), + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + * (dsTransId) for this payment. + */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe( + 'The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID\n(dsTransId) for this payment.' + ) + .optional(), + /** The version of 3D Secure that was used. */ + version: z + .enum(['1.0.2', '2.1.0', '2.2.0']) + .nullable() + .describe('The version of 3D Secure that was used.') + .optional() + }) + export type ThreeDSecureDetailsCharge = z.infer< + typeof ThreeDSecureDetailsChargeSchema + > + + export const PaymentMethodDetailsCardWalletAmexExpressCheckoutSchema = + z.object({}) + export type PaymentMethodDetailsCardWalletAmexExpressCheckout = z.infer< + typeof PaymentMethodDetailsCardWalletAmexExpressCheckoutSchema + > + + export const PaymentMethodDetailsCardWalletLinkSchema = z.object({}) + export type PaymentMethodDetailsCardWalletLink = z.infer< + typeof PaymentMethodDetailsCardWalletLinkSchema + > + + export const PaymentMethodDetailsCardWalletSamsungPaySchema = z.object({}) + export type PaymentMethodDetailsCardWalletSamsungPay = z.infer< + typeof PaymentMethodDetailsCardWalletSamsungPaySchema + > + + export const PaymentMethodDetailsCashappSchema = z.object({ + /** A unique and immutable identifier assigned by Cash App to every buyer. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique and immutable identifier assigned by Cash App to every buyer.' + ) + .optional(), + /** A public identifier for buyers using Cash App. */ + cashtag: z + .string() + .max(5000) + .nullable() + .describe('A public identifier for buyers using Cash App.') + .optional() + }) + export type PaymentMethodDetailsCashapp = z.infer< + typeof PaymentMethodDetailsCashappSchema + > + + export const PaymentMethodDetailsCustomerBalanceSchema = z.object({}) + export type PaymentMethodDetailsCustomerBalance = z.infer< + typeof PaymentMethodDetailsCustomerBalanceSchema + > + + export const PaymentMethodDetailsEpsSchema = z.object({ + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + "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`." + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by EPS directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nEPS rarely provides this information so the attribute is usually empty." + ) + .optional() + }) + export type PaymentMethodDetailsEps = z.infer< + typeof PaymentMethodDetailsEpsSchema + > + + export const PaymentMethodDetailsFpxSchema = z.object({ + /** 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: z + .enum([ + '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' + ]) + .describe( + "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`." + ), + /** Unique transaction id generated by FPX for every request from the merchant */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe( + 'Unique transaction id generated by FPX for every request from the merchant' + ) + .optional() + }) + export type PaymentMethodDetailsFpx = z.infer< + typeof PaymentMethodDetailsFpxSchema + > + + export const PaymentMethodDetailsGiropaySchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Bank Identifier Code of the bank associated with the bank account. */ + bic: z + .string() + .max(5000) + .nullable() + .describe( + 'Bank Identifier Code of the bank associated with the bank account.' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by Giropay directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nGiropay rarely provides this information so the attribute is usually empty." + ) + .optional() + }) + export type PaymentMethodDetailsGiropay = z.infer< + typeof PaymentMethodDetailsGiropaySchema + > + + export const PaymentMethodDetailsGrabpaySchema = z.object({ + /** Unique transaction id generated by GrabPay */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe('Unique transaction id generated by GrabPay') + .optional() + }) + export type PaymentMethodDetailsGrabpay = z.infer< + typeof PaymentMethodDetailsGrabpaySchema + > + + export const PaymentMethodDetailsInteracPresentReceiptSchema = z.object({ + /** The type of account being debited or credited */ + account_type: z + .enum(['checking', 'savings', 'unknown']) + .describe('The type of account being debited or credited') + .optional(), + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram: z + .string() + .max(5000) + .nullable() + .describe( + 'EMV tag 9F26, cryptogram generated by the integrated circuit chip.' + ) + .optional(), + /** Mnenomic of the Application Identifier. */ + application_preferred_name: z + .string() + .max(5000) + .nullable() + .describe('Mnenomic of the Application Identifier.') + .optional(), + /** Identifier for this transaction. */ + authorization_code: z + .string() + .max(5000) + .nullable() + .describe('Identifier for this transaction.') + .optional(), + /** EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code: z + .string() + .max(5000) + .nullable() + .describe('EMV tag 8A. A code returned by the card issuer.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name: z + .string() + .max(5000) + .nullable() + .describe( + 'EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.' + ) + .optional(), + /** The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results: z + .string() + .max(5000) + .nullable() + .describe( + 'The outcome of a series of EMV functions performed by the card reader.' + ) + .optional(), + /** An indication of various EMV functions performed during the transaction. */ + transaction_status_information: z + .string() + .max(5000) + .nullable() + .describe( + 'An indication of various EMV functions performed during the transaction.' + ) + .optional() + }) + export type PaymentMethodDetailsInteracPresentReceipt = z.infer< + typeof PaymentMethodDetailsInteracPresentReceiptSchema + > + + export const PaymentMethodDetailsKakaoPaySchema = z.object({ + /** A unique identifier for the buyer as determined by the local payment processor. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique identifier for the buyer as determined by the local payment processor.' + ) + .optional() + }) + export type PaymentMethodDetailsKakaoPay = z.infer< + typeof PaymentMethodDetailsKakaoPaySchema + > + + export const KlarnaAddressSchema = z.object({ + /** The payer address country */ + country: z + .string() + .max(5000) + .nullable() + .describe('The payer address country') + .optional() + }) + export type KlarnaAddress = z.infer + + export const PaymentMethodDetailsKonbiniStoreSchema = z.object({ + /** The name of the convenience store chain where the payment was completed. */ + chain: z + .enum(['familymart', 'lawson', 'ministop', 'seicomart']) + .nullable() + .describe( + 'The name of the convenience store chain where the payment was completed.' + ) + .optional() + }) + export type PaymentMethodDetailsKonbiniStore = z.infer< + typeof PaymentMethodDetailsKonbiniStoreSchema + > + + export const PaymentMethodDetailsKrCardSchema = z.object({ + /** The local credit or debit card brand. */ + brand: z + .enum([ + 'bc', + 'citi', + 'hana', + 'hyundai', + 'jeju', + 'jeonbuk', + 'kakaobank', + 'kbank', + 'kdbbank', + 'kookmin', + 'kwangju', + 'lotte', + 'mg', + 'nh', + 'post', + 'samsung', + 'savingsbank', + 'shinhan', + 'shinhyup', + 'suhyup', + 'tossbank', + 'woori' + ]) + .nullable() + .describe('The local credit or debit card brand.') + .optional(), + /** A unique identifier for the buyer as determined by the local payment processor. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique identifier for the buyer as determined by the local payment processor.' + ) + .optional(), + /** The last four digits of the card. This may not be present for American Express cards. */ + last4: z + .string() + .max(4) + .nullable() + .describe( + 'The last four digits of the card. This may not be present for American Express cards.' + ) + .optional() + }) + export type PaymentMethodDetailsKrCard = z.infer< + typeof PaymentMethodDetailsKrCardSchema + > + + export const PaymentMethodDetailsLinkSchema = z.object({ + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the funding source country beneath the Link payment.\nYou could use this attribute to get a sense of international fees.' + ) + .optional() + }) + export type PaymentMethodDetailsLink = z.infer< + typeof PaymentMethodDetailsLinkSchema + > + + export const InternalCardSchema = z.object({ + /** Brand of the card used in the transaction */ + brand: z + .string() + .max(5000) + .nullable() + .describe('Brand of the card used in the transaction') + .optional(), + /** Two-letter ISO code representing the country of the card */ + country: z + .string() + .max(5000) + .nullable() + .describe('Two-letter ISO code representing the country of the card') + .optional(), + /** Two digit number representing the card's expiration month */ + exp_month: z + .number() + .int() + .nullable() + .describe("Two digit number representing the card's expiration month") + .optional(), + /** Two digit number representing the card's expiration year */ + exp_year: z + .number() + .int() + .nullable() + .describe("Two digit number representing the card's expiration year") + .optional(), + /** The last 4 digits of the card */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last 4 digits of the card') + .optional() + }) + export type InternalCard = z.infer + + export const PaymentMethodDetailsMultibancoSchema = z.object({ + /** Entity number associated with this Multibanco payment. */ + entity: z + .string() + .max(5000) + .nullable() + .describe('Entity number associated with this Multibanco payment.') + .optional(), + /** Reference number associated with this Multibanco payment. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('Reference number associated with this Multibanco payment.') + .optional() + }) + export type PaymentMethodDetailsMultibanco = z.infer< + typeof PaymentMethodDetailsMultibancoSchema + > + + export const PaymentMethodDetailsNaverPaySchema = z.object({ + /** A unique identifier for the buyer as determined by the local payment processor. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique identifier for the buyer as determined by the local payment processor.' + ) + .optional() + }) + export type PaymentMethodDetailsNaverPay = z.infer< + typeof PaymentMethodDetailsNaverPaySchema + > + + export const PaymentMethodDetailsOxxoSchema = z.object({ + /** OXXO reference number */ + number: z + .string() + .max(5000) + .nullable() + .describe('OXXO reference number') + .optional() + }) + export type PaymentMethodDetailsOxxo = z.infer< + typeof PaymentMethodDetailsOxxoSchema + > + + export const PaymentMethodDetailsP24Schema = z.object({ + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + "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`." + ) + .optional(), + /** Unique reference for this Przelewy24 payment. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('Unique reference for this Przelewy24 payment.') + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by Przelewy24 directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nPrzelewy24 rarely provides this information so the attribute is usually empty." + ) + .optional() + }) + export type PaymentMethodDetailsP24 = z.infer< + typeof PaymentMethodDetailsP24Schema + > + + export const PaymentMethodDetailsPayByBankSchema = z.object({}) + export type PaymentMethodDetailsPayByBank = z.infer< + typeof PaymentMethodDetailsPayByBankSchema + > + + export const PaymentMethodDetailsPaycoSchema = z.object({ + /** A unique identifier for the buyer as determined by the local payment processor. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique identifier for the buyer as determined by the local payment processor.' + ) + .optional() + }) + export type PaymentMethodDetailsPayco = z.infer< + typeof PaymentMethodDetailsPaycoSchema + > + + export const PaymentMethodDetailsPaynowSchema = z.object({ + /** Reference number associated with this PayNow payment */ + reference: z + .string() + .max(5000) + .nullable() + .describe('Reference number associated with this PayNow payment') + .optional() + }) + export type PaymentMethodDetailsPaynow = z.infer< + typeof PaymentMethodDetailsPaynowSchema + > + + export const PaypalSellerProtectionSchema = z.object({ + /** An array of conditions that are covered for the transaction, if applicable. */ + dispute_categories: z + .array(z.enum(['fraudulent', 'product_not_received'])) + .nullable() + .describe( + 'An array of conditions that are covered for the transaction, if applicable.' + ) + .optional(), + /** Indicates whether the transaction is eligible for PayPal's seller protection. */ + status: z + .enum(['eligible', 'not_eligible', 'partially_eligible']) + .describe( + "Indicates whether the transaction is eligible for PayPal's seller protection." + ) + }) + export type PaypalSellerProtection = z.infer< + typeof PaypalSellerProtectionSchema + > + + export const PaymentMethodDetailsPixSchema = z.object({ + /** Unique transaction id generated by BCB */ + bank_transaction_id: z + .string() + .max(5000) + .nullable() + .describe('Unique transaction id generated by BCB') + .optional() + }) + export type PaymentMethodDetailsPix = z.infer< + typeof PaymentMethodDetailsPixSchema + > + + export const PaymentMethodDetailsPromptpaySchema = z.object({ + /** Bill reference generated by PromptPay */ + reference: z + .string() + .max(5000) + .nullable() + .describe('Bill reference generated by PromptPay') + .optional() + }) + export type PaymentMethodDetailsPromptpay = z.infer< + typeof PaymentMethodDetailsPromptpaySchema + > + + export const PaymentMethodDetailsSamsungPaySchema = z.object({ + /** A unique identifier for the buyer as determined by the local payment processor. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique identifier for the buyer as determined by the local payment processor.' + ) + .optional() + }) + export type PaymentMethodDetailsSamsungPay = z.infer< + typeof PaymentMethodDetailsSamsungPaySchema + > + + export const PaymentMethodDetailsSepaDebitSchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Branch code of bank associated with the bank account. */ + branch_code: z + .string() + .max(5000) + .nullable() + .describe('Branch code of bank associated with the bank account.') + .optional(), + /** Two-letter ISO code representing the country the bank account is located in. */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the country the bank account is located in.' + ) + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four characters of the IBAN. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional() + }) + export type PaymentMethodDetailsSepaDebit = z.infer< + typeof PaymentMethodDetailsSepaDebitSchema + > + + export const PaymentMethodDetailsStripeAccountSchema = z.object({}) + export type PaymentMethodDetailsStripeAccount = z.infer< + typeof PaymentMethodDetailsStripeAccountSchema + > + + export const PaymentMethodDetailsSwishSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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" + ) + .optional(), + /** Payer bank reference number for the payment */ + payment_reference: z + .string() + .max(5000) + .nullable() + .describe('Payer bank reference number for the payment') + .optional(), + /** The last four digits of the Swish account phone number */ + verified_phone_last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the Swish account phone number') + .optional() + }) + export type PaymentMethodDetailsSwish = z.infer< + typeof PaymentMethodDetailsSwishSchema + > + + export const PaymentMethodDetailsTwintSchema = z.object({}) + export type PaymentMethodDetailsTwint = z.infer< + typeof PaymentMethodDetailsTwintSchema + > + + export const PaymentMethodDetailsWechatSchema = z.object({}) + export type PaymentMethodDetailsWechat = z.infer< + typeof PaymentMethodDetailsWechatSchema + > + + export const PaymentMethodDetailsWechatPaySchema = z.object({ + /** Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.' + ) + .optional(), + /** Transaction ID of this particular WeChat Pay transaction. */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe('Transaction ID of this particular WeChat Pay transaction.') + .optional() + }) + export type PaymentMethodDetailsWechatPay = z.infer< + typeof PaymentMethodDetailsWechatPaySchema + > + + export const PaymentMethodDetailsZipSchema = z.object({}) + export type PaymentMethodDetailsZip = z.infer< + typeof PaymentMethodDetailsZipSchema + > + + /** Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ + export const RadarRadarOptionsSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional() + }) + .describe( + 'Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.' + ) + export type RadarRadarOptions = z.infer + + export const RadarReviewResourceLocationSchema = z.object({ + /** The city where the payment originated. */ + city: z + .string() + .max(5000) + .nullable() + .describe('The city where the payment originated.') + .optional(), + /** Two-letter ISO code representing the country where the payment originated. */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the country where the payment originated.' + ) + .optional(), + /** The geographic latitude where the payment originated. */ + latitude: z + .number() + .nullable() + .describe('The geographic latitude where the payment originated.') + .optional(), + /** The geographic longitude where the payment originated. */ + longitude: z + .number() + .nullable() + .describe('The geographic longitude where the payment originated.') + .optional(), + /** The state/county/province/region where the payment originated. */ + region: z + .string() + .max(5000) + .nullable() + .describe( + 'The state/county/province/region where the payment originated.' + ) + .optional() + }) + export type RadarReviewResourceLocation = z.infer< + typeof RadarReviewResourceLocationSchema + > + + export const RadarReviewResourceSessionSchema = z.object({ + /** The browser used in this browser session (e.g., `Chrome`). */ + browser: z + .string() + .max(5000) + .nullable() + .describe('The browser used in this browser session (e.g., `Chrome`).') + .optional(), + /** Information about the device used for the browser session (e.g., `Samsung SM-G930T`). */ + device: z + .string() + .max(5000) + .nullable() + .describe( + 'Information about the device used for the browser session (e.g., `Samsung SM-G930T`).' + ) + .optional(), + /** The platform for the browser session (e.g., `Macintosh`). */ + platform: z + .string() + .max(5000) + .nullable() + .describe('The platform for the browser session (e.g., `Macintosh`).') + .optional(), + /** The version for the browser session (e.g., `61.0.3163.100`). */ + version: z + .string() + .max(5000) + .nullable() + .describe('The version for the browser session (e.g., `61.0.3163.100`).') + .optional() + }) + export type RadarReviewResourceSession = z.infer< + typeof RadarReviewResourceSessionSchema + > + + export const InvoicesResourceInvoiceTaxIdSchema = z.object({ + /** 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`, or `unknown` */ + type: z + .enum([ + 'ad_nrt', + 'ae_trn', + 'al_tin', + 'am_tin', + 'ao_tin', + 'ar_cuit', + 'au_abn', + 'au_arn', + 'ba_tin', + 'bb_tin', + 'bg_uic', + 'bh_vat', + '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', + 'cn_tin', + 'co_nit', + 'cr_tin', + 'de_stn', + 'do_rcn', + 'ec_ruc', + 'eg_tin', + 'es_cif', + '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', + 'kh_tin', + 'kr_brn', + 'kz_bin', + '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' + ]) + .describe( + '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`, or `unknown`' + ), + /** The value of the tax ID. */ + value: z + .string() + .max(5000) + .nullable() + .describe('The value of the tax ID.') + .optional() + }) + export type InvoicesResourceInvoiceTaxId = z.infer< + typeof InvoicesResourceInvoiceTaxIdSchema + > + + /** 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 TaxRateFlatAmountSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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).' + ), + /** Three-letter ISO currency code, in lowercase. */ + currency: z + .string() + .max(5000) + .describe('Three-letter ISO currency code, in lowercase.') + }) + .describe( + '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 TaxRateFlatAmount = z.infer + + export const InvoiceLineItemPeriodSchema = z.object({ + /** The end of the period, which must be greater than or equal to the start. This value is inclusive. */ + end: z + .number() + .int() + .describe( + 'The end of the period, which must be greater than or equal to the start. This value is inclusive.' + ), + /** The start of the period. This value is inclusive. */ + start: z + .number() + .int() + .describe('The start of the period. This value is inclusive.') + }) + export type InvoiceLineItemPeriod = z.infer< + typeof InvoiceLineItemPeriodSchema + > + + export const CustomUnitAmountSchema = z.object({ + /** The maximum unit amount the customer can specify for this item. */ + maximum: z + .number() + .int() + .nullable() + .describe( + 'The maximum unit amount the customer can specify for this item.' + ) + .optional(), + /** The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + minimum: z + .number() + .int() + .nullable() + .describe( + 'The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.' + ) + .optional(), + /** The starting unit amount which can be updated by the customer. */ + preset: z + .number() + .int() + .nullable() + .describe( + 'The starting unit amount which can be updated by the customer.' + ) + .optional() + }) + export type CustomUnitAmount = z.infer + + export const PriceTierSchema = z.object({ + /** Price for the entire tier. */ + flat_amount: z + .number() + .int() + .nullable() + .describe('Price for the entire tier.') + .optional(), + /** Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. */ + flat_amount_decimal: z + .string() + .nullable() + .describe( + 'Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.' + ) + .optional(), + /** Per unit price for units relevant to the tier. */ + unit_amount: z + .number() + .int() + .nullable() + .describe('Per unit price for units relevant to the tier.') + .optional(), + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal: z + .string() + .nullable() + .describe( + 'Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.' + ) + .optional(), + /** Up to and including to this quantity will be contained in the tier. */ + up_to: z + .number() + .int() + .nullable() + .describe( + 'Up to and including to this quantity will be contained in the tier.' + ) + .optional() + }) + export type PriceTier = z.infer + + export const ProductMarketingFeatureSchema = z.object({ + /** The marketing feature name. Up to 80 characters long. */ + name: z + .string() + .max(5000) + .describe('The marketing feature name. Up to 80 characters long.') + .optional() + }) + export type ProductMarketingFeature = z.infer< + typeof ProductMarketingFeatureSchema + > + + export const PackageDimensionsSchema = z.object({ + /** Height, in inches. */ + height: z.number().describe('Height, in inches.'), + /** Length, in inches. */ + length: z.number().describe('Length, in inches.'), + /** Weight, in ounces. */ + weight: z.number().describe('Weight, in ounces.'), + /** Width, in inches. */ + width: z.number().describe('Width, in inches.') + }) + export type PackageDimensions = z.infer + + /** [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ + export const TaxCodeSchema = z + .object({ + /** A detailed description of which types of products the tax code represents. */ + description: z + .string() + .max(5000) + .describe( + 'A detailed description of which types of products the tax code represents.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** A short name for the tax code. */ + name: z.string().max(5000).describe('A short name for the tax code.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax_code') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + '[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.' + ) + export type TaxCode = z.infer + + export const DeletedProductSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('product') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedProduct = z.infer + + export const RecurringSchema = z.object({ + /** Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. */ + aggregate_usage: z + .enum(['last_during_period', 'last_ever', 'max', 'sum']) + .nullable() + .describe( + 'Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`.' + ) + .optional(), + /** The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. */ + interval: z + .enum(['day', 'month', 'week', 'year']) + .describe( + 'The frequency at which a subscription is billed. One of `day`, `week`, `month` or `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: z + .number() + .int() + .describe( + 'The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.' + ), + /** The meter tracking the usage of a metered price */ + meter: z + .string() + .max(5000) + .nullable() + .describe('The meter tracking the usage of a metered price') + .optional(), + /** 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: z + .enum(['licensed', 'metered']) + .describe( + '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`.' + ) + }) + export type Recurring = z.infer + + export const TransformQuantitySchema = z.object({ + /** Divide usage by this number. */ + divide_by: z.number().int().describe('Divide usage by this number.'), + /** After division, either round the result `up` or `down`. */ + round: z + .enum(['down', 'up']) + .describe('After division, either round the result `up` or `down`.') + }) + export type TransformQuantity = z.infer + + export const SubscriptionsResourceBillingCycleAnchorConfigSchema = z.object({ + /** The day of the month of the billing_cycle_anchor. */ + day_of_month: z + .number() + .int() + .describe('The day of the month of the billing_cycle_anchor.'), + /** The hour of the day of the billing_cycle_anchor. */ + hour: z + .number() + .int() + .nullable() + .describe('The hour of the day of the billing_cycle_anchor.') + .optional(), + /** The minute of the hour of the billing_cycle_anchor. */ + minute: z + .number() + .int() + .nullable() + .describe('The minute of the hour of the billing_cycle_anchor.') + .optional(), + /** The month to start full cycle billing periods. */ + month: z + .number() + .int() + .nullable() + .describe('The month to start full cycle billing periods.') + .optional(), + /** The second of the minute of the billing_cycle_anchor. */ + second: z + .number() + .int() + .nullable() + .describe('The second of the minute of the billing_cycle_anchor.') + .optional() + }) + export type SubscriptionsResourceBillingCycleAnchorConfig = z.infer< + typeof SubscriptionsResourceBillingCycleAnchorConfigSchema + > + + export const SubscriptionBillingThresholdsSchema = z.object({ + /** Monetary threshold that triggers the subscription to create an invoice */ + amount_gte: z + .number() + .int() + .nullable() + .describe( + 'Monetary threshold that triggers the subscription to create an invoice' + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + '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`.' + ) + .optional() + }) + export type SubscriptionBillingThresholds = z.infer< + typeof SubscriptionBillingThresholdsSchema + > + + export const CancellationDetailsSchema = z.object({ + /** Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. */ + comment: z + .string() + .max(5000) + .nullable() + .describe( + 'Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.' + ) + .optional(), + /** The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. */ + feedback: z + .enum([ + 'customer_service', + 'low_quality', + 'missing_features', + 'other', + 'switched_service', + 'too_complex', + 'too_expensive', + 'unused' + ]) + .nullable() + .describe( + 'The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.' + ) + .optional(), + /** Why this subscription was canceled. */ + reason: z + .enum(['cancellation_requested', 'payment_disputed', 'payment_failed']) + .nullable() + .describe('Why this subscription was canceled.') + .optional() + }) + export type CancellationDetails = z.infer + + export const SubscriptionItemBillingThresholdsSchema = z.object({ + /** Usage threshold that triggers the subscription to create an invoice */ + usage_gte: z + .number() + .int() + .nullable() + .describe( + 'Usage threshold that triggers the subscription to create an invoice' + ) + .optional() + }) + export type SubscriptionItemBillingThresholds = z.infer< + typeof SubscriptionItemBillingThresholdsSchema + > + + /** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ + export const SubscriptionsResourcePauseCollectionSchema = z + .object({ + /** The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. */ + behavior: z + .enum(['keep_as_draft', 'mark_uncollectible', 'void']) + .describe( + 'The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.' + ), + /** The time after which the subscription will resume collecting payments. */ + resumes_at: z + .number() + .int() + .nullable() + .describe( + 'The time after which the subscription will resume collecting payments.' + ) + .optional() + }) + .describe( + 'The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.' + ) + export type SubscriptionsResourcePauseCollection = z.infer< + typeof SubscriptionsResourcePauseCollectionSchema + > + + export const InvoicePaymentMethodOptionsAcssDebitMandateOptionsSchema = + z.object({ + /** Transaction type of the mandate. */ + transaction_type: z + .enum(['business', 'personal']) + .nullable() + .describe('Transaction type of the mandate.') + .optional() + }) + export type InvoicePaymentMethodOptionsAcssDebitMandateOptions = z.infer< + typeof InvoicePaymentMethodOptionsAcssDebitMandateOptionsSchema + > + + export const InvoicePaymentMethodOptionsBancontactSchema = z.object({ + /** Preferred language of the Bancontact authorization page that the customer is redirected to. */ + preferred_language: z + .enum(['de', 'en', 'fr', 'nl']) + .describe( + 'Preferred language of the Bancontact authorization page that the customer is redirected to.' + ) + }) + export type InvoicePaymentMethodOptionsBancontact = z.infer< + typeof InvoicePaymentMethodOptionsBancontactSchema + > + + export const InvoiceMandateOptionsCardSchema = z.object({ + /** Amount to be charged for future payments. */ + amount: z + .number() + .int() + .nullable() + .describe('Amount to be charged for future payments.') + .optional(), + /** 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: z + .enum(['fixed', 'maximum']) + .nullable() + .describe( + '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.' + ) + .optional(), + /** A description of the mandate or subscription that is meant to be displayed to the customer. */ + description: z + .string() + .max(200) + .nullable() + .describe( + 'A description of the mandate or subscription that is meant to be displayed to the customer.' + ) + .optional() + }) + export type InvoiceMandateOptionsCard = z.infer< + typeof InvoiceMandateOptionsCardSchema + > + + export const InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferSchema = + z.object({ + /** The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. */ + country: z + .enum(['BE', 'DE', 'ES', 'FR', 'IE', 'NL']) + .describe( + 'The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.' + ) + }) + export type InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer = + z.infer< + typeof InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferSchema + > + + export const InvoicePaymentMethodOptionsKonbiniSchema = z.object({}) + export type InvoicePaymentMethodOptionsKonbini = z.infer< + typeof InvoicePaymentMethodOptionsKonbiniSchema + > + + export const InvoicePaymentMethodOptionsSepaDebitSchema = z.object({}) + export type InvoicePaymentMethodOptionsSepaDebit = z.infer< + typeof InvoicePaymentMethodOptionsSepaDebitSchema + > + + export const InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersSchema = + z.object({ + /** The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. */ + account_subcategories: z + .array(z.enum(['checking', 'savings'])) + .describe( + 'The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.' + ) + .optional() + }) + export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFilters = + z.infer< + typeof InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersSchema + > + + export const SubscriptionPendingInvoiceItemIntervalSchema = z.object({ + /** Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. */ + interval: z + .enum(['day', 'month', 'week', 'year']) + .describe( + 'Specifies invoicing frequency. Either `day`, `week`, `month` or `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: z + .number() + .int() + .describe( + '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).' + ) + }) + export type SubscriptionPendingInvoiceItemInterval = z.infer< + typeof SubscriptionPendingInvoiceItemIntervalSchema + > + + export const PaymentFlowsAutomaticPaymentMethodsSetupIntentSchema = z.object({ + /** + * 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: z + .enum(['always', 'never']) + .describe( + "Controls whether this SetupIntent will accept redirect-based payment methods.\n\nRedirect-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." + ) + .optional(), + /** Automatically calculates compatible payment methods */ + enabled: z + .boolean() + .nullable() + .describe('Automatically calculates compatible payment methods') + .optional() + }) + export type PaymentFlowsAutomaticPaymentMethodsSetupIntent = z.infer< + typeof PaymentFlowsAutomaticPaymentMethodsSetupIntentSchema + > + + export const PaymentIntentNextActionCashappQrCodeSchema = z.object({ + /** The date (unix timestamp) when the QR code expires. */ + expires_at: z + .number() + .int() + .describe('The date (unix timestamp) when the QR code expires.'), + /** The image_url_png string used to render QR code */ + image_url_png: z + .string() + .max(5000) + .describe('The image_url_png string used to render QR code'), + /** The image_url_svg string used to render QR code */ + image_url_svg: z + .string() + .max(5000) + .describe('The image_url_svg string used to render QR code') + }) + export type PaymentIntentNextActionCashappQrCode = z.infer< + typeof PaymentIntentNextActionCashappQrCodeSchema + > + + export const SetupIntentNextActionRedirectToUrlSchema = z.object({ + /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url: z + .string() + .max(5000) + .nullable() + .describe( + 'If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.' + ) + .optional(), + /** The URL you must redirect your customer to in order to authenticate. */ + url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL you must redirect your customer to in order to authenticate.' + ) + .optional() + }) + export type SetupIntentNextActionRedirectToUrl = z.infer< + typeof SetupIntentNextActionRedirectToUrlSchema + > + + export const SetupIntentNextActionVerifyWithMicrodepositsSchema = z.object({ + /** The timestamp when the microdeposits are expected to land. */ + arrival_date: z + .number() + .int() + .describe('The timestamp when the microdeposits are expected to land.'), + /** The URL for the hosted verification page, which allows customers to verify their bank account. */ + hosted_verification_url: z + .string() + .max(5000) + .describe( + 'The URL for the hosted verification page, which allows customers to verify their bank account.' + ), + /** The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. */ + microdeposit_type: z + .enum(['amounts', 'descriptor_code']) + .nullable() + .describe( + 'The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.' + ) + .optional() + }) + export type SetupIntentNextActionVerifyWithMicrodeposits = z.infer< + typeof SetupIntentNextActionVerifyWithMicrodepositsSchema + > + + export const PaymentMethodConfigBizPaymentMethodConfigurationDetailsSchema = + z.object({ + /** ID of the payment method configuration used. */ + id: z + .string() + .max(5000) + .describe('ID of the payment method configuration used.'), + /** ID of the parent payment method configuration used. */ + parent: z + .string() + .max(5000) + .nullable() + .describe('ID of the parent payment method configuration used.') + .optional() + }) + export type PaymentMethodConfigBizPaymentMethodConfigurationDetails = z.infer< + typeof PaymentMethodConfigBizPaymentMethodConfigurationDetailsSchema + > + + export const SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitSchema = + z.object({ + /** A URL for custom mandate text */ + custom_mandate_url: z + .string() + .max(5000) + .describe('A URL for custom mandate text') + .optional(), + /** List of Stripe products where this mandate can be selected automatically. */ + default_for: z + .array(z.enum(['invoice', 'subscription'])) + .describe( + 'List of Stripe products where this mandate can be selected automatically.' + ) + .optional(), + /** Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description: z + .string() + .max(5000) + .nullable() + .describe( + "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'." + ) + .optional(), + /** Payment schedule for the mandate. */ + payment_schedule: z + .enum(['combined', 'interval', 'sporadic']) + .nullable() + .describe('Payment schedule for the mandate.') + .optional(), + /** Transaction type of the mandate. */ + transaction_type: z + .enum(['business', 'personal']) + .nullable() + .describe('Transaction type of the mandate.') + .optional() + }) + export type SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit = z.infer< + typeof SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitSchema + > + + export const SetupIntentTypeSpecificPaymentMethodOptionsClientSchema = + z.object({ + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type SetupIntentTypeSpecificPaymentMethodOptionsClient = z.infer< + typeof SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + > + + export const SetupIntentPaymentMethodOptionsAmazonPaySchema = z.object({}) + export type SetupIntentPaymentMethodOptionsAmazonPay = z.infer< + typeof SetupIntentPaymentMethodOptionsAmazonPaySchema + > + + export const SetupIntentPaymentMethodOptionsMandateOptionsBacsDebitSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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'." + ) + .optional() + }) + export type SetupIntentPaymentMethodOptionsMandateOptionsBacsDebit = z.infer< + typeof SetupIntentPaymentMethodOptionsMandateOptionsBacsDebitSchema + > + + export const SetupIntentPaymentMethodOptionsCardMandateOptionsSchema = + z.object({ + /** Amount to be charged for future payments. */ + amount: z + .number() + .int() + .describe('Amount to be charged for future payments.'), + /** 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: z + .enum(['fixed', 'maximum']) + .describe( + '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.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** A description of the mandate or subscription that is meant to be displayed to the customer. */ + description: z + .string() + .max(200) + .nullable() + .describe( + 'A description of the mandate or subscription that is meant to be displayed to the customer.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. */ + interval: z + .enum(['day', 'month', 'sporadic', 'week', 'year']) + .describe( + 'Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** Unique identifier for the mandate or subscription. */ + reference: z + .string() + .max(80) + .describe('Unique identifier for the mandate or subscription.'), + /** Start date of the mandate or subscription. Start date should not be lesser than yesterday. */ + start_date: z + .number() + .int() + .describe( + 'Start date of the mandate or subscription. Start date should not be lesser than yesterday.' + ), + /** Specifies the type of mandates supported. Possible values are `india`. */ + supported_types: z + .array(z.literal('india')) + .nullable() + .describe( + 'Specifies the type of mandates supported. Possible values are `india`.' + ) + .optional() + }) + export type SetupIntentPaymentMethodOptionsCardMandateOptions = z.infer< + typeof SetupIntentPaymentMethodOptionsCardMandateOptionsSchema + > + + export const SetupIntentPaymentMethodOptionsCardPresentSchema = z.object({}) + export type SetupIntentPaymentMethodOptionsCardPresent = z.infer< + typeof SetupIntentPaymentMethodOptionsCardPresentSchema + > + + export const SetupIntentPaymentMethodOptionsLinkSchema = z.object({}) + export type SetupIntentPaymentMethodOptionsLink = z.infer< + typeof SetupIntentPaymentMethodOptionsLinkSchema + > + + export const SetupIntentPaymentMethodOptionsPaypalSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.' + ) + .optional() + }) + export type SetupIntentPaymentMethodOptionsPaypal = z.infer< + typeof SetupIntentPaymentMethodOptionsPaypalSchema + > + + export const SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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'." + ) + .optional() + }) + export type SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit = z.infer< + typeof SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitSchema + > + + export const PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersSchema = + z.object({ + /** The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. */ + account_subcategories: z + .array(z.enum(['checking', 'savings'])) + .describe( + 'The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.' + ) + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFilters = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersSchema + > + + export const PaymentMethodOptionsUsBankAccountMandateOptionsSchema = z.object( + { + /** Mandate collection method */ + collection_method: z + .literal('paper') + .describe('Mandate collection method') + .optional() + } + ) + export type PaymentMethodOptionsUsBankAccountMandateOptions = z.infer< + typeof PaymentMethodOptionsUsBankAccountMandateOptionsSchema + > + + export const SubscriptionScheduleCurrentPhaseSchema = z.object({ + /** The end of this phase of the subscription schedule. */ + end_date: z + .number() + .int() + .describe('The end of this phase of the subscription schedule.'), + /** The start of this phase of the subscription schedule. */ + start_date: z + .number() + .int() + .describe('The start of this phase of the subscription schedule.') + }) + export type SubscriptionScheduleCurrentPhase = z.infer< + typeof SubscriptionScheduleCurrentPhaseSchema + > + + export const DeletedPriceSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('price') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedPrice = z.infer + + export const DeletedCouponSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('coupon') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedCoupon = z.infer + + export const BillingClocksResourceStatusDetailsAdvancingStatusDetailsSchema = + z.object({ + /** The `frozen_time` that the Test Clock is advancing towards. */ + target_frozen_time: z + .number() + .int() + .describe('The `frozen_time` that the Test Clock is advancing towards.') + }) + export type BillingClocksResourceStatusDetailsAdvancingStatusDetails = + z.infer< + typeof BillingClocksResourceStatusDetailsAdvancingStatusDetailsSchema + > + + /** Defines how a subscription behaves when a free trial ends. */ + export const SubscriptionsTrialsResourceEndBehaviorSchema = z + .object({ + /** Indicates how the subscription should change when the trial ends if the user did not provide a payment method. */ + missing_payment_method: z + .enum(['cancel', 'create_invoice', 'pause']) + .describe( + 'Indicates how the subscription should change when the trial ends if the user did not provide a payment method.' + ) + }) + .describe('Defines how a subscription behaves when a free trial ends.') + export type SubscriptionsTrialsResourceEndBehavior = z.infer< + typeof SubscriptionsTrialsResourceEndBehaviorSchema + > + + export const BillingCreditGrantsResourceMonetaryAmountSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** A positive integer representing the amount. */ + value: z + .number() + .int() + .describe('A positive integer representing the amount.') + }) + export type BillingCreditGrantsResourceMonetaryAmount = z.infer< + typeof BillingCreditGrantsResourceMonetaryAmountSchema + > + + export const BillingCreditGrantsResourceApplicablePriceSchema = z.object({ + /** Unique identifier for the object. */ + id: z + .string() + .max(5000) + .nullable() + .describe('Unique identifier for the object.') + .optional() + }) + export type BillingCreditGrantsResourceApplicablePrice = z.infer< + typeof BillingCreditGrantsResourceApplicablePriceSchema + > + + export const InvoicesResourceLineItemsCreditedItemsSchema = z.object({ + /** Invoice containing the credited invoice line items */ + invoice: z + .string() + .max(5000) + .describe('Invoice containing the credited invoice line items'), + /** Credited invoice line items */ + invoice_line_items: z + .array(z.string().max(5000)) + .describe('Credited invoice line items') + }) + export type InvoicesResourceLineItemsCreditedItems = z.infer< + typeof InvoicesResourceLineItemsCreditedItemsSchema + > + + export const InvoiceInstallmentsCardSchema = z.object({ + /** Whether Installments are enabled for this Invoice. */ + enabled: z + .boolean() + .nullable() + .describe('Whether Installments are enabled for this Invoice.') + .optional() + }) + export type InvoiceInstallmentsCard = z.infer< + typeof InvoiceInstallmentsCardSchema + > + + export const DeletedInvoiceSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('invoice') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedInvoice = z.infer + + export const QuotesResourceStatusTransitionsSchema = z.object({ + /** The time that the quote was accepted. Measured in seconds since Unix epoch. */ + accepted_at: z + .number() + .int() + .nullable() + .describe( + 'The time that the quote was accepted. Measured in seconds since Unix epoch.' + ) + .optional(), + /** The time that the quote was canceled. Measured in seconds since Unix epoch. */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'The time that the quote was canceled. Measured in seconds since Unix epoch.' + ) + .optional(), + /** The time that the quote was finalized. Measured in seconds since Unix epoch. */ + finalized_at: z + .number() + .int() + .nullable() + .describe( + 'The time that the quote was finalized. Measured in seconds since Unix epoch.' + ) + .optional() + }) + export type QuotesResourceStatusTransitions = z.infer< + typeof QuotesResourceStatusTransitionsSchema + > + + export const QuotesResourceSubscriptionDataSubscriptionDataSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + "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." + ) + .optional(), + /** Integer representing the number of trial period days before the customer is charged for the first time. */ + trial_period_days: z + .number() + .int() + .nullable() + .describe( + 'Integer representing the number of trial period days before the customer is charged for the first time.' + ) + .optional() + }) + export type QuotesResourceSubscriptionDataSubscriptionData = z.infer< + typeof QuotesResourceSubscriptionDataSubscriptionDataSchema + > + + export const InvoiceRenderingPdfSchema = z.object({ + /** 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: z + .enum(['a4', 'auto', 'letter']) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type InvoiceRenderingPdf = z.infer + + export const ShippingRateDeliveryEstimateBoundSchema = z.object({ + /** A unit of time. */ + unit: z + .enum(['business_day', 'day', 'hour', 'month', 'week']) + .describe('A unit of time.'), + /** Must be greater than 0. */ + value: z.number().int().describe('Must be greater than 0.') + }) + export type ShippingRateDeliveryEstimateBound = z.infer< + typeof ShippingRateDeliveryEstimateBoundSchema + > + + export const ShippingRateCurrencyOptionSchema = z.object({ + /** A non-negative integer in cents representing how much to charge. */ + amount: z + .number() + .int() + .describe( + 'A non-negative integer in cents representing how much to charge.' + ), + /** Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. */ + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .describe( + 'Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.' + ) + }) + export type ShippingRateCurrencyOption = z.infer< + typeof ShippingRateCurrencyOptionSchema + > + + export const InvoicesResourceStatusTransitionsSchema = z.object({ + /** The time that the invoice draft was finalized. */ + finalized_at: z + .number() + .int() + .nullable() + .describe('The time that the invoice draft was finalized.') + .optional(), + /** The time that the invoice was marked uncollectible. */ + marked_uncollectible_at: z + .number() + .int() + .nullable() + .describe('The time that the invoice was marked uncollectible.') + .optional(), + /** The time that the invoice was paid. */ + paid_at: z + .number() + .int() + .nullable() + .describe('The time that the invoice was paid.') + .optional(), + /** The time that the invoice was voided. */ + voided_at: z + .number() + .int() + .nullable() + .describe('The time that the invoice was voided.') + .optional() + }) + export type InvoicesResourceStatusTransitions = z.infer< + typeof InvoicesResourceStatusTransitionsSchema + > + + export const SubscriptionDetailsDataSchema = z.object({ + /** + * 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.\n *Note: This attribute is populated only for invoices created on or after June 29, 2023.*' + ) + .optional() + }) + export type SubscriptionDetailsData = z.infer< + typeof SubscriptionDetailsDataSchema + > + + export const InvoiceItemThresholdReasonSchema = z.object({ + /** The IDs of the line items that triggered the threshold invoice. */ + line_item_ids: z + .array(z.string().max(5000)) + .describe( + 'The IDs of the line items that triggered the threshold invoice.' + ), + /** The quantity threshold boundary that applied to the given line item. */ + usage_gte: z + .number() + .int() + .describe( + 'The quantity threshold boundary that applied to the given line item.' + ) + }) + export type InvoiceItemThresholdReason = z.infer< + typeof InvoiceItemThresholdReasonSchema + > + + export const PaymentIntentNextActionAlipayHandleRedirectSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. */ + native_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.' + ) + .optional(), + /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url: z + .string() + .max(5000) + .nullable() + .describe( + 'If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.' + ) + .optional(), + /** The URL you must redirect your customer to in order to authenticate the payment. */ + url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL you must redirect your customer to in order to authenticate the payment.' + ) + .optional() + }) + export type PaymentIntentNextActionAlipayHandleRedirect = z.infer< + typeof PaymentIntentNextActionAlipayHandleRedirectSchema + > + + export const PaymentIntentNextActionBoletoSchema = z.object({ + /** The timestamp after which the boleto expires. */ + expires_at: z + .number() + .int() + .nullable() + .describe('The timestamp after which the boleto expires.') + .optional(), + /** The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. */ + hosted_voucher_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.' + ) + .optional(), + /** The boleto number. */ + number: z + .string() + .max(5000) + .nullable() + .describe('The boleto number.') + .optional(), + /** The URL to the downloadable boleto voucher PDF. */ + pdf: z + .string() + .max(5000) + .nullable() + .describe('The URL to the downloadable boleto voucher PDF.') + .optional() + }) + export type PaymentIntentNextActionBoleto = z.infer< + typeof PaymentIntentNextActionBoletoSchema + > + + export const PaymentIntentNextActionCardAwaitNotificationSchema = z.object({ + /** The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. */ + charge_attempt_at: z + .number() + .int() + .nullable() + .describe( + 'The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.' + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type PaymentIntentNextActionCardAwaitNotification = z.infer< + typeof PaymentIntentNextActionCardAwaitNotificationSchema + > + + export const PaymentIntentNextActionKonbiniFamilymartSchema = z.object({ + /** The confirmation number. */ + confirmation_number: z + .string() + .max(5000) + .describe('The confirmation number.') + .optional(), + /** The payment code. */ + payment_code: z.string().max(5000).describe('The payment code.') + }) + export type PaymentIntentNextActionKonbiniFamilymart = z.infer< + typeof PaymentIntentNextActionKonbiniFamilymartSchema + > + + export const PaymentIntentNextActionKonbiniLawsonSchema = z.object({ + /** The confirmation number. */ + confirmation_number: z + .string() + .max(5000) + .describe('The confirmation number.') + .optional(), + /** The payment code. */ + payment_code: z.string().max(5000).describe('The payment code.') + }) + export type PaymentIntentNextActionKonbiniLawson = z.infer< + typeof PaymentIntentNextActionKonbiniLawsonSchema + > + + export const PaymentIntentNextActionKonbiniMinistopSchema = z.object({ + /** The confirmation number. */ + confirmation_number: z + .string() + .max(5000) + .describe('The confirmation number.') + .optional(), + /** The payment code. */ + payment_code: z.string().max(5000).describe('The payment code.') + }) + export type PaymentIntentNextActionKonbiniMinistop = z.infer< + typeof PaymentIntentNextActionKonbiniMinistopSchema + > + + export const PaymentIntentNextActionKonbiniSeicomartSchema = z.object({ + /** The confirmation number. */ + confirmation_number: z + .string() + .max(5000) + .describe('The confirmation number.') + .optional(), + /** The payment code. */ + payment_code: z.string().max(5000).describe('The payment code.') + }) + export type PaymentIntentNextActionKonbiniSeicomart = z.infer< + typeof PaymentIntentNextActionKonbiniSeicomartSchema + > + + export const PaymentIntentNextActionDisplayMultibancoDetailsSchema = z.object( + { + /** Entity number associated with this Multibanco payment. */ + entity: z + .string() + .max(5000) + .nullable() + .describe('Entity number associated with this Multibanco payment.') + .optional(), + /** The timestamp at which the Multibanco voucher expires. */ + expires_at: z + .number() + .int() + .nullable() + .describe('The timestamp at which the Multibanco voucher expires.') + .optional(), + /** The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. */ + hosted_voucher_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher.' + ) + .optional(), + /** Reference number associated with this Multibanco payment. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('Reference number associated with this Multibanco payment.') + .optional() + } + ) + export type PaymentIntentNextActionDisplayMultibancoDetails = z.infer< + typeof PaymentIntentNextActionDisplayMultibancoDetailsSchema + > + + export const PaymentIntentNextActionDisplayOxxoDetailsSchema = z.object({ + /** The timestamp after which the OXXO voucher expires. */ + expires_after: z + .number() + .int() + .nullable() + .describe('The timestamp after which the OXXO voucher expires.') + .optional(), + /** The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. */ + hosted_voucher_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.' + ) + .optional(), + /** OXXO reference number. */ + number: z + .string() + .max(5000) + .nullable() + .describe('OXXO reference number.') + .optional() + }) + export type PaymentIntentNextActionDisplayOxxoDetails = z.infer< + typeof PaymentIntentNextActionDisplayOxxoDetailsSchema + > + + export const PaymentIntentNextActionPaynowDisplayQrCodeSchema = z.object({ + /** The raw data string used to generate QR code, it should be used together with QR code library. */ + data: z + .string() + .max(5000) + .describe( + 'The raw data string used to generate QR code, it should be used together with QR code library.' + ), + /** The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. */ + hosted_instructions_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.' + ) + .optional(), + /** The image_url_png string used to render QR code */ + image_url_png: z + .string() + .max(5000) + .describe('The image_url_png string used to render QR code'), + /** The image_url_svg string used to render QR code */ + image_url_svg: z + .string() + .max(5000) + .describe('The image_url_svg string used to render QR code') + }) + export type PaymentIntentNextActionPaynowDisplayQrCode = z.infer< + typeof PaymentIntentNextActionPaynowDisplayQrCodeSchema + > + + export const PaymentIntentNextActionPixDisplayQrCodeSchema = z.object({ + /** The raw data string used to generate QR code, it should be used together with QR code library. */ + data: z + .string() + .max(5000) + .describe( + 'The raw data string used to generate QR code, it should be used together with QR code library.' + ) + .optional(), + /** The date (unix timestamp) when the PIX expires. */ + expires_at: z + .number() + .int() + .describe('The date (unix timestamp) when the PIX expires.') + .optional(), + /** The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + hosted_instructions_url: z + .string() + .max(5000) + .describe( + 'The URL to the hosted pix instructions page, which allows customers to view the pix QR code.' + ) + .optional(), + /** The image_url_png string used to render png QR code */ + image_url_png: z + .string() + .max(5000) + .describe('The image_url_png string used to render png QR code') + .optional(), + /** The image_url_svg string used to render svg QR code */ + image_url_svg: z + .string() + .max(5000) + .describe('The image_url_svg string used to render svg QR code') + .optional() + }) + export type PaymentIntentNextActionPixDisplayQrCode = z.infer< + typeof PaymentIntentNextActionPixDisplayQrCodeSchema + > + + export const PaymentIntentNextActionPromptpayDisplayQrCodeSchema = z.object({ + /** The raw data string used to generate QR code, it should be used together with QR code library. */ + data: z + .string() + .max(5000) + .describe( + 'The raw data string used to generate QR code, it should be used together with QR code library.' + ), + /** The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + hosted_instructions_url: z + .string() + .max(5000) + .describe( + 'The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.' + ), + /** The PNG path used to render the QR code, can be used as the source in an HTML img tag */ + image_url_png: z + .string() + .max(5000) + .describe( + 'The PNG path used to render the QR code, can be used as the source in an HTML img tag' + ), + /** The SVG path used to render the QR code, can be used as the source in an HTML img tag */ + image_url_svg: z + .string() + .max(5000) + .describe( + 'The SVG path used to render the QR code, can be used as the source in an HTML img tag' + ) + }) + export type PaymentIntentNextActionPromptpayDisplayQrCode = z.infer< + typeof PaymentIntentNextActionPromptpayDisplayQrCodeSchema + > + + export const PaymentIntentNextActionRedirectToUrlSchema = z.object({ + /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url: z + .string() + .max(5000) + .nullable() + .describe( + 'If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.' + ) + .optional(), + /** The URL you must redirect your customer to in order to authenticate the payment. */ + url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL you must redirect your customer to in order to authenticate the payment.' + ) + .optional() + }) + export type PaymentIntentNextActionRedirectToUrl = z.infer< + typeof PaymentIntentNextActionRedirectToUrlSchema + > + + export const PaymentIntentNextActionSwishQrCodeSchema = z.object({ + /** The raw data string used to generate QR code, it should be used together with QR code library. */ + data: z + .string() + .max(5000) + .describe( + 'The raw data string used to generate QR code, it should be used together with QR code library.' + ), + /** The image_url_png string used to render QR code */ + image_url_png: z + .string() + .max(5000) + .describe('The image_url_png string used to render QR code'), + /** The image_url_svg string used to render QR code */ + image_url_svg: z + .string() + .max(5000) + .describe('The image_url_svg string used to render QR code') + }) + export type PaymentIntentNextActionSwishQrCode = z.infer< + typeof PaymentIntentNextActionSwishQrCodeSchema + > + + export const PaymentIntentNextActionVerifyWithMicrodepositsSchema = z.object({ + /** The timestamp when the microdeposits are expected to land. */ + arrival_date: z + .number() + .int() + .describe('The timestamp when the microdeposits are expected to land.'), + /** The URL for the hosted verification page, which allows customers to verify their bank account. */ + hosted_verification_url: z + .string() + .max(5000) + .describe( + 'The URL for the hosted verification page, which allows customers to verify their bank account.' + ), + /** The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. */ + microdeposit_type: z + .enum(['amounts', 'descriptor_code']) + .nullable() + .describe( + 'The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.' + ) + .optional() + }) + export type PaymentIntentNextActionVerifyWithMicrodeposits = z.infer< + typeof PaymentIntentNextActionVerifyWithMicrodepositsSchema + > + + export const PaymentIntentNextActionWechatPayDisplayQrCodeSchema = z.object({ + /** The data being used to generate QR code */ + data: z + .string() + .max(5000) + .describe('The data being used to generate QR code'), + /** The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. */ + hosted_instructions_url: z + .string() + .max(5000) + .describe( + 'The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.' + ), + /** The base64 image data for a pre-generated QR code */ + image_data_url: z + .string() + .max(5000) + .describe('The base64 image data for a pre-generated QR code'), + /** The image_url_png string used to render QR code */ + image_url_png: z + .string() + .max(5000) + .describe('The image_url_png string used to render QR code'), + /** The image_url_svg string used to render QR code */ + image_url_svg: z + .string() + .max(5000) + .describe('The image_url_svg string used to render QR code') + }) + export type PaymentIntentNextActionWechatPayDisplayQrCode = z.infer< + typeof PaymentIntentNextActionWechatPayDisplayQrCodeSchema + > + + export const PaymentIntentNextActionWechatPayRedirectToAndroidAppSchema = + z.object({ + /** app_id is the APP ID registered on WeChat open platform */ + app_id: z + .string() + .max(5000) + .describe('app_id is the APP ID registered on WeChat open platform'), + /** nonce_str is a random string */ + nonce_str: z.string().max(5000).describe('nonce_str is a random string'), + /** package is static value */ + package: z.string().max(5000).describe('package is static value'), + /** an unique merchant ID assigned by WeChat Pay */ + partner_id: z + .string() + .max(5000) + .describe('an unique merchant ID assigned by WeChat Pay'), + /** an unique trading ID assigned by WeChat Pay */ + prepay_id: z + .string() + .max(5000) + .describe('an unique trading ID assigned by WeChat Pay'), + /** A signature */ + sign: z.string().max(5000).describe('A signature'), + /** Specifies the current time in epoch format */ + timestamp: z + .string() + .max(5000) + .describe('Specifies the current time in epoch format') + }) + export type PaymentIntentNextActionWechatPayRedirectToAndroidApp = z.infer< + typeof PaymentIntentNextActionWechatPayRedirectToAndroidAppSchema + > + + export const PaymentIntentNextActionWechatPayRedirectToIosAppSchema = + z.object({ + /** An universal link that redirect to WeChat Pay app */ + native_url: z + .string() + .max(5000) + .describe('An universal link that redirect to WeChat Pay app') + }) + export type PaymentIntentNextActionWechatPayRedirectToIosApp = z.infer< + typeof PaymentIntentNextActionWechatPayRedirectToIosAppSchema + > + + export const PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitSchema = + z.object({ + /** A URL for custom mandate text */ + custom_mandate_url: z + .string() + .max(5000) + .describe('A URL for custom mandate text') + .optional(), + /** Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description: z + .string() + .max(5000) + .nullable() + .describe( + "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'." + ) + .optional(), + /** Payment schedule for the mandate. */ + payment_schedule: z + .enum(['combined', 'interval', 'sporadic']) + .nullable() + .describe('Payment schedule for the mandate.') + .optional(), + /** Transaction type of the mandate. */ + transaction_type: z + .enum(['business', 'personal']) + .nullable() + .describe('Transaction type of the mandate.') + .optional() + }) + export type PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit = + z.infer< + typeof PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitSchema + > + + export const PaymentMethodOptionsCardPresentRoutingSchema = z.object({ + /** Requested routing priority */ + requested_priority: z + .enum(['domestic', 'international']) + .nullable() + .describe('Requested routing priority') + .optional() + }) + export type PaymentMethodOptionsCardPresentRouting = z.infer< + typeof PaymentMethodOptionsCardPresentRoutingSchema + > + + export const PaymentMethodOptionsAffirmSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** Preferred language of the Affirm authorization page that the customer is redirected to. */ + preferred_locale: z + .string() + .max(30) + .describe( + 'Preferred language of the Affirm authorization page that the customer is redirected to.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsAffirm = z.infer< + typeof PaymentMethodOptionsAffirmSchema + > + + export const PaymentMethodOptionsAfterpayClearpaySchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\nThis field differs from the statement descriptor and item name.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsAfterpayClearpay = z.infer< + typeof PaymentMethodOptionsAfterpayClearpaySchema + > + + export const PaymentMethodOptionsAlipaySchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsAlipay = z.infer< + typeof PaymentMethodOptionsAlipaySchema + > + + export const PaymentMethodOptionsAlmaSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type PaymentMethodOptionsAlma = z.infer< + typeof PaymentMethodOptionsAlmaSchema + > + + export const PaymentMethodOptionsAmazonPaySchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsAmazonPay = z.infer< + typeof PaymentMethodOptionsAmazonPaySchema + > + + export const PaymentIntentPaymentMethodOptionsAuBecsDebitSchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsAuBecsDebit = z.infer< + typeof PaymentIntentPaymentMethodOptionsAuBecsDebitSchema + > + + export const PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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'." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebit = + z.infer< + typeof PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitSchema + > + + export const PaymentMethodOptionsBancontactSchema = z.object({ + /** Preferred language of the Bancontact authorization page that the customer is redirected to. */ + preferred_language: z + .enum(['de', 'en', 'fr', 'nl']) + .describe( + 'Preferred language of the Bancontact authorization page that the customer is redirected to.' + ), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsBancontact = z.infer< + typeof PaymentMethodOptionsBancontactSchema + > + + export const PaymentIntentPaymentMethodOptionsBlikSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsBlik = z.infer< + typeof PaymentIntentPaymentMethodOptionsBlikSchema + > + + export const PaymentMethodOptionsBoletoSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsBoleto = z.infer< + typeof PaymentMethodOptionsBoletoSchema + > + + export const PaymentMethodOptionsCardMandateOptionsSchema = z.object({ + /** Amount to be charged for future payments. */ + amount: z + .number() + .int() + .describe('Amount to be charged for future payments.'), + /** 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: z + .enum(['fixed', 'maximum']) + .describe( + '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.' + ), + /** A description of the mandate or subscription that is meant to be displayed to the customer. */ + description: z + .string() + .max(200) + .nullable() + .describe( + 'A description of the mandate or subscription that is meant to be displayed to the customer.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. */ + interval: z + .enum(['day', 'month', 'sporadic', 'week', 'year']) + .describe( + 'Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** Unique identifier for the mandate or subscription. */ + reference: z + .string() + .max(80) + .describe('Unique identifier for the mandate or subscription.'), + /** Start date of the mandate or subscription. Start date should not be lesser than yesterday. */ + start_date: z + .number() + .int() + .describe( + 'Start date of the mandate or subscription. Start date should not be lesser than yesterday.' + ), + /** Specifies the type of mandates supported. Possible values are `india`. */ + supported_types: z + .array(z.literal('india')) + .nullable() + .describe( + 'Specifies the type of mandates supported. Possible values are `india`.' + ) + .optional() + }) + export type PaymentMethodOptionsCardMandateOptions = z.infer< + typeof PaymentMethodOptionsCardMandateOptionsSchema + > + + export const PaymentMethodOptionsCashappSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsCashapp = z.infer< + typeof PaymentMethodOptionsCashappSchema + > + + export const PaymentMethodOptionsCustomerBalanceEuBankAccountSchema = + z.object({ + /** The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. */ + country: z + .enum(['BE', 'DE', 'ES', 'FR', 'IE', 'NL']) + .describe( + 'The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.' + ) + }) + export type PaymentMethodOptionsCustomerBalanceEuBankAccount = z.infer< + typeof PaymentMethodOptionsCustomerBalanceEuBankAccountSchema + > + + export const PaymentIntentPaymentMethodOptionsEpsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsEps = z.infer< + typeof PaymentIntentPaymentMethodOptionsEpsSchema + > + + export const PaymentMethodOptionsFpxSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsFpx = z.infer< + typeof PaymentMethodOptionsFpxSchema + > + + export const PaymentMethodOptionsGiropaySchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsGiropay = z.infer< + typeof PaymentMethodOptionsGiropaySchema + > + + export const PaymentMethodOptionsGrabpaySchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsGrabpay = z.infer< + typeof PaymentMethodOptionsGrabpaySchema + > + + export const PaymentMethodOptionsIdealSchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsIdeal = z.infer< + typeof PaymentMethodOptionsIdealSchema + > + + export const PaymentMethodOptionsInteracPresentSchema = z.object({}) + export type PaymentMethodOptionsInteracPresent = z.infer< + typeof PaymentMethodOptionsInteracPresentSchema + > + + export const PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptionsSchema = + z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptions = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptionsSchema + > + + export const PaymentMethodOptionsKlarnaSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** Preferred locale of the Klarna checkout page that the customer is redirected to. */ + preferred_locale: z + .string() + .max(5000) + .nullable() + .describe( + 'Preferred locale of the Klarna checkout page that the customer is redirected to.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsKlarna = z.infer< + typeof PaymentMethodOptionsKlarnaSchema + > + + export const PaymentMethodOptionsKonbiniSchema = z.object({ + /** An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + confirmation_number: z + .string() + .max(5000) + .nullable() + .describe( + 'An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. */ + expires_at: z + .number() + .int() + .nullable() + .describe( + 'The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.' + ) + .optional(), + /** A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + product_description: z + .string() + .max(5000) + .nullable() + .describe( + 'A product descriptor of up to 22 characters, which will appear to customers at the convenience store.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsKonbini = z.infer< + typeof PaymentMethodOptionsKonbiniSchema + > + + export const PaymentMethodOptionsKrCardSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsKrCard = z.infer< + typeof PaymentMethodOptionsKrCardSchema + > + + export const PaymentIntentPaymentMethodOptionsLinkSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsLink = z.infer< + typeof PaymentIntentPaymentMethodOptionsLinkSchema + > + + export const PaymentIntentPaymentMethodOptionsMobilepaySchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsMobilepay = z.infer< + typeof PaymentIntentPaymentMethodOptionsMobilepaySchema + > + + export const PaymentMethodOptionsMultibancoSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsMultibanco = z.infer< + typeof PaymentMethodOptionsMultibancoSchema + > + + export const PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptionsSchema = + z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptions = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptionsSchema + > + + export const PaymentMethodOptionsOxxoSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsOxxo = z.infer< + typeof PaymentMethodOptionsOxxoSchema + > + + export const PaymentMethodOptionsP24Schema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsP24 = z.infer< + typeof PaymentMethodOptionsP24Schema + > + + export const PaymentMethodOptionsPayByBankSchema = z.object({}) + export type PaymentMethodOptionsPayByBank = z.infer< + typeof PaymentMethodOptionsPayByBankSchema + > + + export const PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptionsSchema = + z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptions = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptionsSchema + > + + export const PaymentMethodOptionsPaynowSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsPaynow = z.infer< + typeof PaymentMethodOptionsPaynowSchema + > + + export const PaymentMethodOptionsPaypalSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale: z + .string() + .max(5000) + .nullable() + .describe( + 'Preferred locale of the PayPal checkout page that the customer is redirected to.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsPaypal = z.infer< + typeof PaymentMethodOptionsPaypalSchema + > + + export const PaymentMethodOptionsPixSchema = z.object({ + /** The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + expires_after_seconds: z + .number() + .int() + .nullable() + .describe( + 'The number of seconds (between 10 and 1209600) after which Pix payment will expire.' + ) + .optional(), + /** The timestamp at which the Pix expires. */ + expires_at: z + .number() + .int() + .nullable() + .describe('The timestamp at which the Pix expires.') + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsPix = z.infer< + typeof PaymentMethodOptionsPixSchema + > + + export const PaymentMethodOptionsPromptpaySchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsPromptpay = z.infer< + typeof PaymentMethodOptionsPromptpaySchema + > + + export const PaymentMethodOptionsRevolutPaySchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsRevolutPay = z.infer< + typeof PaymentMethodOptionsRevolutPaySchema + > + + export const PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptionsSchema = + z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptions = + z.infer< + typeof PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptionsSchema + > + + export const PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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'." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit = + z.infer< + typeof PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitSchema + > + + export const PaymentMethodOptionsSofortSchema = z.object({ + /** Preferred language of the SOFORT authorization page that the customer is redirected to. */ + preferred_language: z + .enum(['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']) + .nullable() + .describe( + 'Preferred language of the SOFORT authorization page that the customer is redirected to.' + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsSofort = z.infer< + typeof PaymentMethodOptionsSofortSchema + > + + export const PaymentIntentPaymentMethodOptionsSwishSchema = z.object({ + /** A reference for this payment to be displayed in the Swish app. */ + reference: z + .string() + .max(35) + .nullable() + .describe( + 'A reference for this payment to be displayed in the Swish app.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsSwish = z.infer< + typeof PaymentIntentPaymentMethodOptionsSwishSchema + > + + export const PaymentMethodOptionsTwintSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsTwint = z.infer< + typeof PaymentMethodOptionsTwintSchema + > + + export const PaymentMethodOptionsWechatPaySchema = z.object({ + /** The app ID registered with WeChat Pay. Only required when client is ios or android. */ + app_id: z + .string() + .max(5000) + .nullable() + .describe( + 'The app ID registered with WeChat Pay. Only required when client is ios or android.' + ) + .optional(), + /** The client type that the end customer will pay from */ + client: z + .enum(['android', 'ios', 'web']) + .nullable() + .describe('The client type that the end customer will pay from') + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsWechatPay = z.infer< + typeof PaymentMethodOptionsWechatPaySchema + > + + export const PaymentMethodOptionsZipSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsZip = z.infer< + typeof PaymentMethodOptionsZipSchema + > + + export const PaymentIntentProcessingCustomerNotificationSchema = z.object({ + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional(), + /** If customer approval is required, they need to provide approval before this time. */ + completes_at: z + .number() + .int() + .nullable() + .describe( + 'If customer approval is required, they need to provide approval before this time.' + ) + .optional() + }) + export type PaymentIntentProcessingCustomerNotification = z.infer< + typeof PaymentIntentProcessingCustomerNotificationSchema + > + + export const NetworksSchema = z.object({ + /** All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ + available: z + .array(z.string().max(5000)) + .describe( + 'All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type Networks = z.infer + + export const ThreeDSecureUsageSchema = z.object({ + /** Whether 3D Secure is supported on this card. */ + supported: z + .boolean() + .describe('Whether 3D Secure is supported on this card.') + }) + export type ThreeDSecureUsage = z.infer + + export const PaymentMethodCardWalletAmexExpressCheckoutSchema = z.object({}) + export type PaymentMethodCardWalletAmexExpressCheckout = z.infer< + typeof PaymentMethodCardWalletAmexExpressCheckoutSchema + > + + export const PaymentMethodCardWalletApplePaySchema = z.object({}) + export type PaymentMethodCardWalletApplePay = z.infer< + typeof PaymentMethodCardWalletApplePaySchema + > + + export const PaymentMethodCardWalletGooglePaySchema = z.object({}) + export type PaymentMethodCardWalletGooglePay = z.infer< + typeof PaymentMethodCardWalletGooglePaySchema + > + + export const PaymentMethodCardWalletLinkSchema = z.object({}) + export type PaymentMethodCardWalletLink = z.infer< + typeof PaymentMethodCardWalletLinkSchema + > + + export const PaymentMethodCardWalletSamsungPaySchema = z.object({}) + export type PaymentMethodCardWalletSamsungPay = z.infer< + typeof PaymentMethodCardWalletSamsungPaySchema + > + + export const PaymentMethodCardPresentNetworksSchema = z.object({ + /** All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ + available: z + .array(z.string().max(5000)) + .describe( + 'All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).' + ), + /** The preferred network for the card. */ + preferred: z + .string() + .max(5000) + .nullable() + .describe('The preferred network for the card.') + .optional() + }) + export type PaymentMethodCardPresentNetworks = z.infer< + typeof PaymentMethodCardPresentNetworksSchema + > + + export const PaymentMethodCashappSchema = z.object({ + /** A unique and immutable identifier assigned by Cash App to every buyer. */ + buyer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique and immutable identifier assigned by Cash App to every buyer.' + ) + .optional(), + /** A public identifier for buyers using Cash App. */ + cashtag: z + .string() + .max(5000) + .nullable() + .describe('A public identifier for buyers using Cash App.') + .optional() + }) + export type PaymentMethodCashapp = z.infer + + export const PaymentMethodCustomerBalanceSchema = z.object({}) + export type PaymentMethodCustomerBalance = z.infer< + typeof PaymentMethodCustomerBalanceSchema + > + + export const PaymentMethodEpsSchema = z.object({ + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + "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`." + ) + .optional() + }) + export type PaymentMethodEps = z.infer + + export const PaymentMethodFpxSchema = z.object({ + /** 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: z + .enum([ + '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' + ]) + .describe( + "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`." + ) + }) + export type PaymentMethodFpx = z.infer + + export const PaymentMethodGiropaySchema = z.object({}) + export type PaymentMethodGiropay = z.infer + + export const PaymentMethodGrabpaySchema = z.object({}) + export type PaymentMethodGrabpay = z.infer + + export const PaymentMethodIdealSchema = z.object({ + /** The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. */ + bank: z + .enum([ + 'abn_amro', + 'asn_bank', + 'bunq', + 'handelsbanken', + 'ing', + 'knab', + 'moneyou', + 'n26', + 'nn', + 'rabobank', + 'regiobank', + 'revolut', + 'sns_bank', + 'triodos_bank', + 'van_lanschot', + 'yoursafe' + ]) + .nullable() + .describe( + "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`." + ) + .optional(), + /** The Bank Identifier Code of the customer's bank, if the bank was provided. */ + bic: z + .enum([ + 'ABNANL2A', + 'ASNBNL21', + 'BITSNL2A', + 'BUNQNL2A', + 'FVLBNL22', + 'HANDNL2A', + 'INGBNL2A', + 'KNABNL2H', + 'MOYONL21', + 'NNBANL2G', + 'NTSBDEB1', + 'RABONL2U', + 'RBRBNL21', + 'REVOIE23', + 'REVOLT21', + 'SNSBNL2A', + 'TRIONL2U' + ]) + .nullable() + .describe( + "The Bank Identifier Code of the customer's bank, if the bank was provided." + ) + .optional() + }) + export type PaymentMethodIdeal = z.infer + + export const PaymentMethodKakaoPaySchema = z.object({}) + export type PaymentMethodKakaoPay = z.infer< + typeof PaymentMethodKakaoPaySchema + > + + export const PaymentFlowsPrivatePaymentMethodsKlarnaDobSchema = z.object({ + /** The day of birth, between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('The day of birth, between 1 and 31.') + .optional(), + /** The month of birth, between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('The month of birth, between 1 and 12.') + .optional(), + /** The four-digit year of birth. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year of birth.') + .optional() + }) + export type PaymentFlowsPrivatePaymentMethodsKlarnaDob = z.infer< + typeof PaymentFlowsPrivatePaymentMethodsKlarnaDobSchema + > + + export const PaymentMethodKonbiniSchema = z.object({}) + export type PaymentMethodKonbini = z.infer + + export const PaymentMethodKrCardSchema = z.object({ + /** The local credit or debit card brand. */ + brand: z + .enum([ + 'bc', + 'citi', + 'hana', + 'hyundai', + 'jeju', + 'jeonbuk', + 'kakaobank', + 'kbank', + 'kdbbank', + 'kookmin', + 'kwangju', + 'lotte', + 'mg', + 'nh', + 'post', + 'samsung', + 'savingsbank', + 'shinhan', + 'shinhyup', + 'suhyup', + 'tossbank', + 'woori' + ]) + .nullable() + .describe('The local credit or debit card brand.') + .optional(), + /** The last four digits of the card. This may not be present for American Express cards. */ + last4: z + .string() + .max(4) + .nullable() + .describe( + 'The last four digits of the card. This may not be present for American Express cards.' + ) + .optional() + }) + export type PaymentMethodKrCard = z.infer + + export const PaymentMethodLinkSchema = z.object({ + /** Account owner's email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe("Account owner's email address.") + .optional() + }) + export type PaymentMethodLink = z.infer + + export const PaymentMethodMobilepaySchema = z.object({}) + export type PaymentMethodMobilepay = z.infer< + typeof PaymentMethodMobilepaySchema + > + + export const PaymentMethodMultibancoSchema = z.object({}) + export type PaymentMethodMultibanco = z.infer< + typeof PaymentMethodMultibancoSchema + > + + export const PaymentMethodNaverPaySchema = z.object({ + /** Whether to fund this transaction with Naver Pay points or a card. */ + funding: z + .enum(['card', 'points']) + .describe( + 'Whether to fund this transaction with Naver Pay points or a card.' + ) + }) + export type PaymentMethodNaverPay = z.infer< + typeof PaymentMethodNaverPaySchema + > + + export const PaymentMethodOxxoSchema = z.object({}) + export type PaymentMethodOxxo = z.infer + + export const PaymentMethodP24Schema = z.object({ + /** The customer's bank, if provided. */ + bank: z + .enum([ + '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' + ]) + .nullable() + .describe("The customer's bank, if provided.") + .optional() + }) + export type PaymentMethodP24 = z.infer + + export const PaymentMethodPayByBankSchema = z.object({}) + export type PaymentMethodPayByBank = z.infer< + typeof PaymentMethodPayByBankSchema + > + + export const PaymentMethodPaycoSchema = z.object({}) + export type PaymentMethodPayco = z.infer + + export const PaymentMethodPaynowSchema = z.object({}) + export type PaymentMethodPaynow = z.infer + + export const PaymentMethodPaypalSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's email. Values are provided by PayPal directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional(), + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + payer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'PayPal account PayerID. This identifier uniquely identifies the PayPal customer.' + ) + .optional() + }) + export type PaymentMethodPaypal = z.infer + + export const PaymentMethodPixSchema = z.object({}) + export type PaymentMethodPix = z.infer + + export const PaymentMethodPromptpaySchema = z.object({}) + export type PaymentMethodPromptpay = z.infer< + typeof PaymentMethodPromptpaySchema + > + + export const PaymentMethodRevolutPaySchema = z.object({}) + export type PaymentMethodRevolutPay = z.infer< + typeof PaymentMethodRevolutPaySchema + > + + export const PaymentMethodSamsungPaySchema = z.object({}) + export type PaymentMethodSamsungPay = z.infer< + typeof PaymentMethodSamsungPaySchema + > + + export const PaymentMethodSofortSchema = z.object({ + /** Two-letter ISO code representing the country the bank account is located in. */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the country the bank account is located in.' + ) + .optional() + }) + export type PaymentMethodSofort = z.infer + + export const PaymentMethodSwishSchema = z.object({}) + export type PaymentMethodSwish = z.infer + + export const PaymentMethodTwintSchema = z.object({}) + export type PaymentMethodTwint = z.infer + + export const UsBankAccountNetworksSchema = z.object({ + /** The preferred network. */ + preferred: z + .string() + .max(5000) + .nullable() + .describe('The preferred network.') + .optional(), + /** All supported networks. */ + supported: z + .array(z.enum(['ach', 'us_domestic_wire'])) + .describe('All supported networks.') + }) + export type UsBankAccountNetworks = z.infer< + typeof UsBankAccountNetworksSchema + > + + export const PaymentMethodUsBankAccountBlockedSchema = z.object({ + /** The ACH network code that resulted in this block. */ + network_code: z + .enum([ + 'R02', + 'R03', + 'R04', + 'R05', + 'R07', + 'R08', + 'R10', + 'R11', + 'R16', + 'R20', + 'R29', + 'R31' + ]) + .nullable() + .describe('The ACH network code that resulted in this block.') + .optional(), + /** The reason why this PaymentMethod's fingerprint has been blocked */ + reason: z + .enum([ + 'bank_account_closed', + 'bank_account_frozen', + 'bank_account_invalid_details', + 'bank_account_restricted', + 'bank_account_unusable', + 'debit_not_authorized' + ]) + .nullable() + .describe( + "The reason why this PaymentMethod's fingerprint has been blocked" + ) + .optional() + }) + export type PaymentMethodUsBankAccountBlocked = z.infer< + typeof PaymentMethodUsBankAccountBlockedSchema + > + + export const PaymentMethodWechatPaySchema = z.object({}) + export type PaymentMethodWechatPay = z.infer< + typeof PaymentMethodWechatPaySchema + > + + export const PaymentMethodZipSchema = z.object({}) + export type PaymentMethodZip = z.infer + + export const InvoiceSettingCustomerRenderingOptionsSchema = z.object({ + /** How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display: z + .string() + .max(5000) + .nullable() + .describe( + 'How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type InvoiceSettingCustomerRenderingOptions = z.infer< + typeof InvoiceSettingCustomerRenderingOptionsSchema + > + + export const CustomerTaxLocationSchema = z.object({ + /** The customer's country as identified by Stripe Tax. */ + country: z + .string() + .max(5000) + .describe("The customer's country as identified by Stripe Tax."), + /** The data source used to infer the customer's location. */ + source: z + .enum([ + 'billing_address', + 'ip_address', + 'payment_method', + 'shipping_destination' + ]) + .describe("The data source used to infer the customer's location."), + /** The customer's state, county, province, or region as identified by Stripe Tax. */ + state: z + .string() + .max(5000) + .nullable() + .describe( + "The customer's state, county, province, or region as identified by Stripe Tax." + ) + .optional() + }) + export type CustomerTaxLocation = z.infer + + export const AccountRequirementsErrorSchema = z.object({ + /** The code for the type of error. */ + code: z + .enum([ + '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_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', + '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_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_missing_directors', + 'verification_missing_executives', + 'verification_missing_owners', + 'verification_requires_additional_memorandum_of_associations', + 'verification_requires_additional_proof_of_registration', + 'verification_supportability' + ]) + .describe('The code for the type of error.'), + /** An informative message that indicates the error type and provides additional details about the error. */ + reason: z + .string() + .max(5000) + .describe( + 'An informative message that indicates the error type and provides additional details about the error.' + ), + /** The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ + requirement: z + .string() + .max(5000) + .describe( + 'The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.' + ) + }) + export type AccountRequirementsError = z.infer< + typeof AccountRequirementsErrorSchema + > + + export const AccountRequirementsAlternativeSchema = z.object({ + /** Fields that can be provided to satisfy all fields in `original_fields_due`. */ + alternative_fields_due: z + .array(z.string().max(5000)) + .describe( + 'Fields that can be provided to satisfy all fields in `original_fields_due`.' + ), + /** Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. */ + original_fields_due: z + .array(z.string().max(5000)) + .describe( + 'Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.' + ) + }) + export type AccountRequirementsAlternative = z.infer< + typeof AccountRequirementsAlternativeSchema + > + + export const AccountGroupMembershipSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type AccountGroupMembership = z.infer< + typeof AccountGroupMembershipSchema + > + + export const PersonAdditionalTosAcceptanceSchema = z.object({ + /** The Unix timestamp marking when the legal guardian accepted the service agreement. */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the legal guardian accepted the service agreement.' + ) + .optional(), + /** The IP address from which the legal guardian accepted the service agreement. */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the legal guardian accepted the service agreement.' + ) + .optional(), + /** The user agent of the browser from which the legal guardian accepted the service agreement. */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The user agent of the browser from which the legal guardian accepted the service agreement.' + ) + .optional() + }) + export type PersonAdditionalTosAcceptance = z.infer< + typeof PersonAdditionalTosAcceptanceSchema + > + + export const LegalEntityDobSchema = z.object({ + /** The day of birth, between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('The day of birth, between 1 and 31.') + .optional(), + /** The month of birth, between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('The month of birth, between 1 and 12.') + .optional(), + /** The four-digit year of birth. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year of birth.') + .optional() + }) + export type LegalEntityDob = z.infer + + export const PersonRelationshipSchema = z.object({ + /** Whether the person is the authorizer of the account's representative. */ + authorizer: z + .boolean() + .nullable() + .describe( + "Whether the person is the authorizer of the account's representative." + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + "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." + ) + .optional(), + /** Whether the person has significant responsibility to control, manage, or direct the organization. */ + executive: z + .boolean() + .nullable() + .describe( + 'Whether the person has significant responsibility to control, manage, or direct the organization.' + ) + .optional(), + /** Whether the person is the legal guardian of the account's representative. */ + legal_guardian: z + .boolean() + .nullable() + .describe( + "Whether the person is the legal guardian of the account's representative." + ) + .optional(), + /** Whether the person is an owner of the account’s legal entity. */ + owner: z + .boolean() + .nullable() + .describe('Whether the person is an owner of the account’s legal entity.') + .optional(), + /** The percent owned by the person of the account's legal entity. */ + percent_ownership: z + .number() + .nullable() + .describe( + "The percent owned by the person of the account's legal entity." + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The person's title (e.g., CEO, Support Engineer). */ + title: z + .string() + .max(5000) + .nullable() + .describe("The person's title (e.g., CEO, Support Engineer).") + .optional() + }) + export type PersonRelationship = z.infer + + export const AccountBacsDebitPaymentsSettingsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type AccountBacsDebitPaymentsSettings = z.infer< + typeof AccountBacsDebitPaymentsSettingsSchema + > + + export const CardIssuingAccountTermsOfServiceSchema = z.object({ + /** The Unix timestamp marking when the account representative accepted the service agreement. */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the account representative accepted the service agreement.' + ) + .optional(), + /** The IP address from which the account representative accepted the service agreement. */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the account representative accepted the service agreement.' + ) + .optional(), + /** The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent: z + .string() + .max(5000) + .describe( + 'The user agent of the browser from which the account representative accepted the service agreement.' + ) + .optional() + }) + export type CardIssuingAccountTermsOfService = z.infer< + typeof CardIssuingAccountTermsOfServiceSchema + > + + export const AccountDeclineChargeOnSchema = z.object({ + /** 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: z + .boolean() + .describe( + '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.' + ), + /** 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: z + .boolean() + .describe( + 'Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.' + ) + }) + export type AccountDeclineChargeOn = z.infer< + typeof AccountDeclineChargeOnSchema + > + + export const AccountDashboardSettingsSchema = z.object({ + /** The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ + display_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional() + }) + export type AccountDashboardSettings = z.infer< + typeof AccountDashboardSettingsSchema + > + + export const AccountPaymentsSettingsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional() + }) + export type AccountPaymentsSettings = z.infer< + typeof AccountPaymentsSettingsSchema + > + + export const TransferScheduleSchema = z.object({ + /** The number of days charges for the account will be held before being paid out. */ + delay_days: z + .number() + .int() + .describe( + 'The number of days charges for the account will be held before being paid out.' + ), + /** How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. */ + interval: z + .string() + .max(5000) + .describe( + 'How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ) + .optional(), + /** The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. */ + weekly_anchor: z + .string() + .max(5000) + .describe( + "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly." + ) + .optional() + }) + export type TransferSchedule = z.infer + + export const AccountSepaDebitPaymentsSettingsSchema = z.object({ + /** SEPA creditor identifier that identifies the company making the payment. */ + creditor_id: z + .string() + .max(5000) + .describe( + 'SEPA creditor identifier that identifies the company making the payment.' + ) + .optional() + }) + export type AccountSepaDebitPaymentsSettings = z.infer< + typeof AccountSepaDebitPaymentsSettingsSchema + > + + export const AccountTermsOfServiceSchema = z.object({ + /** The Unix timestamp marking when the account representative accepted the service agreement. */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the account representative accepted the service agreement.' + ) + .optional(), + /** The IP address from which the account representative accepted the service agreement. */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the account representative accepted the service agreement.' + ) + .optional(), + /** The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent: z + .string() + .max(5000) + .describe( + 'The user agent of the browser from which the account representative accepted the service agreement.' + ) + .optional() + }) + export type AccountTermsOfService = z.infer< + typeof AccountTermsOfServiceSchema + > + + export const AccountTosAcceptanceSchema = z.object({ + /** The Unix timestamp marking when the account representative accepted their service agreement */ + date: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp marking when the account representative accepted their service agreement' + ) + .optional(), + /** The IP address from which the account representative accepted their service agreement */ + ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the account representative accepted their service agreement' + ) + .optional(), + /** The user's service agreement type */ + service_agreement: z + .string() + .max(5000) + .describe("The user's service agreement type") + .optional(), + /** The user agent of the browser from which the account representative accepted their service agreement */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The user agent of the browser from which the account representative accepted their service agreement' + ) + .optional() + }) + export type AccountTosAcceptance = z.infer + + /** + * 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 const AccountLinkSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The timestamp at which this account link will expire. */ + expires_at: z + .number() + .int() + .describe('The timestamp at which this account link will expire.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('account_link') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The URL for the account link. */ + url: z.string().max(5000).describe('The URL for the account link.') + }) + .describe( + 'Account Links are the means by which a Connect platform grants a connected account permission to access\nStripe-hosted applications, such as Connect Onboarding.\n\nRelated guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)' + ) + export type AccountLink = z.infer + + export const ConnectEmbeddedAccountFeaturesClaimSchema = z.object({ + /** Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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: z + .boolean() + .describe( + 'Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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.' + ), + /** Whether to allow platforms to control bank account collection for their connected accounts. 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. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. */ + external_account_collection: z + .boolean() + .describe( + 'Whether to allow platforms to control bank account collection for their connected accounts. 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. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.' + ) + }) + export type ConnectEmbeddedAccountFeaturesClaim = z.infer< + typeof ConnectEmbeddedAccountFeaturesClaimSchema + > + + export const ConnectEmbeddedPayoutsFeaturesSchema = z.object({ + /** Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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: z + .boolean() + .describe( + 'Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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.' + ), + /** Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. */ + edit_payout_schedule: z + .boolean() + .describe( + 'Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.' + ), + /** Whether to allow platforms to control bank account collection for their connected accounts. 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. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. */ + external_account_collection: z + .boolean() + .describe( + 'Whether to allow platforms to control bank account collection for their connected accounts. 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. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.' + ), + /** Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. */ + instant_payouts: z + .boolean() + .describe( + 'Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.' + ), + /** Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. */ + standard_payouts: z + .boolean() + .describe( + 'Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.' + ) + }) + export type ConnectEmbeddedPayoutsFeatures = z.infer< + typeof ConnectEmbeddedPayoutsFeaturesSchema + > + + export const ConnectEmbeddedBaseFeaturesSchema = z.object({}) + export type ConnectEmbeddedBaseFeatures = z.infer< + typeof ConnectEmbeddedBaseFeaturesSchema + > + + export const ConnectEmbeddedFinancialAccountFeaturesSchema = z.object({ + /** Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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: z + .boolean() + .describe( + 'Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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.' + ), + /** Whether to allow external accounts to be linked for money transfer. */ + external_account_collection: z + .boolean() + .describe( + 'Whether to allow external accounts to be linked for money transfer.' + ), + /** Whether to allow sending money. */ + send_money: z.boolean().describe('Whether to allow sending money.'), + /** Whether to allow transferring balance. */ + transfer_balance: z + .boolean() + .describe('Whether to allow transferring balance.') + }) + export type ConnectEmbeddedFinancialAccountFeatures = z.infer< + typeof ConnectEmbeddedFinancialAccountFeaturesSchema + > + + export const ConnectEmbeddedFinancialAccountTransactionsFeaturesSchema = + z.object({ + /** Whether to allow card spend dispute management features. */ + card_spend_dispute_management: z + .boolean() + .describe('Whether to allow card spend dispute management features.') + }) + export type ConnectEmbeddedFinancialAccountTransactionsFeatures = z.infer< + typeof ConnectEmbeddedFinancialAccountTransactionsFeaturesSchema + > + + export const ConnectEmbeddedIssuingCardFeaturesSchema = z.object({ + /** Whether to allow card management features. */ + card_management: z + .boolean() + .describe('Whether to allow card management features.'), + /** Whether to allow card spend dispute management features. */ + card_spend_dispute_management: z + .boolean() + .describe('Whether to allow card spend dispute management features.'), + /** Whether to allow cardholder management features. */ + cardholder_management: z + .boolean() + .describe('Whether to allow cardholder management features.'), + /** Whether to allow spend control management features. */ + spend_control_management: z + .boolean() + .describe('Whether to allow spend control management features.') + }) + export type ConnectEmbeddedIssuingCardFeatures = z.infer< + typeof ConnectEmbeddedIssuingCardFeaturesSchema + > + + export const ConnectEmbeddedIssuingCardsListFeaturesSchema = z.object({ + /** Whether to allow card management features. */ + card_management: z + .boolean() + .describe('Whether to allow card management features.'), + /** Whether to allow card spend dispute management features. */ + card_spend_dispute_management: z + .boolean() + .describe('Whether to allow card spend dispute management features.'), + /** Whether to allow cardholder management features. */ + cardholder_management: z + .boolean() + .describe('Whether to allow cardholder management features.'), + /** Disables Stripe user authentication for this embedded component. 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. */ + disable_stripe_user_authentication: z + .boolean() + .describe( + 'Disables Stripe user authentication for this embedded component. 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.' + ), + /** Whether to allow spend control management features. */ + spend_control_management: z + .boolean() + .describe('Whether to allow spend control management features.') + }) + export type ConnectEmbeddedIssuingCardsListFeatures = z.infer< + typeof ConnectEmbeddedIssuingCardsListFeaturesSchema + > + + export const ConnectEmbeddedPaymentsFeaturesSchema = z.object({ + /** Whether to allow capturing and cancelling payment intents. This is `true` by default. */ + capture_payments: z + .boolean() + .describe( + 'Whether to allow capturing and cancelling payment intents. This is `true` by default.' + ), + /** Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. */ + destination_on_behalf_of_charge_management: z + .boolean() + .describe( + 'Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.' + ), + /** Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. */ + dispute_management: z + .boolean() + .describe( + 'Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.' + ), + /** Whether to allow sending refunds. This is `true` by default. */ + refund_management: z + .boolean() + .describe('Whether to allow sending refunds. This is `true` by default.') + }) + export type ConnectEmbeddedPaymentsFeatures = z.infer< + typeof ConnectEmbeddedPaymentsFeaturesSchema + > + + export const DeletedAccountSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('account') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedAccount = z.infer + + /** Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. */ + export const LoginLinkSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('login_link') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The URL for the login link. */ + url: z.string().max(5000).describe('The URL for the login link.') + }) + .describe( + "Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard." + ) + export type LoginLink = z.infer + + export const DeletedPersonSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('person') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedPerson = z.infer + + export const ApplePayDomainSchema = z.object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + domain_name: z.string().max(5000), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('apple_pay_domain') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type ApplePayDomain = z.infer + + export const DeletedApplePayDomainSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('apple_pay_domain') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedApplePayDomain = z.infer< + typeof DeletedApplePayDomainSchema + > + + export const SecretServiceResourceScopeSchema = z.object({ + /** The secret scope type. */ + type: z.enum(['account', 'user']).describe('The secret scope type.'), + /** The user ID, if type is set to "user" */ + user: z + .string() + .max(5000) + .describe('The user ID, if type is set to "user"') + .optional() + }) + export type SecretServiceResourceScope = z.infer< + typeof SecretServiceResourceScopeSchema + > + + export const BalanceAmountBySourceTypeSchema = z.object({ + /** Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ + bank_account: z + .number() + .int() + .describe( + 'Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).' + ) + .optional(), + /** Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ + card: z + .number() + .int() + .describe( + 'Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).' + ) + .optional(), + /** Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ + fpx: z + .number() + .int() + .describe( + 'Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.' + ) + .optional() + }) + export type BalanceAmountBySourceType = z.infer< + typeof BalanceAmountBySourceTypeSchema + > + + export const BillingMeterResourceCustomerMappingSettingsSchema = z.object({ + /** The key in the meter event payload to use for mapping the event to a customer. */ + event_payload_key: z + .string() + .max(5000) + .describe( + 'The key in the meter event payload to use for mapping the event to a customer.' + ), + /** The method for mapping a meter event to a customer. */ + type: z + .literal('by_id') + .describe('The method for mapping a meter event to a customer.') + }) + export type BillingMeterResourceCustomerMappingSettings = z.infer< + typeof BillingMeterResourceCustomerMappingSettingsSchema + > + + export const BillingMeterResourceAggregationSettingsSchema = z.object({ + /** Specifies how events are aggregated. */ + formula: z + .enum(['count', 'sum']) + .describe('Specifies how events are aggregated.') + }) + export type BillingMeterResourceAggregationSettings = z.infer< + typeof BillingMeterResourceAggregationSettingsSchema + > + + export const BillingMeterResourceBillingMeterStatusTransitionsSchema = + z.object({ + /** The time the meter was deactivated, if any. Measured in seconds since Unix epoch. */ + deactivated_at: z + .number() + .int() + .nullable() + .describe( + 'The time the meter was deactivated, if any. Measured in seconds since Unix epoch.' + ) + .optional() + }) + export type BillingMeterResourceBillingMeterStatusTransitions = z.infer< + typeof BillingMeterResourceBillingMeterStatusTransitionsSchema + > + + export const BillingMeterResourceBillingMeterValueSchema = z.object({ + /** The key in the meter event payload to use as the value for this meter. */ + event_payload_key: z + .string() + .max(5000) + .describe( + 'The key in the meter event payload to use as the value for this meter.' + ) + }) + export type BillingMeterResourceBillingMeterValue = z.infer< + typeof BillingMeterResourceBillingMeterValueSchema + > + + export const BillingMeterResourceBillingMeterEventAdjustmentCancelSchema = + z.object({ + /** Unique identifier for the event. */ + identifier: z + .string() + .max(100) + .nullable() + .describe('Unique identifier for the event.') + .optional() + }) + export type BillingMeterResourceBillingMeterEventAdjustmentCancel = z.infer< + typeof BillingMeterResourceBillingMeterEventAdjustmentCancelSchema + > + + /** 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 BillingMeterEventSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The name of the meter event. Corresponds with the `event_name` field on a meter. */ + event_name: z + .string() + .max(100) + .describe( + 'The name of the meter event. Corresponds with the `event_name` field on a meter.' + ), + /** A unique identifier for the event. */ + identifier: z + .string() + .max(5000) + .describe('A unique identifier for the event.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.meter_event') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .record(z.string().max(100)) + .describe( + "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)." + ), + /** The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. */ + timestamp: z + .number() + .int() + .describe( + 'The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.' + ) + }) + .describe( + '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 BillingMeterEvent = z.infer + + /** + * 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 const BillingMeterEventSummarySchema = z + .object({ + /** 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: z + .number() + .describe( + 'Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.' + ), + /** End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. */ + end_time: z + .number() + .int() + .describe( + 'End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The meter associated with this event summary. */ + meter: z + .string() + .max(5000) + .describe('The meter associated with this event summary.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.meter_event_summary') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. */ + start_time: z + .number() + .int() + .describe( + 'Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.' + ) + }) + .describe( + "A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much\nusage was accrued by a customer for that period.\n\nNote: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage." + ) + export type BillingMeterEventSummary = z.infer< + typeof BillingMeterEventSummarySchema + > + + export const PortalBusinessProfileSchema = z.object({ + /** The messaging shown to customers in the portal. */ + headline: z + .string() + .max(5000) + .nullable() + .describe('The messaging shown to customers in the portal.') + .optional(), + /** A link to the business’s publicly available privacy policy. */ + privacy_policy_url: z + .string() + .max(5000) + .nullable() + .describe('A link to the business’s publicly available privacy policy.') + .optional(), + /** A link to the business’s publicly available terms of service. */ + terms_of_service_url: z + .string() + .max(5000) + .nullable() + .describe('A link to the business’s publicly available terms of service.') + .optional() + }) + export type PortalBusinessProfile = z.infer< + typeof PortalBusinessProfileSchema + > + + export const PortalCustomerUpdateSchema = z.object({ + /** The types of customer updates that are supported. When empty, customers are not updateable. */ + allowed_updates: z + .array( + z.enum(['address', 'email', 'name', 'phone', 'shipping', 'tax_id']) + ) + .describe( + 'The types of customer updates that are supported. When empty, customers are not updateable.' + ), + /** Whether the feature is enabled. */ + enabled: z.boolean().describe('Whether the feature is enabled.') + }) + export type PortalCustomerUpdate = z.infer + + export const PortalInvoiceListSchema = z.object({ + /** Whether the feature is enabled. */ + enabled: z.boolean().describe('Whether the feature is enabled.') + }) + export type PortalInvoiceList = z.infer + + export const PortalPaymentMethodUpdateSchema = z.object({ + /** Whether the feature is enabled. */ + enabled: z.boolean().describe('Whether the feature is enabled.') + }) + export type PortalPaymentMethodUpdate = z.infer< + typeof PortalPaymentMethodUpdateSchema + > + + export const PortalSubscriptionCancellationReasonSchema = z.object({ + /** Whether the feature is enabled. */ + enabled: z.boolean().describe('Whether the feature is enabled.'), + /** Which cancellation reasons will be given as options to the customer. */ + options: z + .array( + z.enum([ + 'customer_service', + 'low_quality', + 'missing_features', + 'other', + 'switched_service', + 'too_complex', + 'too_expensive', + 'unused' + ]) + ) + .describe( + 'Which cancellation reasons will be given as options to the customer.' + ) + }) + export type PortalSubscriptionCancellationReason = z.infer< + typeof PortalSubscriptionCancellationReasonSchema + > + + export const PortalSubscriptionUpdateProductSchema = z.object({ + /** The list of price IDs which, when subscribed to, a subscription can be updated. */ + prices: z + .array(z.string().max(5000)) + .describe( + 'The list of price IDs which, when subscribed to, a subscription can be updated.' + ), + /** The product ID. */ + product: z.string().max(5000).describe('The product ID.') + }) + export type PortalSubscriptionUpdateProduct = z.infer< + typeof PortalSubscriptionUpdateProductSchema + > + + export const PortalResourceScheduleUpdateAtPeriodEndConditionSchema = + z.object({ + /** The type of condition. */ + type: z + .enum(['decreasing_item_amount', 'shortening_interval']) + .describe('The type of condition.') + }) + export type PortalResourceScheduleUpdateAtPeriodEndCondition = z.infer< + typeof PortalResourceScheduleUpdateAtPeriodEndConditionSchema + > + + export const PortalLoginPageSchema = z.object({ + /** + * 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: z + .boolean() + .describe( + 'If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.\n\nIf `false`, the previously generated `url`, if any, will be deactivated.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type PortalLoginPage = z.infer + + export const PortalFlowsAfterCompletionHostedConfirmationSchema = z.object({ + /** A custom message to display to the customer after the flow is completed. */ + custom_message: z + .string() + .max(5000) + .nullable() + .describe( + 'A custom message to display to the customer after the flow is completed.' + ) + .optional() + }) + export type PortalFlowsAfterCompletionHostedConfirmation = z.infer< + typeof PortalFlowsAfterCompletionHostedConfirmationSchema + > + + export const PortalFlowsAfterCompletionRedirectSchema = z.object({ + /** The URL the customer will be redirected to after the flow is completed. */ + return_url: z + .string() + .max(5000) + .describe( + 'The URL the customer will be redirected to after the flow is completed.' + ) + }) + export type PortalFlowsAfterCompletionRedirect = z.infer< + typeof PortalFlowsAfterCompletionRedirectSchema + > + + export const PortalFlowsCouponOfferSchema = z.object({ + /** The ID of the coupon to be offered. */ + coupon: z.string().max(5000).describe('The ID of the coupon to be offered.') + }) + export type PortalFlowsCouponOffer = z.infer< + typeof PortalFlowsCouponOfferSchema + > + + export const PortalFlowsFlowSubscriptionUpdateSchema = z.object({ + /** The ID of the subscription to be updated. */ + subscription: z + .string() + .max(5000) + .describe('The ID of the subscription to be updated.') + }) + export type PortalFlowsFlowSubscriptionUpdate = z.infer< + typeof PortalFlowsFlowSubscriptionUpdateSchema + > + + export const PortalFlowsSubscriptionUpdateConfirmDiscountSchema = z.object({ + /** The ID of the coupon to apply to this subscription update. */ + coupon: z + .string() + .max(5000) + .nullable() + .describe('The ID of the coupon to apply to this subscription update.') + .optional(), + /** The ID of a promotion code to apply to this subscription update. */ + promotion_code: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of a promotion code to apply to this subscription update.' + ) + .optional() + }) + export type PortalFlowsSubscriptionUpdateConfirmDiscount = z.infer< + typeof PortalFlowsSubscriptionUpdateConfirmDiscountSchema + > + + export const PortalFlowsSubscriptionUpdateConfirmItemSchema = z.object({ + /** The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. */ + id: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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)." + ) + .optional(), + /** [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. */ + quantity: z + .number() + .int() + .describe( + '[Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.' + ) + .optional() + }) + export type PortalFlowsSubscriptionUpdateConfirmItem = z.infer< + typeof PortalFlowsSubscriptionUpdateConfirmItemSchema + > + + export const PaymentPagesCheckoutSessionAdaptivePricingSchema = z.object({ + /** Whether Adaptive Pricing is enabled. */ + enabled: z.boolean().describe('Whether Adaptive Pricing is enabled.') + }) + export type PaymentPagesCheckoutSessionAdaptivePricing = z.infer< + typeof PaymentPagesCheckoutSessionAdaptivePricingSchema + > + + export const PaymentPagesCheckoutSessionAfterExpirationRecoverySchema = + z.object({ + /** Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` */ + allow_promotion_codes: z + .boolean() + .describe( + 'Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`' + ), + /** + * 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: z + .boolean() + .describe( + 'If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.' + ), + /** The timestamp at which the recovery URL will expire. */ + expires_at: z + .number() + .int() + .nullable() + .describe('The timestamp at which the recovery URL will expire.') + .optional(), + /** URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session */ + url: z + .string() + .max(5000) + .nullable() + .describe( + 'URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session' + ) + .optional() + }) + export type PaymentPagesCheckoutSessionAfterExpirationRecovery = z.infer< + typeof PaymentPagesCheckoutSessionAfterExpirationRecoverySchema + > + + export const PaymentPagesCheckoutSessionConsentSchema = z.object({ + /** + * If `opt_in`, the customer consents to receiving promotional communications + * from the merchant about this Checkout Session. + */ + promotions: z + .enum(['opt_in', 'opt_out']) + .nullable() + .describe( + 'If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.' + ) + .optional(), + /** If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. */ + terms_of_service: z + .literal('accepted') + .nullable() + .describe( + "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service." + ) + .optional() + }) + export type PaymentPagesCheckoutSessionConsent = z.infer< + typeof PaymentPagesCheckoutSessionConsentSchema + > + + export const PaymentPagesCheckoutSessionPaymentMethodReuseAgreementSchema = + z.object({ + /** + * 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: z + .enum(['auto', 'hidden']) + .describe( + "Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.\n\nWhen set to `hidden`, the payment method reuse agreement text will always be hidden in the UI." + ) + }) + export type PaymentPagesCheckoutSessionPaymentMethodReuseAgreement = z.infer< + typeof PaymentPagesCheckoutSessionPaymentMethodReuseAgreementSchema + > + + export const PaymentPagesCheckoutSessionCurrencyConversionSchema = z.object({ + /** Total of all items in source currency before discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe( + 'Total of all items in source currency before discounts or taxes are applied.' + ), + /** Total of all items in source currency after discounts and taxes are applied. */ + amount_total: z + .number() + .int() + .describe( + 'Total of all items in source currency after discounts and taxes are applied.' + ), + /** Exchange rate used to convert source currency amounts to customer currency amounts */ + fx_rate: z + .string() + .describe( + 'Exchange rate used to convert source currency amounts to customer currency amounts' + ), + /** Creation currency of the CheckoutSession before localization */ + source_currency: z + .string() + .max(5000) + .describe('Creation currency of the CheckoutSession before localization') + }) + export type PaymentPagesCheckoutSessionCurrencyConversion = z.infer< + typeof PaymentPagesCheckoutSessionCurrencyConversionSchema + > + + export const PaymentPagesCheckoutSessionCustomFieldsOptionSchema = z.object({ + /** The label for the option, displayed to the customer. Up to 100 characters. */ + label: z + .string() + .max(5000) + .describe( + 'The label for the option, displayed to the customer. Up to 100 characters.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + }) + export type PaymentPagesCheckoutSessionCustomFieldsOption = z.infer< + typeof PaymentPagesCheckoutSessionCustomFieldsOptionSchema + > + + export const PaymentPagesCheckoutSessionCustomFieldsLabelSchema = z.object({ + /** Custom text for the label, displayed to the customer. Up to 50 characters. */ + custom: z + .string() + .max(5000) + .nullable() + .describe( + 'Custom text for the label, displayed to the customer. Up to 50 characters.' + ) + .optional(), + /** The type of the label. */ + type: z.literal('custom').describe('The type of the label.') + }) + export type PaymentPagesCheckoutSessionCustomFieldsLabel = z.infer< + typeof PaymentPagesCheckoutSessionCustomFieldsLabelSchema + > + + export const PaymentPagesCheckoutSessionCustomFieldsNumericSchema = z.object({ + /** The value that will pre-fill the field on the payment page. */ + default_value: z + .string() + .max(5000) + .nullable() + .describe('The value that will pre-fill the field on the payment page.') + .optional(), + /** The maximum character length constraint for the customer's input. */ + maximum_length: z + .number() + .int() + .nullable() + .describe( + "The maximum character length constraint for the customer's input." + ) + .optional(), + /** The minimum character length requirement for the customer's input. */ + minimum_length: z + .number() + .int() + .nullable() + .describe( + "The minimum character length requirement for the customer's input." + ) + .optional(), + /** The value entered by the customer, containing only digits. */ + value: z + .string() + .max(5000) + .nullable() + .describe('The value entered by the customer, containing only digits.') + .optional() + }) + export type PaymentPagesCheckoutSessionCustomFieldsNumeric = z.infer< + typeof PaymentPagesCheckoutSessionCustomFieldsNumericSchema + > + + export const PaymentPagesCheckoutSessionCustomFieldsTextSchema = z.object({ + /** The value that will pre-fill the field on the payment page. */ + default_value: z + .string() + .max(5000) + .nullable() + .describe('The value that will pre-fill the field on the payment page.') + .optional(), + /** The maximum character length constraint for the customer's input. */ + maximum_length: z + .number() + .int() + .nullable() + .describe( + "The maximum character length constraint for the customer's input." + ) + .optional(), + /** The minimum character length requirement for the customer's input. */ + minimum_length: z + .number() + .int() + .nullable() + .describe( + "The minimum character length requirement for the customer's input." + ) + .optional(), + /** The value entered by the customer. */ + value: z + .string() + .max(5000) + .nullable() + .describe('The value entered by the customer.') + .optional() + }) + export type PaymentPagesCheckoutSessionCustomFieldsText = z.infer< + typeof PaymentPagesCheckoutSessionCustomFieldsTextSchema + > + + export const PaymentPagesCheckoutSessionCustomTextPositionSchema = z.object({ + /** Text may be up to 1200 characters in length. */ + message: z + .string() + .max(500) + .describe('Text may be up to 1200 characters in length.') + }) + export type PaymentPagesCheckoutSessionCustomTextPosition = z.infer< + typeof PaymentPagesCheckoutSessionCustomTextPositionSchema + > + + export const PaymentPagesCheckoutSessionTaxIdSchema = z.object({ + /** 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`, or `unknown` */ + type: z + .enum([ + 'ad_nrt', + 'ae_trn', + 'al_tin', + 'am_tin', + 'ao_tin', + 'ar_cuit', + 'au_abn', + 'au_arn', + 'ba_tin', + 'bb_tin', + 'bg_uic', + 'bh_vat', + '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', + 'cn_tin', + 'co_nit', + 'cr_tin', + 'de_stn', + 'do_rcn', + 'ec_ruc', + 'eg_tin', + 'es_cif', + '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', + 'kh_tin', + 'kr_brn', + 'kz_bin', + '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' + ]) + .describe( + '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`, or `unknown`' + ), + /** The value of the tax ID. */ + value: z + .string() + .max(5000) + .nullable() + .describe('The value of the tax ID.') + .optional() + }) + export type PaymentPagesCheckoutSessionTaxId = z.infer< + typeof PaymentPagesCheckoutSessionTaxIdSchema + > + + export const InvoiceSettingCheckoutRenderingOptionsSchema = z.object({ + /** How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display: z + .string() + .max(5000) + .nullable() + .describe( + 'How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.' + ) + .optional() + }) + export type InvoiceSettingCheckoutRenderingOptions = z.infer< + typeof InvoiceSettingCheckoutRenderingOptionsSchema + > + + export const PaymentLinksResourceCompletionBehaviorConfirmationPageSchema = + z.object({ + /** The custom message that is displayed to the customer after the purchase is complete. */ + custom_message: z + .string() + .max(5000) + .nullable() + .describe( + 'The custom message that is displayed to the customer after the purchase is complete.' + ) + .optional() + }) + export type PaymentLinksResourceCompletionBehaviorConfirmationPage = z.infer< + typeof PaymentLinksResourceCompletionBehaviorConfirmationPageSchema + > + + export const PaymentLinksResourceCompletionBehaviorRedirectSchema = z.object({ + /** The URL the customer will be redirected to after the purchase is complete. */ + url: z + .string() + .max(5000) + .describe( + 'The URL the customer will be redirected to after the purchase is complete.' + ) + }) + export type PaymentLinksResourceCompletionBehaviorRedirect = z.infer< + typeof PaymentLinksResourceCompletionBehaviorRedirectSchema + > + + export const PaymentLinksResourcePaymentMethodReuseAgreementSchema = z.object( + { + /** + * 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: z + .enum(['auto', 'hidden']) + .describe( + "Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.\n\nWhen set to `hidden`, the payment method reuse agreement text will always be hidden in the UI." + ) + } + ) + export type PaymentLinksResourcePaymentMethodReuseAgreement = z.infer< + typeof PaymentLinksResourcePaymentMethodReuseAgreementSchema + > + + export const PaymentLinksResourceCustomFieldsDropdownOptionSchema = z.object({ + /** The label for the option, displayed to the customer. Up to 100 characters. */ + label: z + .string() + .max(5000) + .describe( + 'The label for the option, displayed to the customer. Up to 100 characters.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + }) + export type PaymentLinksResourceCustomFieldsDropdownOption = z.infer< + typeof PaymentLinksResourceCustomFieldsDropdownOptionSchema + > + + export const PaymentLinksResourceCustomFieldsLabelSchema = z.object({ + /** Custom text for the label, displayed to the customer. Up to 50 characters. */ + custom: z + .string() + .max(5000) + .nullable() + .describe( + 'Custom text for the label, displayed to the customer. Up to 50 characters.' + ) + .optional(), + /** The type of the label. */ + type: z.literal('custom').describe('The type of the label.') + }) + export type PaymentLinksResourceCustomFieldsLabel = z.infer< + typeof PaymentLinksResourceCustomFieldsLabelSchema + > + + export const PaymentLinksResourceCustomFieldsNumericSchema = z.object({ + /** The maximum character length constraint for the customer's input. */ + maximum_length: z + .number() + .int() + .nullable() + .describe( + "The maximum character length constraint for the customer's input." + ) + .optional(), + /** The minimum character length requirement for the customer's input. */ + minimum_length: z + .number() + .int() + .nullable() + .describe( + "The minimum character length requirement for the customer's input." + ) + .optional() + }) + export type PaymentLinksResourceCustomFieldsNumeric = z.infer< + typeof PaymentLinksResourceCustomFieldsNumericSchema + > + + export const PaymentLinksResourceCustomFieldsTextSchema = z.object({ + /** The maximum character length constraint for the customer's input. */ + maximum_length: z + .number() + .int() + .nullable() + .describe( + "The maximum character length constraint for the customer's input." + ) + .optional(), + /** The minimum character length requirement for the customer's input. */ + minimum_length: z + .number() + .int() + .nullable() + .describe( + "The minimum character length requirement for the customer's input." + ) + .optional() + }) + export type PaymentLinksResourceCustomFieldsText = z.infer< + typeof PaymentLinksResourceCustomFieldsTextSchema + > + + export const PaymentLinksResourceCustomTextPositionSchema = z.object({ + /** Text may be up to 1200 characters in length. */ + message: z + .string() + .max(500) + .describe('Text may be up to 1200 characters in length.') + }) + export type PaymentLinksResourceCustomTextPosition = z.infer< + typeof PaymentLinksResourceCustomTextPositionSchema + > + + export const PaymentLinksResourcePaymentIntentDataSchema = z.object({ + /** Indicates when the funds will be captured from the customer's account. */ + capture_method: z + .enum(['automatic', 'automatic_async', 'manual']) + .nullable() + .describe( + "Indicates when the funds will be captured from the customer's account." + ) + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** Indicates that you intend to make future payments with the payment method collected during checkout. */ + setup_future_usage: z + .enum(['off_session', 'on_session']) + .nullable() + .describe( + 'Indicates that you intend to make future payments with the payment method collected during checkout.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type PaymentLinksResourcePaymentIntentData = z.infer< + typeof PaymentLinksResourcePaymentIntentDataSchema + > + + export const PaymentLinksResourcePhoneNumberCollectionSchema = z.object({ + /** If `true`, a phone number will be collected during checkout. */ + enabled: z + .boolean() + .describe('If `true`, a phone number will be collected during checkout.') + }) + export type PaymentLinksResourcePhoneNumberCollection = z.infer< + typeof PaymentLinksResourcePhoneNumberCollectionSchema + > + + export const PaymentLinksResourceCompletedSessionsSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + 'The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met.' + ), + /** The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. */ + limit: z + .number() + .int() + .describe( + 'The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.' + ) + }) + export type PaymentLinksResourceCompletedSessions = z.infer< + typeof PaymentLinksResourceCompletedSessionsSchema + > + + export const PaymentLinksResourceShippingAddressCollectionSchema = z.object({ + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .describe( + '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`.' + ) + }) + export type PaymentLinksResourceShippingAddressCollection = z.infer< + typeof PaymentLinksResourceShippingAddressCollectionSchema + > + + export const PaymentLinksResourceTaxIdCollectionSchema = z.object({ + /** Indicates whether tax ID collection is enabled for the session. */ + enabled: z + .boolean() + .describe( + 'Indicates whether tax ID collection is enabled for the session.' + ), + required: z.enum(['if_supported', 'never']) + }) + export type PaymentLinksResourceTaxIdCollection = z.infer< + typeof PaymentLinksResourceTaxIdCollectionSchema + > + + export const CheckoutAcssDebitMandateOptionsSchema = z.object({ + /** A URL for custom mandate text */ + custom_mandate_url: z + .string() + .max(5000) + .describe('A URL for custom mandate text') + .optional(), + /** List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. */ + default_for: z + .array(z.enum(['invoice', 'subscription'])) + .describe( + 'List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.' + ) + .optional(), + /** Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description: z + .string() + .max(5000) + .nullable() + .describe( + "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'." + ) + .optional(), + /** Payment schedule for the mandate. */ + payment_schedule: z + .enum(['combined', 'interval', 'sporadic']) + .nullable() + .describe('Payment schedule for the mandate.') + .optional(), + /** Transaction type of the mandate. */ + transaction_type: z + .enum(['business', 'personal']) + .nullable() + .describe('Transaction type of the mandate.') + .optional() + }) + export type CheckoutAcssDebitMandateOptions = z.infer< + typeof CheckoutAcssDebitMandateOptionsSchema + > + + export const CheckoutAffirmPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutAffirmPaymentMethodOptions = z.infer< + typeof CheckoutAffirmPaymentMethodOptionsSchema + > + + export const CheckoutAfterpayClearpayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutAfterpayClearpayPaymentMethodOptions = z.infer< + typeof CheckoutAfterpayClearpayPaymentMethodOptionsSchema + > + + export const CheckoutAlipayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutAlipayPaymentMethodOptions = z.infer< + typeof CheckoutAlipayPaymentMethodOptionsSchema + > + + export const CheckoutAmazonPayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutAmazonPayPaymentMethodOptions = z.infer< + typeof CheckoutAmazonPayPaymentMethodOptionsSchema + > + + export const CheckoutAuBecsDebitPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional() + }) + export type CheckoutAuBecsDebitPaymentMethodOptions = z.infer< + typeof CheckoutAuBecsDebitPaymentMethodOptionsSchema + > + + export const CheckoutPaymentMethodOptionsMandateOptionsBacsDebitSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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'." + ) + .optional() + }) + export type CheckoutPaymentMethodOptionsMandateOptionsBacsDebit = z.infer< + typeof CheckoutPaymentMethodOptionsMandateOptionsBacsDebitSchema + > + + export const CheckoutBancontactPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutBancontactPaymentMethodOptions = z.infer< + typeof CheckoutBancontactPaymentMethodOptionsSchema + > + + export const CheckoutBoletoPaymentMethodOptionsSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutBoletoPaymentMethodOptions = z.infer< + typeof CheckoutBoletoPaymentMethodOptionsSchema + > + + export const CheckoutCardInstallmentsOptionsSchema = z.object({ + /** Indicates if installments are enabled */ + enabled: z + .boolean() + .describe('Indicates if installments are enabled') + .optional() + }) + export type CheckoutCardInstallmentsOptions = z.infer< + typeof CheckoutCardInstallmentsOptionsSchema + > + + export const PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsSchema = + z.object({ + /** 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: z + .array( + z.enum([ + 'american_express', + 'discover_global_network', + 'mastercard', + 'visa' + ]) + ) + .describe( + "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." + ) + .optional() + }) + export type PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictions = + z.infer< + typeof PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsSchema + > + + export const CheckoutCashappPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutCashappPaymentMethodOptions = z.infer< + typeof CheckoutCashappPaymentMethodOptionsSchema + > + + export const CheckoutEpsPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutEpsPaymentMethodOptions = z.infer< + typeof CheckoutEpsPaymentMethodOptionsSchema + > + + export const CheckoutFpxPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutFpxPaymentMethodOptions = z.infer< + typeof CheckoutFpxPaymentMethodOptionsSchema + > + + export const CheckoutGiropayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutGiropayPaymentMethodOptions = z.infer< + typeof CheckoutGiropayPaymentMethodOptionsSchema + > + + export const CheckoutGrabPayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutGrabPayPaymentMethodOptions = z.infer< + typeof CheckoutGrabPayPaymentMethodOptionsSchema + > + + export const CheckoutIdealPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutIdealPaymentMethodOptions = z.infer< + typeof CheckoutIdealPaymentMethodOptionsSchema + > + + export const CheckoutKakaoPayPaymentMethodOptionsSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutKakaoPayPaymentMethodOptions = z.infer< + typeof CheckoutKakaoPayPaymentMethodOptionsSchema + > + + export const CheckoutKlarnaPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutKlarnaPaymentMethodOptions = z.infer< + typeof CheckoutKlarnaPaymentMethodOptionsSchema + > + + export const CheckoutKonbiniPaymentMethodOptionsSchema = z.object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutKonbiniPaymentMethodOptions = z.infer< + typeof CheckoutKonbiniPaymentMethodOptionsSchema + > + + export const CheckoutKrCardPaymentMethodOptionsSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutKrCardPaymentMethodOptions = z.infer< + typeof CheckoutKrCardPaymentMethodOptionsSchema + > + + export const CheckoutLinkPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutLinkPaymentMethodOptions = z.infer< + typeof CheckoutLinkPaymentMethodOptionsSchema + > + + export const CheckoutMobilepayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutMobilepayPaymentMethodOptions = z.infer< + typeof CheckoutMobilepayPaymentMethodOptionsSchema + > + + export const CheckoutMultibancoPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutMultibancoPaymentMethodOptions = z.infer< + typeof CheckoutMultibancoPaymentMethodOptionsSchema + > + + export const CheckoutNaverPayPaymentMethodOptionsSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type CheckoutNaverPayPaymentMethodOptions = z.infer< + typeof CheckoutNaverPayPaymentMethodOptionsSchema + > + + export const CheckoutOxxoPaymentMethodOptionsSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutOxxoPaymentMethodOptions = z.infer< + typeof CheckoutOxxoPaymentMethodOptionsSchema + > + + export const CheckoutP24PaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutP24PaymentMethodOptions = z.infer< + typeof CheckoutP24PaymentMethodOptionsSchema + > + + export const CheckoutPaycoPaymentMethodOptionsSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type CheckoutPaycoPaymentMethodOptions = z.infer< + typeof CheckoutPaycoPaymentMethodOptionsSchema + > + + export const CheckoutPaynowPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutPaynowPaymentMethodOptions = z.infer< + typeof CheckoutPaynowPaymentMethodOptionsSchema + > + + export const CheckoutPaypalPaymentMethodOptionsSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale: z + .string() + .max(5000) + .nullable() + .describe( + 'Preferred locale of the PayPal checkout page that the customer is redirected to.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutPaypalPaymentMethodOptions = z.infer< + typeof CheckoutPaypalPaymentMethodOptionsSchema + > + + export const CheckoutPixPaymentMethodOptionsSchema = z.object({ + /** The number of seconds after which Pix payment will expire. */ + expires_after_seconds: z + .number() + .int() + .nullable() + .describe('The number of seconds after which Pix payment will expire.') + .optional() + }) + export type CheckoutPixPaymentMethodOptions = z.infer< + typeof CheckoutPixPaymentMethodOptionsSchema + > + + export const CheckoutRevolutPayPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .enum(['none', 'off_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutRevolutPayPaymentMethodOptions = z.infer< + typeof CheckoutRevolutPayPaymentMethodOptionsSchema + > + + export const CheckoutSamsungPayPaymentMethodOptionsSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional() + }) + export type CheckoutSamsungPayPaymentMethodOptions = z.infer< + typeof CheckoutSamsungPayPaymentMethodOptionsSchema + > + + export const CheckoutPaymentMethodOptionsMandateOptionsSepaDebitSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + "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'." + ) + .optional() + }) + export type CheckoutPaymentMethodOptionsMandateOptionsSepaDebit = z.infer< + typeof CheckoutPaymentMethodOptionsMandateOptionsSepaDebitSchema + > + + export const CheckoutSofortPaymentMethodOptionsSchema = z.object({ + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutSofortPaymentMethodOptions = z.infer< + typeof CheckoutSofortPaymentMethodOptionsSchema + > + + export const CheckoutSwishPaymentMethodOptionsSchema = z.object({ + /** The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. */ + reference: z + .string() + .max(5000) + .nullable() + .describe( + 'The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.' + ) + .optional() + }) + export type CheckoutSwishPaymentMethodOptions = z.infer< + typeof CheckoutSwishPaymentMethodOptionsSchema + > + + export const PaymentPagesCheckoutSessionPhoneNumberCollectionSchema = + z.object({ + /** Indicates whether phone number collection is enabled for the session */ + enabled: z + .boolean() + .describe( + 'Indicates whether phone number collection is enabled for the session' + ) + }) + export type PaymentPagesCheckoutSessionPhoneNumberCollection = z.infer< + typeof PaymentPagesCheckoutSessionPhoneNumberCollectionSchema + > + + export const PaymentPagesCheckoutSessionSavedPaymentMethodOptionsSchema = + z.object({ + /** 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: z + .array(z.enum(['always', 'limited', 'unspecified'])) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. */ + payment_method_remove: z + .enum(['disabled', 'enabled']) + .nullable() + .describe( + 'Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.' + ) + .optional(), + /** Enable customers to choose if they wish to save their payment method for future use. Disabled by default. */ + payment_method_save: z + .enum(['disabled', 'enabled']) + .nullable() + .describe( + 'Enable customers to choose if they wish to save their payment method for future use. Disabled by default.' + ) + .optional() + }) + export type PaymentPagesCheckoutSessionSavedPaymentMethodOptions = z.infer< + typeof PaymentPagesCheckoutSessionSavedPaymentMethodOptionsSchema + > + + export const PaymentPagesCheckoutSessionShippingAddressCollectionSchema = + z.object({ + /** + * 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: z + .array( + z.enum([ + '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' + ]) + ) + .describe( + 'An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`.' + ) + }) + export type PaymentPagesCheckoutSessionShippingAddressCollection = z.infer< + typeof PaymentPagesCheckoutSessionShippingAddressCollectionSchema + > + + export const PaymentPagesCheckoutSessionTaxIdCollectionSchema = z.object({ + /** Indicates whether tax ID collection is enabled for the session */ + enabled: z + .boolean() + .describe( + 'Indicates whether tax ID collection is enabled for the session' + ), + /** Indicates whether a tax ID is required on the payment page */ + required: z + .enum(['if_supported', 'never']) + .describe('Indicates whether a tax ID is required on the payment page') + }) + export type PaymentPagesCheckoutSessionTaxIdCollection = z.infer< + typeof PaymentPagesCheckoutSessionTaxIdCollectionSchema + > + + export const ClimateRemovalsBeneficiarySchema = z.object({ + /** Publicly displayable name for the end beneficiary of carbon removal. */ + public_name: z + .string() + .max(5000) + .describe( + 'Publicly displayable name for the end beneficiary of carbon removal.' + ) + }) + export type ClimateRemovalsBeneficiary = z.infer< + typeof ClimateRemovalsBeneficiarySchema + > + + export const ClimateRemovalsLocationSchema = z.object({ + /** The city where the supplier is located. */ + city: z + .string() + .max(5000) + .nullable() + .describe('The city where the supplier is located.') + .optional(), + /** Two-letter ISO code representing the country where the supplier is located. */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter ISO code representing the country where the supplier is located.' + ), + /** The geographic latitude where the supplier is located. */ + latitude: z + .number() + .nullable() + .describe('The geographic latitude where the supplier is located.') + .optional(), + /** The geographic longitude where the supplier is located. */ + longitude: z + .number() + .nullable() + .describe('The geographic longitude where the supplier is located.') + .optional(), + /** The state/county/province/region where the supplier is located. */ + region: z + .string() + .max(5000) + .nullable() + .describe( + 'The state/county/province/region where the supplier is located.' + ) + .optional() + }) + export type ClimateRemovalsLocation = z.infer< + typeof ClimateRemovalsLocationSchema + > + + export const ClimateRemovalsProductsPriceSchema = z.object({ + /** Fees for one metric ton of carbon removal in the currency's smallest unit. */ + amount_fees: z + .number() + .int() + .describe( + "Fees for one metric ton of carbon removal in the currency's smallest unit." + ), + /** Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. */ + amount_subtotal: z + .number() + .int() + .describe( + "Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit." + ), + /** Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. */ + amount_total: z + .number() + .int() + .describe( + "Total for one metric ton of carbon removal (including fees) in the currency's smallest unit." + ) + }) + export type ClimateRemovalsProductsPrice = z.infer< + typeof ClimateRemovalsProductsPriceSchema + > + + /** This hash contains details about the online acceptance. */ + export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineSchema = + z + .object({ + /** The IP address from which the Mandate was accepted by the customer. */ + ip_address: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address from which the Mandate was accepted by the customer.' + ) + .optional(), + /** The user agent of the browser from which the Mandate was accepted by the customer. */ + user_agent: z + .string() + .max(5000) + .nullable() + .describe( + 'The user agent of the browser from which the Mandate was accepted by the customer.' + ) + .optional() + }) + .describe('This hash contains details about the online acceptance.') + export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline = + z.infer< + typeof ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineSchema + > + + /** This hash contains the card payment method options. */ + export const ConfirmationTokensResourcePaymentMethodOptionsResourceCardSchema = + z + .object({ + /** The `cvc_update` Token collected from the Payment Element. */ + cvc_token: z + .string() + .max(5000) + .nullable() + .describe( + 'The `cvc_update` Token collected from the Payment Element.' + ) + .optional() + }) + .describe('This hash contains the card payment method options.') + export type ConfirmationTokensResourcePaymentMethodOptionsResourceCard = + z.infer< + typeof ConfirmationTokensResourcePaymentMethodOptionsResourceCardSchema + > + + export const CountrySpecVerificationFieldDetailsSchema = z.object({ + /** Additional fields which are only required for some users. */ + additional: z + .array(z.string().max(5000)) + .describe('Additional fields which are only required for some users.'), + /** Fields which every account must eventually provide. */ + minimum: z + .array(z.string().max(5000)) + .describe('Fields which every account must eventually provide.') + }) + export type CountrySpecVerificationFieldDetails = z.infer< + typeof CountrySpecVerificationFieldDetailsSchema + > + + /** This hash contains whether the buy button is enabled. */ + export const CustomerSessionResourceComponentsResourceBuyButtonSchema = z + .object({ + /** Whether the buy button is enabled. */ + enabled: z.boolean().describe('Whether the buy button is enabled.') + }) + .describe('This hash contains whether the buy button is enabled.') + export type CustomerSessionResourceComponentsResourceBuyButton = z.infer< + typeof CustomerSessionResourceComponentsResourceBuyButtonSchema + > + + /** This hash contains the features the Payment Element supports. */ + export const CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesSchema = + z + .object({ + /** + * 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: z + .array(z.enum(['always', 'limited', 'unspecified'])) + .describe( + '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.\n\nIf not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].' + ), + /** Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. */ + payment_method_redisplay: z + .enum(['disabled', 'enabled']) + .describe( + 'Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.' + ), + /** Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. */ + payment_method_redisplay_limit: z + .number() + .int() + .nullable() + .describe( + 'Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.' + ) + .optional(), + /** + * 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: z + .enum(['disabled', 'enabled']) + .describe( + 'Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.\n\nAllowing 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).' + ), + /** + * 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: z + .enum(['disabled', 'enabled']) + .describe( + "Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.\n\nIf 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`." + ), + /** + * 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: z + .enum(['off_session', 'on_session']) + .nullable() + .describe( + '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.\n\nWhen using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.' + ) + .optional() + }) + .describe('This hash contains the features the Payment Element supports.') + export type CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures = + z.infer< + typeof CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesSchema + > + + /** This hash contains whether the pricing table is enabled. */ + export const CustomerSessionResourceComponentsResourcePricingTableSchema = z + .object({ + /** Whether the pricing table is enabled. */ + enabled: z.boolean().describe('Whether the pricing table is enabled.') + }) + .describe('This hash contains whether the pricing table is enabled.') + export type CustomerSessionResourceComponentsResourcePricingTable = z.infer< + typeof CustomerSessionResourceComponentsResourcePricingTableSchema + > + + /** + * 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 EntitlementsFeatureSchema = z + .object({ + /** Inactive features cannot be attached to new products and will not be returned from the features list endpoint. */ + active: z + .boolean() + .describe( + 'Inactive features cannot be attached to new products and will not be returned from the features list endpoint.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** A unique key you provide as your own system identifier. This may be up to 80 characters. */ + lookup_key: z + .string() + .max(5000) + .describe( + 'A unique key you provide as your own system identifier. This may be up to 80 characters.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The feature's name, for your own purpose, not meant to be displayable to the customer. */ + name: z + .string() + .max(80) + .describe( + "The feature's name, for your own purpose, not meant to be displayable to the customer." + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('entitlements.feature') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'A feature represents a monetizable ability or functionality in your system.\nFeatures 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 EntitlementsFeature = z.infer + + export const EphemeralKeySchema = z.object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Time at which the key will expire. Measured in seconds since the Unix epoch. */ + expires: z + .number() + .int() + .describe( + 'Time at which the key will expire. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('ephemeral_key') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The key's secret. You can use this value to make authorized requests to the Stripe API. */ + secret: z + .string() + .max(5000) + .describe( + "The key's secret. You can use this value to make authorized requests to the Stripe API." + ) + .optional() + }) + export type EphemeralKey = z.infer + + export const NotificationEventDataSchema = z.object({ + /** 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: z + .record(z.any()) + .describe( + '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 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: z + .record(z.any()) + .describe( + '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.' + ) + .optional() + }) + export type NotificationEventData = z.infer< + typeof NotificationEventDataSchema + > + + export const NotificationEventRequestSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.' + ) + .optional() + }) + export type NotificationEventRequest = z.infer< + typeof NotificationEventRequestSchema + > + + /** + * `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 ExchangeRateSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .describe( + 'Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('exchange_rate') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .record(z.number()) + .describe( + '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.' + ) + }) + .describe( + "`ExchangeRate` objects allow you to determine the rates that Stripe is currently\nusing to convert from one currency to another. Since this number is variable\nthroughout the day, there are various reasons why you might want to know the current\nrate (for example, to dynamically price an item for a user with a default\npayment in a foreign currency).\n\nPlease refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details.\n\n*[Note: this integration path is supported but no longer recommended]* Additionally,\nyou can guarantee that a charge is made with an exchange rate that you expect is\ncurrent. To do so, you must pass in the exchange_rate to charges endpoints. If the\nvalue is no longer up to date, the charge won't go through. Please refer to our\n[Using with charges](https://stripe.com/docs/exchange-rates) guide for more details.\n\n-----\n\n \n\n*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:*\n\n- *localize prices for processing payments on Stripe*\n- *reconcile Stripe transactions*\n- *determine how much money to send to a connected account*\n- *determine app fees to charge a connected account*\n\n*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 ExchangeRate = z.infer + + export const BankConnectionsResourceBalanceApiResourceCashBalanceSchema = + z.object({ + /** + * 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: z + .record(z.number().int()) + .nullable() + .describe( + '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.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach 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.' + ) + .optional() + }) + export type BankConnectionsResourceBalanceApiResourceCashBalance = z.infer< + typeof BankConnectionsResourceBalanceApiResourceCashBalanceSchema + > + + export const BankConnectionsResourceBalanceApiResourceCreditBalanceSchema = + z.object({ + /** + * 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: z + .record(z.number().int()) + .nullable() + .describe( + 'The credit that has been used by the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach 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.' + ) + .optional() + }) + export type BankConnectionsResourceBalanceApiResourceCreditBalance = z.infer< + typeof BankConnectionsResourceBalanceApiResourceCreditBalanceSchema + > + + export const BankConnectionsResourceBalanceRefreshSchema = z.object({ + /** The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. */ + last_attempted_at: z + .number() + .int() + .describe( + 'The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The status of the last refresh attempt. */ + status: z + .enum(['failed', 'pending', 'succeeded']) + .describe('The status of the last refresh attempt.') + }) + export type BankConnectionsResourceBalanceRefresh = z.infer< + typeof BankConnectionsResourceBalanceRefreshSchema + > + + /** Describes an owner of an account. */ + export const FinancialConnectionsAccountOwnerSchema = z + .object({ + /** The email address of the owner. */ + email: z + .string() + .max(5000) + .nullable() + .describe('The email address of the owner.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The full name of the owner. */ + name: z.string().max(5000).describe('The full name of the owner.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('financial_connections.account_owner') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The ownership object that this owner belongs to. */ + ownership: z + .string() + .max(5000) + .describe('The ownership object that this owner belongs to.'), + /** The raw phone number of the owner. */ + phone: z + .string() + .max(5000) + .nullable() + .describe('The raw phone number of the owner.') + .optional(), + /** The raw physical address of the owner. */ + raw_address: z + .string() + .max(5000) + .nullable() + .describe('The raw physical address of the owner.') + .optional(), + /** The timestamp of the refresh that updated this owner. */ + refreshed_at: z + .number() + .int() + .nullable() + .describe('The timestamp of the refresh that updated this owner.') + .optional() + }) + .describe('Describes an owner of an account.') + export type FinancialConnectionsAccountOwner = z.infer< + typeof FinancialConnectionsAccountOwnerSchema + > + + export const BankConnectionsResourceOwnershipRefreshSchema = z.object({ + /** The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. */ + last_attempted_at: z + .number() + .int() + .describe( + 'The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The status of the last refresh attempt. */ + status: z + .enum(['failed', 'pending', 'succeeded']) + .describe('The status of the last refresh attempt.') + }) + export type BankConnectionsResourceOwnershipRefresh = z.infer< + typeof BankConnectionsResourceOwnershipRefreshSchema + > + + export const BankConnectionsResourceTransactionRefreshSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. */ + last_attempted_at: z + .number() + .int() + .describe( + 'The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The status of the last refresh attempt. */ + status: z + .enum(['failed', 'pending', 'succeeded']) + .describe('The status of the last refresh attempt.') + }) + export type BankConnectionsResourceTransactionRefresh = z.infer< + typeof BankConnectionsResourceTransactionRefreshSchema + > + + export const BankConnectionsResourceLinkAccountSessionFiltersSchema = + z.object({ + /** Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. */ + account_subcategories: z + .array( + z.enum([ + 'checking', + 'credit_card', + 'line_of_credit', + 'mortgage', + 'savings' + ]) + ) + .nullable() + .describe( + 'Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.' + ) + .optional(), + /** List of countries from which to filter accounts. */ + countries: z + .array(z.string().max(5000)) + .nullable() + .describe('List of countries from which to filter accounts.') + .optional() + }) + export type BankConnectionsResourceLinkAccountSessionFilters = z.infer< + typeof BankConnectionsResourceLinkAccountSessionFiltersSchema + > + + export const BankConnectionsResourceTransactionResourceStatusTransitionsSchema = + z.object({ + /** Time at which this transaction posted. Measured in seconds since the Unix epoch. */ + posted_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which this transaction posted. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Time at which this transaction was voided. Measured in seconds since the Unix epoch. */ + void_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which this transaction was voided. Measured in seconds since the Unix epoch.' + ) + .optional() + }) + export type BankConnectionsResourceTransactionResourceStatusTransitions = + z.infer< + typeof BankConnectionsResourceTransactionResourceStatusTransitionsSchema + > + + /** Metadata about the forwarded request. */ + export const ForwardedRequestContextSchema = z + .object({ + /** The time it took in milliseconds for the destination endpoint to respond. */ + destination_duration: z + .number() + .int() + .describe( + 'The time it took in milliseconds for the destination endpoint to respond.' + ), + /** The IP address of the destination. */ + destination_ip_address: z + .string() + .max(5000) + .describe('The IP address of the destination.') + }) + .describe('Metadata about the forwarded request.') + export type ForwardedRequestContext = z.infer< + typeof ForwardedRequestContextSchema + > + + /** Header data. */ + export const ForwardedRequestHeaderSchema = z + .object({ + /** The header name. */ + name: z.string().max(5000).describe('The header name.'), + /** The header value. */ + value: z.string().max(5000).describe('The header value.') + }) + .describe('Header data.') + export type ForwardedRequestHeader = z.infer< + typeof ForwardedRequestHeaderSchema + > + + /** Point in Time */ + export const GelatoDataDocumentReportDateOfBirthSchema = z + .object({ + /** Numerical day between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('Numerical day between 1 and 31.') + .optional(), + /** Numerical month between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('Numerical month between 1 and 12.') + .optional(), + /** The four-digit year. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year.') + .optional() + }) + .describe('Point in Time') + export type GelatoDataDocumentReportDateOfBirth = z.infer< + typeof GelatoDataDocumentReportDateOfBirthSchema + > + + export const GelatoDocumentReportErrorSchema = z.object({ + /** A short machine-readable string giving the reason for the verification failure. */ + code: z + .enum([ + 'document_expired', + 'document_type_not_supported', + 'document_unverified_other' + ]) + .nullable() + .describe( + 'A short machine-readable string giving the reason for the verification failure.' + ) + .optional(), + /** A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable message giving the reason for the failure. These messages can be shown to your users.' + ) + .optional() + }) + export type GelatoDocumentReportError = z.infer< + typeof GelatoDocumentReportErrorSchema + > + + /** Point in Time */ + export const GelatoDataDocumentReportExpirationDateSchema = z + .object({ + /** Numerical day between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('Numerical day between 1 and 31.') + .optional(), + /** Numerical month between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('Numerical month between 1 and 12.') + .optional(), + /** The four-digit year. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year.') + .optional() + }) + .describe('Point in Time') + export type GelatoDataDocumentReportExpirationDate = z.infer< + typeof GelatoDataDocumentReportExpirationDateSchema + > + + /** Point in Time */ + export const GelatoDataDocumentReportIssuedDateSchema = z + .object({ + /** Numerical day between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('Numerical day between 1 and 31.') + .optional(), + /** Numerical month between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('Numerical month between 1 and 12.') + .optional(), + /** The four-digit year. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year.') + .optional() + }) + .describe('Point in Time') + export type GelatoDataDocumentReportIssuedDate = z.infer< + typeof GelatoDataDocumentReportIssuedDateSchema + > + + export const GelatoEmailReportErrorSchema = z.object({ + /** A short machine-readable string giving the reason for the verification failure. */ + code: z + .enum(['email_unverified_other', 'email_verification_declined']) + .nullable() + .describe( + 'A short machine-readable string giving the reason for the verification failure.' + ) + .optional(), + /** A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable message giving the reason for the failure. These messages can be shown to your users.' + ) + .optional() + }) + export type GelatoEmailReportError = z.infer< + typeof GelatoEmailReportErrorSchema + > + + /** Point in Time */ + export const GelatoDataIdNumberReportDateSchema = z + .object({ + /** Numerical day between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('Numerical day between 1 and 31.') + .optional(), + /** Numerical month between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('Numerical month between 1 and 12.') + .optional(), + /** The four-digit year. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year.') + .optional() + }) + .describe('Point in Time') + export type GelatoDataIdNumberReportDate = z.infer< + typeof GelatoDataIdNumberReportDateSchema + > + + export const GelatoIdNumberReportErrorSchema = z.object({ + /** A short machine-readable string giving the reason for the verification failure. */ + code: z + .enum([ + 'id_number_insufficient_document_data', + 'id_number_mismatch', + 'id_number_unverified_other' + ]) + .nullable() + .describe( + 'A short machine-readable string giving the reason for the verification failure.' + ) + .optional(), + /** A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable message giving the reason for the failure. These messages can be shown to your users.' + ) + .optional() + }) + export type GelatoIdNumberReportError = z.infer< + typeof GelatoIdNumberReportErrorSchema + > + + export const GelatoReportDocumentOptionsSchema = z.object({ + /** 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: z + .array(z.enum(['driving_license', 'id_card', 'passport'])) + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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.' + ) + .optional(), + /** Disable image uploads, identity document images have to be captured using the device’s camera. */ + require_live_capture: z + .boolean() + .describe( + 'Disable image uploads, identity document images have to be captured using the device’s camera.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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).' + ) + .optional() + }) + export type GelatoReportDocumentOptions = z.infer< + typeof GelatoReportDocumentOptionsSchema + > + + export const GelatoReportIdNumberOptionsSchema = z.object({}) + export type GelatoReportIdNumberOptions = z.infer< + typeof GelatoReportIdNumberOptionsSchema + > + + export const GelatoPhoneReportErrorSchema = z.object({ + /** A short machine-readable string giving the reason for the verification failure. */ + code: z + .enum(['phone_unverified_other', 'phone_verification_declined']) + .nullable() + .describe( + 'A short machine-readable string giving the reason for the verification failure.' + ) + .optional(), + /** A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable message giving the reason for the failure. These messages can be shown to your users.' + ) + .optional() + }) + export type GelatoPhoneReportError = z.infer< + typeof GelatoPhoneReportErrorSchema + > + + export const GelatoSelfieReportErrorSchema = z.object({ + /** A short machine-readable string giving the reason for the verification failure. */ + code: z + .enum([ + 'selfie_document_missing_photo', + 'selfie_face_mismatch', + 'selfie_manipulated', + 'selfie_unverified_other' + ]) + .nullable() + .describe( + 'A short machine-readable string giving the reason for the verification failure.' + ) + .optional(), + /** A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable message giving the reason for the failure. These messages can be shown to your users.' + ) + .optional() + }) + export type GelatoSelfieReportError = z.infer< + typeof GelatoSelfieReportErrorSchema + > + + /** Shows last VerificationSession error */ + export const GelatoSessionLastErrorSchema = z + .object({ + /** A short machine-readable string giving the reason for the verification or user-session failure. */ + 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' + ]) + .nullable() + .describe( + 'A short machine-readable string giving the reason for the verification or user-session failure.' + ) + .optional(), + /** A message that explains the reason for verification or user-session failure. */ + reason: z + .string() + .max(5000) + .nullable() + .describe( + 'A message that explains the reason for verification or user-session failure.' + ) + .optional() + }) + .describe('Shows last VerificationSession error') + export type GelatoSessionLastError = z.infer< + typeof GelatoSessionLastErrorSchema + > + + export const GelatoSessionDocumentOptionsSchema = z.object({ + /** 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: z + .array(z.enum(['driving_license', 'id_card', 'passport'])) + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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.' + ) + .optional(), + /** Disable image uploads, identity document images have to be captured using the device’s camera. */ + require_live_capture: z + .boolean() + .describe( + 'Disable image uploads, identity document images have to be captured using the device’s camera.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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).' + ) + .optional() + }) + export type GelatoSessionDocumentOptions = z.infer< + typeof GelatoSessionDocumentOptionsSchema + > + + export const GelatoSessionEmailOptionsSchema = z.object({ + /** Request one time password verification of `provided_details.email`. */ + require_verification: z + .boolean() + .describe( + 'Request one time password verification of `provided_details.email`.' + ) + .optional() + }) + export type GelatoSessionEmailOptions = z.infer< + typeof GelatoSessionEmailOptionsSchema + > + + export const GelatoSessionIdNumberOptionsSchema = z.object({}) + export type GelatoSessionIdNumberOptions = z.infer< + typeof GelatoSessionIdNumberOptionsSchema + > + + export const GelatoSessionPhoneOptionsSchema = z.object({ + /** Request one time password verification of `provided_details.phone`. */ + require_verification: z + .boolean() + .describe( + 'Request one time password verification of `provided_details.phone`.' + ) + .optional() + }) + export type GelatoSessionPhoneOptions = z.infer< + typeof GelatoSessionPhoneOptionsSchema + > + + export const GelatoProvidedDetailsSchema = z.object({ + /** Email of user being verified */ + email: z + .string() + .max(5000) + .describe('Email of user being verified') + .optional(), + /** Phone number of user being verified */ + phone: z + .string() + .max(5000) + .describe('Phone number of user being verified') + .optional() + }) + export type GelatoProvidedDetails = z.infer< + typeof GelatoProvidedDetailsSchema + > + + export const VerificationSessionRedactionSchema = z.object({ + /** Indicates whether this object and its related objects have been redacted or not. */ + status: z + .enum(['processing', 'redacted']) + .describe( + 'Indicates whether this object and its related objects have been redacted or not.' + ) + }) + export type VerificationSessionRedaction = z.infer< + typeof VerificationSessionRedactionSchema + > + + /** Point in Time */ + export const GelatoDataVerifiedOutputsDateSchema = z + .object({ + /** Numerical day between 1 and 31. */ + day: z + .number() + .int() + .nullable() + .describe('Numerical day between 1 and 31.') + .optional(), + /** Numerical month between 1 and 12. */ + month: z + .number() + .int() + .nullable() + .describe('Numerical month between 1 and 12.') + .optional(), + /** The four-digit year. */ + year: z + .number() + .int() + .nullable() + .describe('The four-digit year.') + .optional() + }) + .describe('Point in Time') + export type GelatoDataVerifiedOutputsDate = z.infer< + typeof GelatoDataVerifiedOutputsDateSchema + > + + /** + * 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 InvoiceRenderingTemplateSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** A brief description of the template, hidden from customers */ + nickname: z + .string() + .max(5000) + .nullable() + .describe('A brief description of the template, hidden from customers') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('invoice_rendering_template') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The status of the template, one of `active` or `archived`. */ + status: z + .enum(['active', 'archived']) + .describe('The status of the template, one of `active` or `archived`.'), + /** Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering */ + version: z + .number() + .int() + .describe( + 'Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering' + ) + }) + .describe( + 'Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates\ncan be created from within the Dashboard, and they can be used over the API when creating invoices.' + ) + export type InvoiceRenderingTemplate = z.infer< + typeof InvoiceRenderingTemplateSchema + > + + export const DeletedInvoiceitemSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('invoiceitem') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedInvoiceitem = z.infer + + /** 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 IssuingSettlementSchema = z + .object({ + /** The Bank Identification Number reflecting this settlement record. */ + bin: z + .string() + .max(5000) + .describe( + 'The Bank Identification Number reflecting this settlement record.' + ), + /** The date that the transactions are cleared and posted to user's accounts. */ + clearing_date: z + .number() + .int() + .describe( + "The date that the transactions are cleared and posted to user's accounts." + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The total interchange received as reimbursement for the transactions. */ + interchange_fees: z + .number() + .int() + .describe( + 'The total interchange received as reimbursement for the transactions.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The total net amount required to settle with the network. */ + net_total: z + .number() + .int() + .describe('The total net amount required to settle with the network.'), + /** The card network for this settlement report. One of ["visa", "maestro"] */ + network: z + .enum(['maestro', 'visa']) + .describe( + 'The card network for this settlement report. One of ["visa", "maestro"]' + ), + /** The total amount of fees owed to the network. */ + network_fees: z + .number() + .int() + .describe('The total amount of fees owed to the network.'), + /** The Settlement Identification Number assigned by the network. */ + network_settlement_identifier: z + .string() + .max(5000) + .describe( + 'The Settlement Identification Number assigned by the network.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.settlement') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** One of `international` or `uk_national_net`. */ + settlement_service: z + .string() + .max(5000) + .describe('One of `international` or `uk_national_net`.'), + /** The current processing status of this settlement. */ + status: z + .enum(['complete', 'pending']) + .describe('The current processing status of this settlement.'), + /** The total number of transactions reflected in this settlement. */ + transaction_count: z + .number() + .int() + .describe( + 'The total number of transactions reflected in this settlement.' + ), + /** The total transaction amount reflected in this settlement. */ + transaction_volume: z + .number() + .int() + .describe('The total transaction amount reflected in this settlement.') + }) + .describe( + '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 IssuingSettlement = z.infer + + export const PaymentMethodConfigResourceDisplayPreferenceSchema = z.object({ + /** For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. */ + overridable: z + .boolean() + .nullable() + .describe( + "For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used." + ) + .optional(), + /** The account's display preference. */ + preference: z + .enum(['none', 'off', 'on']) + .describe("The account's display preference."), + /** The effective display preference value. */ + value: z + .enum(['off', 'on']) + .describe('The effective display preference value.') + }) + export type PaymentMethodConfigResourceDisplayPreference = z.infer< + typeof PaymentMethodConfigResourceDisplayPreferenceSchema + > + + /** Contains additional details about the status of a payment method for a specific payment method domain. */ + export const PaymentMethodDomainResourcePaymentMethodStatusDetailsSchema = z + .object({ + /** The error message associated with the status of the payment method on the domain. */ + error_message: z + .string() + .max(5000) + .describe( + 'The error message associated with the status of the payment method on the domain.' + ) + }) + .describe( + 'Contains additional details about the status of a payment method for a specific payment method domain.' + ) + export type PaymentMethodDomainResourcePaymentMethodStatusDetails = z.infer< + typeof PaymentMethodDomainResourcePaymentMethodStatusDetailsSchema + > + + export const PlanTierSchema = z.object({ + /** Price for the entire tier. */ + flat_amount: z + .number() + .int() + .nullable() + .describe('Price for the entire tier.') + .optional(), + /** Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. */ + flat_amount_decimal: z + .string() + .nullable() + .describe( + 'Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.' + ) + .optional(), + /** Per unit price for units relevant to the tier. */ + unit_amount: z + .number() + .int() + .nullable() + .describe('Per unit price for units relevant to the tier.') + .optional(), + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal: z + .string() + .nullable() + .describe( + 'Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.' + ) + .optional(), + /** Up to and including to this quantity will be contained in the tier. */ + up_to: z + .number() + .int() + .nullable() + .describe( + 'Up to and including to this quantity will be contained in the tier.' + ) + .optional() + }) + export type PlanTier = z.infer + + export const TransformUsageSchema = z.object({ + /** Divide usage by this number. */ + divide_by: z.number().int().describe('Divide usage by this number.'), + /** After division, either round the result `up` or `down`. */ + round: z + .enum(['down', 'up']) + .describe('After division, either round the result `up` or `down`.') + }) + export type TransformUsage = z.infer + + export const DeletedPlanSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('plan') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedPlan = z.infer + + export const DeletedProductFeatureSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('product_feature') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedProductFeature = z.infer< + typeof DeletedProductFeatureSchema + > + + /** + * 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 RadarValueListItemSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The name or email address of the user who added this item to the value list. */ + created_by: z + .string() + .max(5000) + .describe( + 'The name or email address of the user who added this item to the value list.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('radar.value_list_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The value of the item. */ + value: z.string().max(5000).describe('The value of the item.'), + /** The identifier of the value list this item belongs to. */ + value_list: z + .string() + .max(5000) + .describe('The identifier of the value list this item belongs to.') + }) + .describe( + 'Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.\n\nRelated guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)' + ) + export type RadarValueListItem = z.infer + + export const DeletedRadarValueListItemSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('radar.value_list_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedRadarValueListItem = z.infer< + typeof DeletedRadarValueListItemSchema + > + + export const DeletedRadarValueListSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('radar.value_list') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedRadarValueList = z.infer< + typeof DeletedRadarValueListSchema + > + + export const FinancialReportingFinanceReportRunRunParametersSchema = z.object( + { + /** The set of output columns requested for inclusion in the report run. */ + columns: z + .array(z.string().max(5000)) + .describe( + 'The set of output columns requested for inclusion in the report run.' + ) + .optional(), + /** Connected account ID by which to filter the report run. */ + connected_account: z + .string() + .max(5000) + .describe('Connected account ID by which to filter the report run.') + .optional(), + /** Currency of objects to be included in the report run. */ + currency: z + .string() + .describe('Currency of objects to be included in the report run.') + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ) + .optional(), + /** Payout ID by which to filter the report run. */ + payout: z + .string() + .max(5000) + .describe('Payout ID by which to filter the report run.') + .optional(), + /** Category of balance transactions to be included in the report run. */ + reporting_category: z + .string() + .max(5000) + .describe( + 'Category of balance transactions to be included in the report run.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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`.' + ) + .optional() + } + ) + export type FinancialReportingFinanceReportRunRunParameters = z.infer< + typeof FinancialReportingFinanceReportRunRunParametersSchema + > + + /** + * 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 ReportingReportTypeSchema = z + .object({ + /** Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. */ + data_available_end: z + .number() + .int() + .describe( + 'Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.' + ), + /** Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. */ + data_available_start: z + .number() + .int() + .describe( + 'Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + "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.)" + ) + .optional(), + /** The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. */ + id: z + .string() + .max(5000) + .describe( + 'The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** Human-readable name of the Report Type */ + name: z + .string() + .max(5000) + .describe('Human-readable name of the Report Type'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('reporting.report_type') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** When this Report Type was latest updated. Measured in seconds since the Unix epoch. */ + updated: z + .number() + .int() + .describe( + 'When this Report Type was latest updated. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ) + }) + .describe( + 'The Report Type resource corresponds to a particular type of report, such as\nthe "Activity summary" or "Itemized payouts" reports. These objects are\nidentified by an ID belonging to a set of enumerated values. See\n[API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)\nfor those Report Type IDs, along with required and optional parameters.\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).' + ) + export type ReportingReportType = z.infer + + export const SigmaScheduledQueryRunErrorSchema = z.object({ + /** Information about the run failure. */ + message: z.string().max(5000).describe('Information about the run failure.') + }) + export type SigmaScheduledQueryRunError = z.infer< + typeof SigmaScheduledQueryRunErrorSchema + > + + export const SourceMandateNotificationAcssDebitDataSchema = z.object({ + /** The statement descriptor associate with the debit. */ + statement_descriptor: z + .string() + .max(5000) + .describe('The statement descriptor associate with the debit.') + .optional() + }) + export type SourceMandateNotificationAcssDebitData = z.infer< + typeof SourceMandateNotificationAcssDebitDataSchema + > + + export const SourceMandateNotificationBacsDebitDataSchema = z.object({ + /** Last 4 digits of the account number associated with the debit. */ + last4: z + .string() + .max(5000) + .describe( + 'Last 4 digits of the account number associated with the debit.' + ) + .optional() + }) + export type SourceMandateNotificationBacsDebitData = z.infer< + typeof SourceMandateNotificationBacsDebitDataSchema + > + + export const SourceMandateNotificationSepaDebitDataSchema = z.object({ + /** SEPA creditor ID. */ + creditor_identifier: z + .string() + .max(5000) + .describe('SEPA creditor ID.') + .optional(), + /** Last 4 digits of the account number associated with the debit. */ + last4: z + .string() + .max(5000) + .describe( + 'Last 4 digits of the account number associated with the debit.' + ) + .optional(), + /** Mandate reference associated with the debit. */ + mandate_reference: z + .string() + .max(5000) + .describe('Mandate reference associated with the debit.') + .optional() + }) + export type SourceMandateNotificationSepaDebitData = z.infer< + typeof SourceMandateNotificationSepaDebitDataSchema + > + + export const SourceTransactionAchCreditTransferDataSchema = z.object({ + /** Customer data associated with the transfer. */ + customer_data: z + .string() + .max(5000) + .describe('Customer data associated with the transfer.') + .optional(), + /** Bank account fingerprint associated with the transfer. */ + fingerprint: z + .string() + .max(5000) + .describe('Bank account fingerprint associated with the transfer.') + .optional(), + /** Last 4 digits of the account number associated with the transfer. */ + last4: z + .string() + .max(5000) + .describe( + 'Last 4 digits of the account number associated with the transfer.' + ) + .optional(), + /** Routing number associated with the transfer. */ + routing_number: z + .string() + .max(5000) + .describe('Routing number associated with the transfer.') + .optional() + }) + export type SourceTransactionAchCreditTransferData = z.infer< + typeof SourceTransactionAchCreditTransferDataSchema + > + + export const SourceTransactionChfCreditTransferDataSchema = z.object({ + /** Reference associated with the transfer. */ + reference: z + .string() + .max(5000) + .describe('Reference associated with the transfer.') + .optional(), + /** Sender's country address. */ + sender_address_country: z + .string() + .max(5000) + .describe("Sender's country address.") + .optional(), + /** Sender's line 1 address. */ + sender_address_line1: z + .string() + .max(5000) + .describe("Sender's line 1 address.") + .optional(), + /** Sender's bank account IBAN. */ + sender_iban: z + .string() + .max(5000) + .describe("Sender's bank account IBAN.") + .optional(), + /** Sender's name. */ + sender_name: z.string().max(5000).describe("Sender's name.").optional() + }) + export type SourceTransactionChfCreditTransferData = z.infer< + typeof SourceTransactionChfCreditTransferDataSchema + > + + export const SourceTransactionGbpCreditTransferDataSchema = z.object({ + /** Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ + fingerprint: z + .string() + .max(5000) + .describe( + 'Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** Last 4 digits of sender account number associated with the transfer. */ + last4: z + .string() + .max(5000) + .describe( + 'Last 4 digits of sender account number associated with the transfer.' + ) + .optional(), + /** Sender entered arbitrary information about the transfer. */ + reference: z + .string() + .max(5000) + .describe('Sender entered arbitrary information about the transfer.') + .optional(), + /** Sender account number associated with the transfer. */ + sender_account_number: z + .string() + .max(5000) + .describe('Sender account number associated with the transfer.') + .optional(), + /** Sender name associated with the transfer. */ + sender_name: z + .string() + .max(5000) + .describe('Sender name associated with the transfer.') + .optional(), + /** Sender sort code associated with the transfer. */ + sender_sort_code: z + .string() + .max(5000) + .describe('Sender sort code associated with the transfer.') + .optional() + }) + export type SourceTransactionGbpCreditTransferData = z.infer< + typeof SourceTransactionGbpCreditTransferDataSchema + > + + export const SourceTransactionPaperCheckDataSchema = z.object({ + /** Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ + available_at: z + .string() + .max(5000) + .describe( + 'Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Comma-separated list of invoice IDs associated with the paper check. */ + invoices: z + .string() + .max(5000) + .describe( + 'Comma-separated list of invoice IDs associated with the paper check.' + ) + .optional() + }) + export type SourceTransactionPaperCheckData = z.infer< + typeof SourceTransactionPaperCheckDataSchema + > + + export const SourceTransactionSepaCreditTransferDataSchema = z.object({ + /** Reference associated with the transfer. */ + reference: z + .string() + .max(5000) + .describe('Reference associated with the transfer.') + .optional(), + /** Sender's bank account IBAN. */ + sender_iban: z + .string() + .max(5000) + .describe("Sender's bank account IBAN.") + .optional(), + /** Sender's name. */ + sender_name: z.string().max(5000).describe("Sender's name.").optional() + }) + export type SourceTransactionSepaCreditTransferData = z.infer< + typeof SourceTransactionSepaCreditTransferDataSchema + > + + export const DeletedSubscriptionItemSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('subscription_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedSubscriptionItem = z.infer< + typeof DeletedSubscriptionItemSchema + > + + export const PeriodSchema = z.object({ + /** The end date of this usage period. All usage up to and including this point in time is included. */ + end: z + .number() + .int() + .nullable() + .describe( + 'The end date of this usage period. All usage up to and including this point in time is included.' + ) + .optional(), + /** The start date of this usage period. All usage after this point in time is included. */ + start: z + .number() + .int() + .nullable() + .describe( + 'The start date of this usage period. All usage after this point in time is included.' + ) + .optional() + }) + export type Period = z.infer + + /** + * Usage records allow you to report customer usage and metrics to Stripe for + * metered billing of subscription prices. + * + * Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) + * + * This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). + */ + export const UsageRecordSchema = z + .object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('usage_record') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The usage quantity for the specified date. */ + quantity: z + .number() + .int() + .describe('The usage quantity for the specified date.'), + /** The ID of the subscription item this usage record contains data for. */ + subscription_item: z + .string() + .max(5000) + .describe( + 'The ID of the subscription item this usage record contains data for.' + ), + /** The timestamp when this usage occurred. */ + timestamp: z + .number() + .int() + .describe('The timestamp when this usage occurred.') + }) + .describe( + 'Usage records allow you to report customer usage and metrics to Stripe for\nmetered billing of subscription prices.\n\nRelated guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing)\n\nThis is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based).' + ) + export type UsageRecord = z.infer + + export const TaxProductResourcePostalAddressSchema = z.object({ + /** City, district, suburb, town, or village. */ + city: z + .string() + .max(5000) + .nullable() + .describe('City, district, suburb, town, or village.') + .optional(), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ), + /** Address line 1 (e.g., street, PO Box, or company name). */ + line1: z + .string() + .max(5000) + .nullable() + .describe('Address line 1 (e.g., street, PO Box, or company name).') + .optional(), + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + line2: z + .string() + .max(5000) + .nullable() + .describe('Address line 2 (e.g., apartment, suite, unit, or building).') + .optional(), + /** ZIP or postal code. */ + postal_code: z + .string() + .max(5000) + .nullable() + .describe('ZIP or postal code.') + .optional(), + /** State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". */ + state: z + .string() + .max(5000) + .nullable() + .describe( + 'State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".' + ) + .optional() + }) + export type TaxProductResourcePostalAddress = z.infer< + typeof TaxProductResourcePostalAddressSchema + > + + export const TaxProductResourceCustomerDetailsResourceTaxIdSchema = z.object({ + /** 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`, or `unknown` */ + type: z + .enum([ + 'ad_nrt', + 'ae_trn', + 'al_tin', + 'am_tin', + 'ao_tin', + 'ar_cuit', + 'au_abn', + 'au_arn', + 'ba_tin', + 'bb_tin', + 'bg_uic', + 'bh_vat', + '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', + 'cn_tin', + 'co_nit', + 'cr_tin', + 'de_stn', + 'do_rcn', + 'ec_ruc', + 'eg_tin', + 'es_cif', + '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', + 'kh_tin', + 'kr_brn', + 'kz_bin', + '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' + ]) + .describe( + '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`, or `unknown`' + ), + /** The value of the tax ID. */ + value: z.string().max(5000).describe('The value of the tax ID.') + }) + export type TaxProductResourceCustomerDetailsResourceTaxId = z.infer< + typeof TaxProductResourceCustomerDetailsResourceTaxIdSchema + > + + export const TaxProductResourceJurisdictionSchema = z.object({ + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ), + /** A human-readable name for the jurisdiction imposing the tax. */ + display_name: z + .string() + .max(5000) + .describe('A human-readable name for the jurisdiction imposing the tax.'), + /** Indicates the level of the jurisdiction imposing the tax. */ + level: z + .enum(['city', 'country', 'county', 'district', 'state']) + .describe('Indicates the level of the jurisdiction imposing the tax.'), + /** [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: z + .string() + .max(5000) + .nullable() + .describe( + '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.' + ) + .optional() + }) + export type TaxProductResourceJurisdiction = z.infer< + typeof TaxProductResourceJurisdictionSchema + > + + export const TaxProductResourceLineItemTaxRateDetailsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.)".' + ), + /** The tax rate percentage as a string. For example, 8.5% is represented as "8.5". */ + percentage_decimal: z + .string() + .max(5000) + .describe( + 'The tax rate percentage as a string. For example, 8.5% is represented as "8.5".' + ), + /** The tax type, such as `vat` or `sales_tax`. */ + tax_type: z + .enum([ + 'amusement_tax', + 'communications_tax', + 'gst', + 'hst', + 'igst', + 'jct', + 'lease_tax', + 'pst', + 'qst', + 'retail_delivery_fee', + 'rst', + 'sales_tax', + 'service_tax', + 'vat' + ]) + .describe('The tax type, such as `vat` or `sales_tax`.') + }) + export type TaxProductResourceLineItemTaxRateDetails = z.infer< + typeof TaxProductResourceLineItemTaxRateDetailsSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsDefaultSchema = + z.object({ + /** Type of registration in `country`. */ + type: z.literal('standard').describe('Type of registration in `country`.') + }) + export type TaxProductRegistrationsResourceCountryOptionsDefault = z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsDefaultSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema = + z.object({ + /** Type of registration in `country`. */ + type: z + .literal('simplified') + .describe('Type of registration in `country`.') + }) + export type TaxProductRegistrationsResourceCountryOptionsSimplified = z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsEuStandardSchema = + z.object({ + /** Place of supply scheme used in an EU standard registration. */ + place_of_supply_scheme: z + .enum(['small_seller', 'standard']) + .describe('Place of supply scheme used in an EU standard registration.') + }) + export type TaxProductRegistrationsResourceCountryOptionsEuStandard = z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsEuStandardSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardSchema = + z.object({ + /** Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). */ + province: z + .string() + .max(5000) + .describe( + 'Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).' + ) + }) + export type TaxProductRegistrationsResourceCountryOptionsCaProvinceStandard = + z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxSchema = + z.object({ + /** A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. */ + jurisdiction: z + .string() + .max(5000) + .describe( + 'A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.' + ) + }) + export type TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTax = + z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxSchema = + z.object({ + /** A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. */ + jurisdiction: z + .string() + .max(5000) + .describe( + 'A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.' + ) + }) + export type TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTax = + z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionSchema = + z.object({ + /** A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. */ + jurisdiction: z + .string() + .max(5000) + .describe( + 'A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.' + ) + .optional(), + /** The type of the election for the state sales tax registration. */ + type: z + .enum([ + 'local_use_tax', + 'simplified_sellers_use_tax', + 'single_local_use_tax' + ]) + .describe( + 'The type of the election for the state sales tax registration.' + ) + }) + export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElection = + z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionSchema + > + + export const TaxProductResourceTaxSettingsDefaultsSchema = z.object({ + /** 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: z + .enum(['exclusive', 'inclusive', 'inferred_by_currency']) + .nullable() + .describe( + "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." + ) + .optional(), + /** Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. */ + tax_code: z + .string() + .max(5000) + .nullable() + .describe( + 'Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices.' + ) + .optional() + }) + export type TaxProductResourceTaxSettingsDefaults = z.infer< + typeof TaxProductResourceTaxSettingsDefaultsSchema + > + + export const TaxProductResourceTaxSettingsStatusDetailsResourceActiveSchema = + z.object({}) + export type TaxProductResourceTaxSettingsStatusDetailsResourceActive = + z.infer< + typeof TaxProductResourceTaxSettingsStatusDetailsResourceActiveSchema + > + + export const TaxProductResourceTaxSettingsStatusDetailsResourcePendingSchema = + z.object({ + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type TaxProductResourceTaxSettingsStatusDetailsResourcePending = + z.infer< + typeof TaxProductResourceTaxSettingsStatusDetailsResourcePendingSchema + > + + export const TaxProductResourceTaxTransactionLineItemResourceReversalSchema = + z.object({ + /** The `id` of the line item to reverse in the original transaction. */ + original_line_item: z + .string() + .max(5000) + .describe( + 'The `id` of the line item to reverse in the original transaction.' + ) + }) + export type TaxProductResourceTaxTransactionLineItemResourceReversal = + z.infer< + typeof TaxProductResourceTaxTransactionLineItemResourceReversalSchema + > + + export const TaxProductResourceTaxTransactionResourceReversalSchema = + z.object({ + /** The `id` of the reversed `Transaction` object. */ + original_transaction: z + .string() + .max(5000) + .nullable() + .describe('The `id` of the reversed `Transaction` object.') + .optional() + }) + export type TaxProductResourceTaxTransactionResourceReversal = z.infer< + typeof TaxProductResourceTaxTransactionResourceReversalSchema + > + + export const TaxProductResourceTaxTransactionShippingCostSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_tax: z + .number() + .int() + .describe( + 'The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). */ + shipping_rate: z + .string() + .max(5000) + .describe( + 'The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).' + ) + .optional(), + /** Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. */ + tax_behavior: z + .enum(['exclusive', 'inclusive']) + .describe( + 'Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.' + ), + /** The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. */ + tax_code: z + .string() + .max(5000) + .describe( + 'The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.' + ) + }) + export type TaxProductResourceTaxTransactionShippingCost = z.infer< + typeof TaxProductResourceTaxTransactionShippingCostSchema + > + + export const TerminalConfigurationConfigurationResourceOfflineConfigSchema = + z.object({ + /** Determines whether to allow transactions to be collected while reader is offline. Defaults to false. */ + enabled: z + .boolean() + .nullable() + .describe( + 'Determines whether to allow transactions to be collected while reader is offline. Defaults to false.' + ) + .optional() + }) + export type TerminalConfigurationConfigurationResourceOfflineConfig = z.infer< + typeof TerminalConfigurationConfigurationResourceOfflineConfigSchema + > + + export const TerminalConfigurationConfigurationResourceRebootWindowSchema = + z.object({ + /** 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: z + .number() + .int() + .describe( + 'Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.' + ), + /** Integer between 0 to 23 that represents the start hour of the reboot time window. */ + start_hour: z + .number() + .int() + .describe( + 'Integer between 0 to 23 that represents the start hour of the reboot time window.' + ) + }) + export type TerminalConfigurationConfigurationResourceRebootWindow = z.infer< + typeof TerminalConfigurationConfigurationResourceRebootWindowSchema + > + + export const TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema = + z.object({ + /** Fixed amounts displayed when collecting a tip */ + fixed_amounts: z + .array(z.number().int()) + .nullable() + .describe('Fixed amounts displayed when collecting a tip') + .optional(), + /** Percentages displayed when collecting a tip */ + percentages: z + .array(z.number().int()) + .nullable() + .describe('Percentages displayed when collecting a tip') + .optional(), + /** Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + smart_tip_threshold: z + .number() + .int() + .describe( + 'Below this amount, fixed amounts will be displayed; above it, percentages will be displayed' + ) + .optional() + }) + export type TerminalConfigurationConfigurationResourceCurrencySpecificConfig = + z.infer< + typeof TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema + > + + export const DeletedTerminalConfigurationSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.configuration') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedTerminalConfiguration = z.infer< + typeof DeletedTerminalConfigurationSchema + > + + /** + * 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 TerminalConnectionTokenSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.connection_token') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Your application should pass this token to the Stripe Terminal SDK. */ + secret: z + .string() + .max(5000) + .describe( + 'Your application should pass this token to the Stripe Terminal SDK.' + ) + }) + .describe( + 'A Connection Token is used by the Stripe Terminal SDK to connect to a reader.\n\nRelated guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)' + ) + export type TerminalConnectionToken = z.infer< + typeof TerminalConnectionTokenSchema + > + + export const DeletedTerminalLocationSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.location') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedTerminalLocation = z.infer< + typeof DeletedTerminalLocationSchema + > + + /** Represents a per-transaction tipping configuration */ + export const TerminalReaderReaderResourceTippingConfigSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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).' + ) + .optional() + }) + .describe('Represents a per-transaction tipping configuration') + export type TerminalReaderReaderResourceTippingConfig = z.infer< + typeof TerminalReaderReaderResourceTippingConfigSchema + > + + /** Represents a per-setup override of a reader configuration */ + export const TerminalReaderReaderResourceProcessSetupConfigSchema = z + .object({ + /** Enable customer initiated cancellation when processing this SetupIntent. */ + enable_customer_cancellation: z + .boolean() + .describe( + 'Enable customer initiated cancellation when processing this SetupIntent.' + ) + .optional() + }) + .describe('Represents a per-setup override of a reader configuration') + export type TerminalReaderReaderResourceProcessSetupConfig = z.infer< + typeof TerminalReaderReaderResourceProcessSetupConfigSchema + > + + /** Represents a per-transaction override of a reader configuration */ + export const TerminalReaderReaderResourceRefundPaymentConfigSchema = z + .object({ + /** Enable customer initiated cancellation when refunding this payment. */ + enable_customer_cancellation: z + .boolean() + .describe( + 'Enable customer initiated cancellation when refunding this payment.' + ) + .optional() + }) + .describe('Represents a per-transaction override of a reader configuration') + export type TerminalReaderReaderResourceRefundPaymentConfig = z.infer< + typeof TerminalReaderReaderResourceRefundPaymentConfigSchema + > + + /** Represents a line item to be displayed on the reader */ + export const TerminalReaderReaderResourceLineItemSchema = z + .object({ + /** The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: z + .number() + .int() + .describe( + 'The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** Description of the line item. */ + description: z + .string() + .max(5000) + .describe('Description of the line item.'), + /** The quantity of the line item. */ + quantity: z.number().int().describe('The quantity of the line item.') + }) + .describe('Represents a line item to be displayed on the reader') + export type TerminalReaderReaderResourceLineItem = z.infer< + typeof TerminalReaderReaderResourceLineItemSchema + > + + export const DeletedTerminalReaderSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.reader') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedTerminalReader = z.infer< + typeof DeletedTerminalReaderSchema + > + + export const DeletedTestHelpersTestClockSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('test_helpers.test_clock') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedTestHelpersTestClock = z.infer< + typeof DeletedTestHelpersTestClockSchema + > + + export const TreasuryInboundTransfersResourceFailureDetailsSchema = z.object({ + /** Reason for the failure. */ + code: z + .enum([ + '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' + ]) + .describe('Reason for the failure.') + }) + export type TreasuryInboundTransfersResourceFailureDetails = z.infer< + typeof TreasuryInboundTransfersResourceFailureDetailsSchema + > + + export const TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.' + ) + .optional() + }) + export type TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows = + z.infer< + typeof TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsSchema + > + + export const TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsSchema = + z.object({ + /** Timestamp describing when an InboundTransfer changed status to `canceled`. */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an InboundTransfer changed status to `canceled`.' + ) + .optional(), + /** Timestamp describing when an InboundTransfer changed status to `failed`. */ + failed_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an InboundTransfer changed status to `failed`.' + ) + .optional(), + /** Timestamp describing when an InboundTransfer changed status to `succeeded`. */ + succeeded_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an InboundTransfer changed status to `succeeded`.' + ) + .optional() + }) + export type TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions = + z.infer< + typeof TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsSchema + > + + /** Change to a FinancialAccount's balance */ + export const TreasuryTransactionsResourceBalanceImpactSchema = z + .object({ + /** The change made to funds the user can spend right now. */ + cash: z + .number() + .int() + .describe('The change made to funds the user can spend right now.'), + /** The change made to funds that are not spendable yet, but will become available at a later time. */ + inbound_pending: z + .number() + .int() + .describe( + 'The change made to funds that are not spendable yet, but will become available at a later time.' + ), + /** The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: z + .number() + .int() + .describe( + 'The change made to funds in the account, but not spendable because they are being held for pending outbound flows.' + ) + }) + .describe("Change to a FinancialAccount's balance") + export type TreasuryTransactionsResourceBalanceImpact = z.infer< + typeof TreasuryTransactionsResourceBalanceImpactSchema + > + + export const TreasuryReceivedCreditsResourceStatusTransitionsSchema = + z.object({ + /** Timestamp describing when the CreditReversal changed status to `posted` */ + posted_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when the CreditReversal changed status to `posted`' + ) + .optional() + }) + export type TreasuryReceivedCreditsResourceStatusTransitions = z.infer< + typeof TreasuryReceivedCreditsResourceStatusTransitionsSchema + > + + export const TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsSchema = + z.object({ + /** Set if there is an Issuing dispute associated with the DebitReversal. */ + issuing_dispute: z + .string() + .max(5000) + .nullable() + .describe( + 'Set if there is an Issuing dispute associated with the DebitReversal.' + ) + .optional() + }) + export type TreasuryReceivedDebitsResourceDebitReversalLinkedFlows = z.infer< + typeof TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsSchema + > + + export const TreasuryReceivedDebitsResourceStatusTransitionsSchema = z.object( + { + /** Timestamp describing when the DebitReversal changed status to `completed`. */ + completed_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when the DebitReversal changed status to `completed`.' + ) + .optional() + } + ) + export type TreasuryReceivedDebitsResourceStatusTransitions = z.infer< + typeof TreasuryReceivedDebitsResourceStatusTransitionsSchema + > + + export const OutboundPaymentsPaymentMethodDetailsFinancialAccountSchema = + z.object({ + /** Token of the FinancialAccount. */ + id: z.string().max(5000).describe('Token of the FinancialAccount.'), + /** The rails used to send funds. */ + network: z.literal('stripe').describe('The rails used to send funds.') + }) + export type OutboundPaymentsPaymentMethodDetailsFinancialAccount = z.infer< + typeof OutboundPaymentsPaymentMethodDetailsFinancialAccountSchema + > + + export const TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + present: z + .boolean() + .describe( + '`true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.' + ) + }) + export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails = + z.infer< + typeof TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsSchema + > + + export const TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsSchema = + z.object({ + /** Timestamp describing when an OutboundPayment changed status to `canceled`. */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundPayment changed status to `canceled`.' + ) + .optional(), + /** Timestamp describing when an OutboundPayment changed status to `failed`. */ + failed_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundPayment changed status to `failed`.' + ) + .optional(), + /** Timestamp describing when an OutboundPayment changed status to `posted`. */ + posted_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundPayment changed status to `posted`.' + ) + .optional(), + /** Timestamp describing when an OutboundPayment changed status to `returned`. */ + returned_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundPayment changed status to `returned`.' + ) + .optional() + }) + export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions = + z.infer< + typeof TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsSchema + > + + export const TreasuryOutboundPaymentsResourceAchTrackingDetailsSchema = + z.object({ + /** ACH trace ID of the OutboundPayment for payments sent over the `ach` network. */ + trace_id: z + .string() + .max(5000) + .describe( + 'ACH trace ID of the OutboundPayment for payments sent over the `ach` network.' + ) + }) + export type TreasuryOutboundPaymentsResourceAchTrackingDetails = z.infer< + typeof TreasuryOutboundPaymentsResourceAchTrackingDetailsSchema + > + + export const TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsSchema = + z.object({ + /** CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. */ + chips: z + .string() + .max(5000) + .nullable() + .describe( + 'CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network.' + ) + .optional(), + /** IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. */ + imad: z + .string() + .max(5000) + .nullable() + .describe( + 'IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.' + ) + .optional(), + /** OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. */ + omad: z + .string() + .max(5000) + .nullable() + .describe( + 'OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.' + ) + .optional() + }) + export type TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetails = + z.infer< + typeof TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsSchema + > + + export const OutboundTransfersPaymentMethodDetailsFinancialAccountSchema = + z.object({ + /** Token of the FinancialAccount. */ + id: z.string().max(5000).describe('Token of the FinancialAccount.'), + /** The rails used to send funds. */ + network: z.literal('stripe').describe('The rails used to send funds.') + }) + export type OutboundTransfersPaymentMethodDetailsFinancialAccount = z.infer< + typeof OutboundTransfersPaymentMethodDetailsFinancialAccountSchema + > + + export const TreasuryOutboundTransfersResourceStatusTransitionsSchema = + z.object({ + /** Timestamp describing when an OutboundTransfer changed status to `canceled` */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundTransfer changed status to `canceled`' + ) + .optional(), + /** Timestamp describing when an OutboundTransfer changed status to `failed` */ + failed_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundTransfer changed status to `failed`' + ) + .optional(), + /** Timestamp describing when an OutboundTransfer changed status to `posted` */ + posted_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundTransfer changed status to `posted`' + ) + .optional(), + /** Timestamp describing when an OutboundTransfer changed status to `returned` */ + returned_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when an OutboundTransfer changed status to `returned`' + ) + .optional() + }) + export type TreasuryOutboundTransfersResourceStatusTransitions = z.infer< + typeof TreasuryOutboundTransfersResourceStatusTransitionsSchema + > + + export const TreasuryOutboundTransfersResourceAchTrackingDetailsSchema = + z.object({ + /** ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. */ + trace_id: z + .string() + .max(5000) + .describe( + 'ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network.' + ) + }) + export type TreasuryOutboundTransfersResourceAchTrackingDetails = z.infer< + typeof TreasuryOutboundTransfersResourceAchTrackingDetailsSchema + > + + export const TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsSchema = + z.object({ + /** CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. */ + chips: z + .string() + .max(5000) + .nullable() + .describe( + 'CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.' + ) + .optional(), + /** IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. */ + imad: z + .string() + .max(5000) + .nullable() + .describe( + 'IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.' + ) + .optional(), + /** OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. */ + omad: z + .string() + .max(5000) + .nullable() + .describe( + 'OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.' + ) + .optional() + }) + export type TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetails = + z.infer< + typeof TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsSchema + > + + export const ReceivedPaymentMethodDetailsFinancialAccountSchema = z.object({ + /** The FinancialAccount ID. */ + id: z.string().max(5000).describe('The FinancialAccount ID.'), + /** The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. */ + network: z + .literal('stripe') + .describe( + 'The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.' + ) + }) + export type ReceivedPaymentMethodDetailsFinancialAccount = z.infer< + typeof ReceivedPaymentMethodDetailsFinancialAccountSchema + > + + export const TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountSchema = + z.object({ + /** Bank name. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Bank name.') + .optional(), + /** The last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the bank account number.') + .optional(), + /** The routing number for the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('The routing number for the bank account.') + .optional() + }) + export type TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccount = + z.infer< + typeof TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountSchema + > + + export const TreasuryReceivedCreditsResourceReversalDetailsSchema = z.object({ + /** Time before which a ReceivedCredit can be reversed. */ + deadline: z + .number() + .int() + .nullable() + .describe('Time before which a ReceivedCredit can be reversed.') + .optional(), + /** Set if a ReceivedCredit cannot be reversed. */ + restricted_reason: z + .enum([ + 'already_reversed', + 'deadline_passed', + 'network_restricted', + 'other', + 'source_flow_restricted' + ]) + .nullable() + .describe('Set if a ReceivedCredit cannot be reversed.') + .optional() + }) + export type TreasuryReceivedCreditsResourceReversalDetails = z.infer< + typeof TreasuryReceivedCreditsResourceReversalDetailsSchema + > + + export const TreasuryReceivedDebitsResourceLinkedFlowsSchema = z.object({ + /** The DebitReversal created as a result of this ReceivedDebit being reversed. */ + debit_reversal: z + .string() + .max(5000) + .nullable() + .describe( + 'The DebitReversal created as a result of this ReceivedDebit being reversed.' + ) + .optional(), + /** Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + inbound_transfer: z + .string() + .max(5000) + .nullable() + .describe( + "Set if the ReceivedDebit is associated with an InboundTransfer's return of funds." + ) + .optional(), + /** Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization: z + .string() + .max(5000) + .nullable() + .describe( + 'Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.' + ) + .optional(), + /** Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + issuing_transaction: z + .string() + .max(5000) + .nullable() + .describe( + 'Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.' + ) + .optional(), + /** Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. */ + payout: z + .string() + .max(5000) + .nullable() + .describe( + 'Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object.' + ) + .optional() + }) + export type TreasuryReceivedDebitsResourceLinkedFlows = z.infer< + typeof TreasuryReceivedDebitsResourceLinkedFlowsSchema + > + + export const TreasuryReceivedDebitsResourceReversalDetailsSchema = z.object({ + /** Time before which a ReceivedDebit can be reversed. */ + deadline: z + .number() + .int() + .nullable() + .describe('Time before which a ReceivedDebit can be reversed.') + .optional(), + /** Set if a ReceivedDebit can't be reversed. */ + restricted_reason: z + .enum([ + 'already_reversed', + 'deadline_passed', + 'network_restricted', + 'other', + 'source_flow_restricted' + ]) + .nullable() + .describe("Set if a ReceivedDebit can't be reversed.") + .optional() + }) + export type TreasuryReceivedDebitsResourceReversalDetails = z.infer< + typeof TreasuryReceivedDebitsResourceReversalDetailsSchema + > + + export const TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsSchema = + z.object({ + /** Timestamp describing when the Transaction changed status to `posted`. */ + posted_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when the Transaction changed status to `posted`.' + ) + .optional(), + /** Timestamp describing when the Transaction changed status to `void`. */ + void_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp describing when the Transaction changed status to `void`.' + ) + .optional() + }) + export type TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions = + z.infer< + typeof TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsSchema + > + + /** Balance information for the FinancialAccount */ + export const TreasuryFinancialAccountsResourceBalanceSchema = z + .object({ + /** Funds the user can spend right now. */ + cash: z + .record(z.number().int()) + .describe('Funds the user can spend right now.'), + /** Funds not spendable yet, but will become available at a later time. */ + inbound_pending: z + .record(z.number().int()) + .describe( + 'Funds not spendable yet, but will become available at a later time.' + ), + /** Funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: z + .record(z.number().int()) + .describe( + 'Funds in the account, but not spendable because they are being held for pending outbound flows.' + ) + }) + .describe('Balance information for the FinancialAccount') + export type TreasuryFinancialAccountsResourceBalance = z.infer< + typeof TreasuryFinancialAccountsResourceBalanceSchema + > + + /** Additional details on the FinancialAccount Features information. */ + export const TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsSchema = + z + .object({ + /** Represents the reason why the status is `pending` or `restricted`. */ + 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' + ]) + .describe( + 'Represents the reason why the status is `pending` or `restricted`.' + ), + /** Represents what the user should do, if anything, to activate the Feature. */ + resolution: z + .enum(['contact_stripe', 'provide_information', 'remove_restriction']) + .nullable() + .describe( + 'Represents what the user should do, if anything, to activate the Feature.' + ) + .optional(), + /** The `platform_restrictions` that are restricting this Feature. */ + restriction: z + .enum(['inbound_flows', 'outbound_flows']) + .describe( + 'The `platform_restrictions` that are restricting this Feature.' + ) + .optional() + }) + .describe( + 'Additional details on the FinancialAccount Features information.' + ) + export type TreasuryFinancialAccountsResourceTogglesSettingStatusDetails = + z.infer< + typeof TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsSchema + > + + /** ABA Records contain U.S. bank account details per the ABA format. */ + export const TreasuryFinancialAccountsResourceAbaRecordSchema = z + .object({ + /** The name of the person or business that owns the bank account. */ + account_holder_name: z + .string() + .max(5000) + .describe( + 'The name of the person or business that owns the bank account.' + ), + /** The account number. */ + account_number: z + .string() + .max(5000) + .nullable() + .describe('The account number.') + .optional(), + /** The last four characters of the account number. */ + account_number_last4: z + .string() + .max(5000) + .describe('The last four characters of the account number.'), + /** Name of the bank. */ + bank_name: z.string().max(5000).describe('Name of the bank.'), + /** Routing number for the account. */ + routing_number: z + .string() + .max(5000) + .describe('Routing number for the account.') + }) + .describe( + 'ABA Records contain U.S. bank account details per the ABA format.' + ) + export type TreasuryFinancialAccountsResourceAbaRecord = z.infer< + typeof TreasuryFinancialAccountsResourceAbaRecordSchema + > + + /** Restrictions that a Connect Platform has placed on this FinancialAccount. */ + export const TreasuryFinancialAccountsResourcePlatformRestrictionsSchema = z + .object({ + /** Restricts all inbound money movement. */ + inbound_flows: z + .enum(['restricted', 'unrestricted']) + .nullable() + .describe('Restricts all inbound money movement.') + .optional(), + /** Restricts all outbound money movement. */ + outbound_flows: z + .enum(['restricted', 'unrestricted']) + .nullable() + .describe('Restricts all outbound money movement.') + .optional() + }) + .describe( + 'Restrictions that a Connect Platform has placed on this FinancialAccount.' + ) + export type TreasuryFinancialAccountsResourcePlatformRestrictions = z.infer< + typeof TreasuryFinancialAccountsResourcePlatformRestrictionsSchema + > + + export const TreasuryFinancialAccountsResourceClosedStatusDetailsSchema = + z.object({ + /** The array that contains reasons for a FinancialAccount closure. */ + reasons: z + .array(z.enum(['account_rejected', 'closed_by_platform', 'other'])) + .describe( + 'The array that contains reasons for a FinancialAccount closure.' + ) + }) + export type TreasuryFinancialAccountsResourceClosedStatusDetails = z.infer< + typeof TreasuryFinancialAccountsResourceClosedStatusDetailsSchema + > + + /** + * 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 WebhookEndpointSchema = z + .object({ + /** The API version events are rendered as for this webhook endpoint. */ + api_version: z + .string() + .max(5000) + .nullable() + .describe( + 'The API version events are rendered as for this webhook endpoint.' + ) + .optional(), + /** The ID of the associated Connect application. */ + application: z + .string() + .max(5000) + .nullable() + .describe('The ID of the associated Connect application.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** An optional description of what the webhook is used for. */ + description: z + .string() + .max(5000) + .nullable() + .describe('An optional description of what the webhook is used for.') + .optional(), + /** The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ + enabled_events: z + .array(z.string().max(5000)) + .describe( + "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection." + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('webhook_endpoint') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. */ + secret: z + .string() + .max(5000) + .describe( + "The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation." + ) + .optional(), + /** The status of the webhook. It can be `enabled` or `disabled`. */ + status: z + .string() + .max(5000) + .describe( + 'The status of the webhook. It can be `enabled` or `disabled`.' + ), + /** The URL of the webhook endpoint. */ + url: z.string().max(5000).describe('The URL of the webhook endpoint.') + }) + .describe( + 'You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure)' + ) + export type WebhookEndpoint = z.infer + + export const DeletedWebhookEndpointSchema = z.object({ + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('webhook_endpoint') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type DeletedWebhookEndpoint = z.infer< + typeof DeletedWebhookEndpointSchema + > + + /** + * 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 FileSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The file expires and isn't available at this time in epoch seconds. */ + expires_at: z + .number() + .int() + .nullable() + .describe( + "The file expires and isn't available at this time in epoch seconds." + ) + .optional(), + /** The suitable name for saving the file to a filesystem. */ + filename: z + .string() + .max(5000) + .nullable() + .describe('The suitable name for saving the file to a filesystem.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. */ + links: z + .object({ + /** Details about each object. */ + data: z.array(FileLinkSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/file_links')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .nullable() + .describe( + 'A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('file') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. */ + 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', + 'selfie', + 'sigma_scheduled_query', + 'tax_document_user_upload', + 'terminal_reader_splashscreen' + ]) + .describe( + 'The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.' + ), + /** The size of the file object in bytes. */ + size: z.number().int().describe('The size of the file object in bytes.'), + /** A suitable title for the document. */ + title: z + .string() + .max(5000) + .nullable() + .describe('A suitable title for the document.') + .optional(), + /** The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). */ + type: z + .string() + .max(5000) + .nullable() + .describe( + 'The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).' + ) + .optional(), + /** Use your live secret API key to download the file from this URL. */ + url: z + .string() + .max(5000) + .nullable() + .describe( + 'Use your live secret API key to download the file from this URL.' + ) + .optional() + }) + .describe( + "This object represents files hosted on Stripe's servers. You can upload\nfiles with the [create file](https://stripe.com/docs/api#create_file) request\n(for example, when uploading dispute evidence). Stripe also\ncreates files independently (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File upload guide](https://stripe.com/docs/file-upload)" + ) + export type File = z.infer + + /** + * 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 const FileLinkSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Returns if the link is already expired. */ + expired: z.boolean().describe('Returns if the link is already expired.'), + /** Time that the link expires. */ + expires_at: z + .number() + .int() + .nullable() + .describe('Time that the link expires.') + .optional(), + /** The file object this link points to. */ + file: z + .union([z.string().max(5000), FileSchema]) + .describe('The file object this link points to.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('file_link') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The publicly accessible URL to download the file. */ + url: z + .string() + .max(5000) + .nullable() + .describe('The publicly accessible URL to download the file.') + .optional() + }) + .describe( + 'To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that you can use to\nretrieve the contents of the file without authentication.' + ) + export type FileLink = z.infer + + /** 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 const CashBalanceSchema = z + .object({ + /** 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: z + .record(z.number().int()) + .nullable() + .describe( + '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).' + ) + .optional(), + /** The ID of the customer whose cash balance this object represents. */ + customer: z + .string() + .max(5000) + .describe( + 'The ID of the customer whose cash balance this object represents.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('cash_balance') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + settings: CustomerBalanceCustomerBalanceSettingsSchema + }) + .describe( + "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 CashBalance = z.infer + + export const SourceOwnerSchema = z.object({ + /** Owner's address. */ + address: AddressSchema.nullable().describe("Owner's address.").optional(), + /** Owner's email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe("Owner's email address.") + .optional(), + /** Owner's full name. */ + name: z + .string() + .max(5000) + .nullable() + .describe("Owner's full name.") + .optional(), + /** Owner's phone number (including extension). */ + phone: z + .string() + .max(5000) + .nullable() + .describe("Owner's phone number (including extension).") + .optional(), + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type SourceOwner = z.infer + + export const ShippingSchema = z.object({ + address: AddressSchema.optional(), + /** The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ + carrier: z + .string() + .max(5000) + .nullable() + .describe( + 'The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.' + ) + .optional(), + /** Recipient name. */ + name: z.string().max(5000).describe('Recipient name.').optional(), + /** Recipient phone (including extension). */ + phone: z + .string() + .max(5000) + .nullable() + .describe('Recipient phone (including extension).') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type Shipping = z.infer + + export const PromotionCodesResourceRestrictionsSchema = z.object({ + /** 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: z + .record(PromotionCodeCurrencyOptionSchema) + .describe( + '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).' + ) + .optional(), + /** A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ + first_time_transaction: z + .boolean() + .describe( + 'A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices' + ), + /** Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: z + .number() + .int() + .nullable() + .describe( + 'Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).' + ) + .optional(), + /** Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount */ + minimum_amount_currency: z + .string() + .max(5000) + .nullable() + .describe( + 'Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount' + ) + .optional() + }) + export type PromotionCodesResourceRestrictions = z.infer< + typeof PromotionCodesResourceRestrictionsSchema + > + + export const BillingDetailsSchema = z.object({ + /** Billing address. */ + address: AddressSchema.nullable().describe('Billing address.').optional(), + /** Email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe('Email address.') + .optional(), + /** Full name. */ + name: z.string().max(5000).nullable().describe('Full name.').optional(), + /** Billing phone number (including extension). */ + phone: z + .string() + .max(5000) + .nullable() + .describe('Billing phone number (including extension).') + .optional() + }) + export type BillingDetails = z.infer + + export const PaymentFlowsAmountDetailsSchema = z.object({ + tip: PaymentFlowsAmountDetailsClientResourceTipSchema.optional() + }) + export type PaymentFlowsAmountDetails = z.infer< + typeof PaymentFlowsAmountDetailsSchema + > + + export const PaymentFlowsAmountDetailsClientSchema = z.object({ + tip: PaymentFlowsAmountDetailsClientResourceTipSchema.optional() + }) + export type PaymentFlowsAmountDetailsClient = z.infer< + typeof PaymentFlowsAmountDetailsClientSchema + > + + export const RefundNextActionDisplayDetailsSchema = z.object({ + email_sent: EmailSentSchema, + /** The expiry timestamp. */ + expires_at: z.number().int().describe('The expiry timestamp.') + }) + export type RefundNextActionDisplayDetails = z.infer< + typeof RefundNextActionDisplayDetailsSchema + > + + export const DisputeVisaCompellingEvidence3DisputedTransactionSchema = + z.object({ + /** User Account ID used to log into business platform. Must be recognizable by the user. */ + customer_account_id: z + .string() + .max(5000) + .nullable() + .describe( + 'User Account ID used to log into business platform. Must be recognizable by the user.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The email address of the customer. */ + customer_email_address: z + .string() + .max(5000) + .nullable() + .describe('The email address of the customer.') + .optional(), + /** The IP address that the customer used when making the purchase. */ + customer_purchase_ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address that the customer used when making the purchase.' + ) + .optional(), + /** Categorization of disputed payment. */ + merchandise_or_services: z + .enum(['merchandise', 'services']) + .nullable() + .describe('Categorization of disputed payment.') + .optional(), + /** A description of the product or service that was sold. */ + product_description: z + .string() + .max(150_000) + .nullable() + .describe('A description of the product or service that was sold.') + .optional(), + /** The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. */ + shipping_address: DisputeTransactionShippingAddressSchema.nullable() + .describe( + 'The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.' + ) + .optional() + }) + export type DisputeVisaCompellingEvidence3DisputedTransaction = z.infer< + typeof DisputeVisaCompellingEvidence3DisputedTransactionSchema + > + + export const DisputeVisaCompellingEvidence3PriorUndisputedTransactionSchema = + z.object({ + /** Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. */ + charge: z + .string() + .max(5000) + .describe( + 'Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.' + ), + /** User Account ID used to log into business platform. Must be recognizable by the user. */ + customer_account_id: z + .string() + .max(5000) + .nullable() + .describe( + 'User Account ID used to log into business platform. Must be recognizable by the user.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The email address of the customer. */ + customer_email_address: z + .string() + .max(5000) + .nullable() + .describe('The email address of the customer.') + .optional(), + /** The IP address that the customer used when making the purchase. */ + customer_purchase_ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address that the customer used when making the purchase.' + ) + .optional(), + /** A description of the product or service that was sold. */ + product_description: z + .string() + .max(150_000) + .nullable() + .describe('A description of the product or service that was sold.') + .optional(), + /** The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. */ + shipping_address: DisputeTransactionShippingAddressSchema.nullable() + .describe( + 'The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.' + ) + .optional() + }) + export type DisputeVisaCompellingEvidence3PriorUndisputedTransaction = + z.infer< + typeof DisputeVisaCompellingEvidence3PriorUndisputedTransactionSchema + > + + export const IssuingCardholderAddressSchema = z.object({ + address: AddressSchema + }) + export type IssuingCardholderAddress = z.infer< + typeof IssuingCardholderAddressSchema + > + + export const IssuingCardholderCardIssuingSchema = z.object({ + /** 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: IssuingCardholderUserTermsAcceptanceSchema.nullable() + .describe( + '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.' + ) + .optional() + }) + export type IssuingCardholderCardIssuing = z.infer< + typeof IssuingCardholderCardIssuingSchema + > + + export const IssuingCardholderAuthorizationControlsSchema = z.object({ + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Limit spending with amount-based rules that apply across this cardholder's cards. */ + spending_limits: z + .array(IssuingCardholderSpendingLimitSchema) + .nullable() + .describe( + "Limit spending with amount-based rules that apply across this cardholder's cards." + ) + .optional(), + /** Currency of the amounts within `spending_limits`. */ + spending_limits_currency: z + .string() + .nullable() + .describe('Currency of the amounts within `spending_limits`.') + .optional() + }) + export type IssuingCardholderAuthorizationControls = z.infer< + typeof IssuingCardholderAuthorizationControlsSchema + > + + /** 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 const IssuingPhysicalBundleSchema = z + .object({ + features: IssuingPhysicalBundleFeaturesSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** Friendly display name. */ + name: z.string().max(5000).describe('Friendly display name.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.physical_bundle') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Whether this physical bundle can be used to create cards. */ + status: z + .enum(['active', 'inactive', 'review']) + .describe('Whether this physical bundle can be used to create cards.'), + /** Whether this physical bundle is a standard Stripe offering or custom-made for you. */ + type: z + .enum(['custom', 'standard']) + .describe( + 'Whether this physical bundle is a standard Stripe offering or custom-made for you.' + ) + }) + .describe( + '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 IssuingPhysicalBundle = z.infer< + typeof IssuingPhysicalBundleSchema + > + + export const IssuingCardShippingAddressValidationSchema = z.object({ + /** The address validation capabilities to use. */ + mode: z + .enum(['disabled', 'normalization_only', 'validation_and_normalization']) + .describe('The address validation capabilities to use.'), + /** The normalized shipping address. */ + normalized_address: AddressSchema.nullable() + .describe('The normalized shipping address.') + .optional(), + /** The validation result for the shipping address. */ + result: z + .enum(['indeterminate', 'likely_deliverable', 'likely_undeliverable']) + .nullable() + .describe('The validation result for the shipping address.') + .optional() + }) + export type IssuingCardShippingAddressValidation = z.infer< + typeof IssuingCardShippingAddressValidationSchema + > + + export const IssuingCardAuthorizationControlsSchema = z.object({ + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .array( + z.enum([ + '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' + ]) + ) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .array(IssuingCardSpendingLimitSchema) + .nullable() + .describe( + "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)." + ) + .optional(), + /** Currency of the amounts within `spending_limits`. Always the same as the currency of the card. */ + spending_limits_currency: z + .string() + .nullable() + .describe( + 'Currency of the amounts within `spending_limits`. Always the same as the currency of the card.' + ) + .optional() + }) + export type IssuingCardAuthorizationControls = z.infer< + typeof IssuingCardAuthorizationControlsSchema + > + + export const IssuingAuthorizationPendingRequestSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + "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)." + ), + /** 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: IssuingAuthorizationAmountDetailsSchema.nullable() + .describe( + 'Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + .optional(), + /** 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: z + .string() + .describe( + '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).' + ), + /** 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: z + .boolean() + .describe( + '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.' + ), + /** 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: z + .number() + .int() + .describe( + '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).' + ), + /** The local currency the merchant is requesting to authorize. */ + merchant_currency: z + .string() + .describe('The local currency the merchant is requesting to authorize.'), + /** The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. */ + network_risk_score: z + .number() + .int() + .nullable() + .describe( + "The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99." + ) + .optional() + }) + export type IssuingAuthorizationPendingRequest = z.infer< + typeof IssuingAuthorizationPendingRequestSchema + > + + export const IssuingAuthorizationRequestSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + "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." + ), + /** 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: IssuingAuthorizationAmountDetailsSchema.nullable() + .describe( + 'Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + .optional(), + /** Whether this request was approved. */ + approved: z.boolean().describe('Whether this request was approved.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** 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: z + .number() + .int() + .describe( + '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).' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. */ + network_risk_score: z + .number() + .int() + .nullable() + .describe( + "The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99." + ) + .optional(), + /** When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. */ + reason: z + .enum([ + 'account_disabled', + 'card_active', + 'card_canceled', + 'card_expired', + 'card_inactive', + 'cardholder_blocked', + 'cardholder_inactive', + 'cardholder_verification_required', + 'insecure_authorization_method', + 'insufficient_funds', + 'not_allowed', + 'pin_blocked', + 'spending_controls', + 'suspected_fraud', + 'verification_failed', + 'webhook_approved', + 'webhook_declined', + 'webhook_error', + 'webhook_timeout' + ]) + .describe( + 'When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. */ + requested_at: z + .number() + .int() + .nullable() + .describe( + 'Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time.' + ) + .optional() + }) + export type IssuingAuthorizationRequest = z.infer< + typeof IssuingAuthorizationRequestSchema + > + + export const IssuingNetworkTokenWalletProviderSchema = z.object({ + /** The wallet provider-given account ID of the digital wallet the token belongs to. */ + account_id: z + .string() + .max(5000) + .describe( + 'The wallet provider-given account ID of the digital wallet the token belongs to.' + ) + .optional(), + /** An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. */ + account_trust_score: z + .number() + .int() + .describe( + 'An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy.' + ) + .optional(), + /** The method used for tokenizing a card. */ + card_number_source: z + .enum(['app', 'manual', 'on_file', 'other']) + .describe('The method used for tokenizing a card.') + .optional(), + cardholder_address: IssuingNetworkTokenAddressSchema.optional(), + /** The name of the cardholder tokenizing the card. */ + cardholder_name: z + .string() + .max(5000) + .describe('The name of the cardholder tokenizing the card.') + .optional(), + /** An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. */ + device_trust_score: z + .number() + .int() + .describe( + 'An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy.' + ) + .optional(), + /** The hashed email address of the cardholder's account with the wallet provider. */ + hashed_account_email_address: z + .string() + .max(5000) + .describe( + "The hashed email address of the cardholder's account with the wallet provider." + ) + .optional(), + /** The reasons for suggested tokenization given by the card network. */ + reason_codes: z + .array( + z.enum([ + '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' + ]) + ) + .describe( + 'The reasons for suggested tokenization given by the card network.' + ) + .optional(), + /** The recommendation on responding to the tokenization request. */ + suggested_decision: z + .enum(['approve', 'decline', 'require_auth']) + .describe('The recommendation on responding to the tokenization request.') + .optional(), + /** The version of the standard for mapping reason codes followed by the wallet provider. */ + suggested_decision_version: z + .string() + .max(5000) + .describe( + 'The version of the standard for mapping reason codes followed by the wallet provider.' + ) + .optional() + }) + export type IssuingNetworkTokenWalletProvider = z.infer< + typeof IssuingNetworkTokenWalletProviderSchema + > + + export const IssuingTransactionFlightDataSchema = z.object({ + /** The time that the flight departed. */ + departure_at: z + .number() + .int() + .nullable() + .describe('The time that the flight departed.') + .optional(), + /** The name of the passenger. */ + passenger_name: z + .string() + .max(5000) + .nullable() + .describe('The name of the passenger.') + .optional(), + /** Whether the ticket is refundable. */ + refundable: z + .boolean() + .nullable() + .describe('Whether the ticket is refundable.') + .optional(), + /** The legs of the trip. */ + segments: z + .array(IssuingTransactionFlightDataLegSchema) + .nullable() + .describe('The legs of the trip.') + .optional(), + /** The travel agency that issued the ticket. */ + travel_agency: z + .string() + .max(5000) + .nullable() + .describe('The travel agency that issued the ticket.') + .optional() + }) + export type IssuingTransactionFlightData = z.infer< + typeof IssuingTransactionFlightDataSchema + > + + export const ChargeOutcomeSchema = z.object({ + /** 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: z + .enum(['confirm_card_data', 'do_not_try_again', 'try_again_later']) + .nullable() + .describe( + 'An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. */ + network_decline_code: z + .string() + .max(5000) + .nullable() + .describe( + 'For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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 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: z + .string() + .max(5000) + .nullable() + .describe( + "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 authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ) + .optional(), + /** The ID of the Radar rule that matched the payment, if applicable. */ + rule: z + .union([z.string().max(5000), RuleSchema]) + .describe( + 'The ID of the Radar rule that matched the payment, if applicable.' + ) + .optional(), + /** A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ + seller_message: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + }) + export type ChargeOutcome = z.infer + + export const AmazonPayUnderlyingPaymentMethodFundingDetailsSchema = z.object({ + card: PaymentMethodDetailsPassthroughCardSchema.optional(), + /** funding type of the underlying payment method. */ + type: z + .literal('card') + .nullable() + .describe('funding type of the underlying payment method.') + .optional() + }) + export type AmazonPayUnderlyingPaymentMethodFundingDetails = z.infer< + typeof AmazonPayUnderlyingPaymentMethodFundingDetailsSchema + > + + export const PaymentMethodDetailsCardInstallmentsSchema = z.object({ + /** Installment plan selected for the payment. */ + plan: PaymentMethodDetailsCardInstallmentsPlanSchema.nullable() + .describe('Installment plan selected for the payment.') + .optional() + }) + export type PaymentMethodDetailsCardInstallments = z.infer< + typeof PaymentMethodDetailsCardInstallmentsSchema + > + + export const PaymentMethodDetailsCardWalletMasterpassSchema = z.object({ + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type PaymentMethodDetailsCardWalletMasterpass = z.infer< + typeof PaymentMethodDetailsCardWalletMasterpassSchema + > + + export const PaymentMethodDetailsCardWalletVisaCheckoutSchema = z.object({ + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type PaymentMethodDetailsCardWalletVisaCheckout = z.infer< + typeof PaymentMethodDetailsCardWalletVisaCheckoutSchema + > + + export const PaymentMethodDetailsInteracPresentSchema = z.object({ + /** Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe('Card brand. Can be `interac`, `mastercard` or `visa`.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** A high-level description of the type of cards issued in this range. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'A high-level description of the type of cards issued in this range.' + ) + .optional(), + /** Authorization response cryptogram. */ + emv_auth_data: z + .string() + .max(5000) + .nullable() + .describe('Authorization response cryptogram.') + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The name of the card's issuing bank. */ + issuer: z + .string() + .max(5000) + .nullable() + .describe("The name of the card's issuing bank.") + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + preferred_locales: z + .array(z.string().max(5000)) + .nullable() + .describe( + 'EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.' + ) + .optional(), + /** How card details were read in this transaction. */ + read_method: z + .enum([ + 'contact_emv', + 'contactless_emv', + 'contactless_magstripe_mode', + 'magnetic_stripe_fallback', + 'magnetic_stripe_track2' + ]) + .nullable() + .describe('How card details were read in this transaction.') + .optional(), + /** A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt: PaymentMethodDetailsInteracPresentReceiptSchema.nullable() + .describe( + 'A collection of fields required to be displayed on receipts. Only required for EMV transactions.' + ) + .optional() + }) + export type PaymentMethodDetailsInteracPresent = z.infer< + typeof PaymentMethodDetailsInteracPresentSchema + > + + export const KlarnaPayerDetailsSchema = z.object({ + /** The payer's address */ + address: KlarnaAddressSchema.nullable() + .describe("The payer's address") + .optional() + }) + export type KlarnaPayerDetails = z.infer + + export const PaymentMethodDetailsKonbiniSchema = z.object({ + /** If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + store: PaymentMethodDetailsKonbiniStoreSchema.nullable() + .describe( + 'If the payment succeeded, this contains the details of the convenience store where the payment was completed.' + ) + .optional() + }) + export type PaymentMethodDetailsKonbini = z.infer< + typeof PaymentMethodDetailsKonbiniSchema + > + + export const PaymentMethodDetailsMobilepaySchema = z.object({ + /** Internal card details */ + card: InternalCardSchema.nullable() + .describe('Internal card details') + .optional() + }) + export type PaymentMethodDetailsMobilepay = z.infer< + typeof PaymentMethodDetailsMobilepaySchema + > + + export const PaymentMethodDetailsPaypalSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's email. Values are provided by PayPal directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional(), + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + payer_id: z + .string() + .max(5000) + .nullable() + .describe( + 'PayPal account PayerID. This identifier uniquely identifies the PayPal customer.' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's full name. Values provided by PayPal directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional(), + /** The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. */ + seller_protection: PaypalSellerProtectionSchema.nullable() + .describe( + 'The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.' + ) + .optional(), + /** A unique ID generated by PayPal for this transaction. */ + transaction_id: z + .string() + .max(5000) + .nullable() + .describe('A unique ID generated by PayPal for this transaction.') + .optional() + }) + export type PaymentMethodDetailsPaypal = z.infer< + typeof PaymentMethodDetailsPaypalSchema + > + + export const RevolutPayUnderlyingPaymentMethodFundingDetailsSchema = z.object( + { + card: PaymentMethodDetailsPassthroughCardSchema.optional(), + /** funding type of the underlying payment method. */ + type: z + .literal('card') + .nullable() + .describe('funding type of the underlying payment method.') + .optional() + } + ) + export type RevolutPayUnderlyingPaymentMethodFundingDetails = z.infer< + typeof RevolutPayUnderlyingPaymentMethodFundingDetailsSchema + > + + /** + * 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 TaxRateSchema = z + .object({ + /** 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: z + .boolean() + .describe( + '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.' + ), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + 'The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.' + ), + /** + * 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: z + .number() + .nullable() + .describe( + "Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,\nthis percentage reflects the rate actually used to calculate tax based on the product's taxability\nand whether the user is registered to collect taxes in the corresponding jurisdiction." + ) + .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. */ + flat_amount: TaxRateFlatAmountSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** This specifies if the tax rate is inclusive or exclusive. */ + inclusive: z + .boolean() + .describe('This specifies if the tax rate is inclusive or exclusive.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.' + ) + .optional(), + /** The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. */ + jurisdiction_level: z + .enum(['city', 'country', 'county', 'district', 'multiple', 'state']) + .nullable() + .describe( + 'The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.' + ) + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax_rate') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .number() + .describe( + '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.' + ), + /** Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. */ + rate_type: z + .enum(['flat_amount', 'percentage']) + .nullable() + .describe( + 'Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location.' + ) + .optional(), + /** [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: z + .string() + .max(5000) + .nullable() + .describe( + '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.' + ) + .optional(), + /** The high-level tax type, such as `vat` or `sales_tax`. */ + tax_type: z + .enum([ + 'amusement_tax', + 'communications_tax', + 'gst', + 'hst', + 'igst', + 'jct', + 'lease_tax', + 'pst', + 'qst', + 'retail_delivery_fee', + 'rst', + 'sales_tax', + 'service_tax', + 'vat' + ]) + .nullable() + .describe('The high-level tax type, such as `vat` or `sales_tax`.') + .optional() + }) + .describe( + '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.\n\nRelated guide: [Tax rates](/billing/taxes/tax-rates)' + ) + export type TaxRate = z.infer + + export const InvoicePaymentMethodOptionsAcssDebitSchema = z.object({ + mandate_options: + InvoicePaymentMethodOptionsAcssDebitMandateOptionsSchema.optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type InvoicePaymentMethodOptionsAcssDebit = z.infer< + typeof InvoicePaymentMethodOptionsAcssDebitSchema + > + + export const SubscriptionPaymentMethodOptionsCardSchema = z.object({ + mandate_options: InvoiceMandateOptionsCardSchema.optional(), + /** 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: z + .enum([ + 'amex', + 'cartes_bancaires', + 'diners', + 'discover', + 'eftpos_au', + 'girocard', + 'interac', + 'jcb', + 'link', + 'mastercard', + 'unionpay', + 'unknown', + 'visa' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum(['any', 'automatic', 'challenge']) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type SubscriptionPaymentMethodOptionsCard = z.infer< + typeof SubscriptionPaymentMethodOptionsCardSchema + > + + export const InvoicePaymentMethodOptionsCustomerBalanceBankTransferSchema = + z.object({ + eu_bank_transfer: + InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferSchema.optional(), + /** 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: z + .string() + .nullable() + .describe( + '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`.' + ) + .optional() + }) + export type InvoicePaymentMethodOptionsCustomerBalanceBankTransfer = z.infer< + typeof InvoicePaymentMethodOptionsCustomerBalanceBankTransferSchema + > + + export const InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsSchema = + z.object({ + filters: + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersSchema.optional(), + /** The list of permissions to request. The `payment_method` permission must be included. */ + permissions: z + .array( + z.enum(['balances', 'ownership', 'payment_method', 'transactions']) + ) + .describe( + 'The list of permissions to request. The `payment_method` permission must be included.' + ) + .optional(), + /** Data features requested to be retrieved upon account creation. */ + prefetch: z + .array(z.enum(['balances', 'ownership', 'transactions'])) + .nullable() + .describe( + 'Data features requested to be retrieved upon account creation.' + ) + .optional() + }) + export type InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions = + z.infer< + typeof InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsSchema + > + + export const PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeSchema = + z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + /** The url for mobile redirect based auth */ + mobile_auth_url: z + .string() + .max(5000) + .describe('The url for mobile redirect based auth'), + qr_code: PaymentIntentNextActionCashappQrCodeSchema + }) + export type PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode = + z.infer< + typeof PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeSchema + > + + export const SetupIntentPaymentMethodOptionsAcssDebitSchema = z.object({ + /** Currency supported by the bank account */ + currency: z + .enum(['cad', 'usd']) + .nullable() + .describe('Currency supported by the bank account') + .optional(), + mandate_options: + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitSchema.optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type SetupIntentPaymentMethodOptionsAcssDebit = z.infer< + typeof SetupIntentPaymentMethodOptionsAcssDebitSchema + > + + export const SetupIntentPaymentMethodOptionsBacsDebitSchema = z.object({ + mandate_options: + SetupIntentPaymentMethodOptionsMandateOptionsBacsDebitSchema.optional() + }) + export type SetupIntentPaymentMethodOptionsBacsDebit = z.infer< + typeof SetupIntentPaymentMethodOptionsBacsDebitSchema + > + + export const SetupIntentPaymentMethodOptionsCardSchema = z.object({ + /** Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options: + SetupIntentPaymentMethodOptionsCardMandateOptionsSchema.nullable() + .describe( + 'Configuration options for setting up an eMandate for cards issued in India.' + ) + .optional(), + /** 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: z + .enum([ + 'amex', + 'cartes_bancaires', + 'diners', + 'discover', + 'eftpos_au', + 'girocard', + 'interac', + 'jcb', + 'link', + 'mastercard', + 'unionpay', + 'unknown', + 'visa' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum(['any', 'automatic', 'challenge']) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type SetupIntentPaymentMethodOptionsCard = z.infer< + typeof SetupIntentPaymentMethodOptionsCardSchema + > + + export const SetupIntentPaymentMethodOptionsSepaDebitSchema = z.object({ + mandate_options: + SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitSchema.optional() + }) + export type SetupIntentPaymentMethodOptionsSepaDebit = z.infer< + typeof SetupIntentPaymentMethodOptionsSepaDebitSchema + > + + export const LinkedAccountOptionsUsBankAccountSchema = z.object({ + filters: + PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersSchema.optional(), + /** The list of permissions to request. The `payment_method` permission must be included. */ + permissions: z + .array( + z.enum(['balances', 'ownership', 'payment_method', 'transactions']) + ) + .describe( + 'The list of permissions to request. The `payment_method` permission must be included.' + ) + .optional(), + /** Data features requested to be retrieved upon account creation. */ + prefetch: z + .array(z.enum(['balances', 'ownership', 'transactions'])) + .nullable() + .describe( + 'Data features requested to be retrieved upon account creation.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional() + }) + export type LinkedAccountOptionsUsBankAccount = z.infer< + typeof LinkedAccountOptionsUsBankAccountSchema + > + + export const BillingClocksResourceStatusDetailsStatusDetailsSchema = z.object( + { + advancing: + BillingClocksResourceStatusDetailsAdvancingStatusDetailsSchema.optional() + } + ) + export type BillingClocksResourceStatusDetailsStatusDetails = z.infer< + typeof BillingClocksResourceStatusDetailsStatusDetailsSchema + > + + /** Configures how this subscription behaves during the trial period. */ + export const SubscriptionsTrialsResourceTrialSettingsSchema = z + .object({ end_behavior: SubscriptionsTrialsResourceEndBehaviorSchema }) + .describe( + 'Configures how this subscription behaves during the trial period.' + ) + export type SubscriptionsTrialsResourceTrialSettings = z.infer< + typeof SubscriptionsTrialsResourceTrialSettingsSchema + > + + export const BillingCreditGrantsResourceAmountSchema = z.object({ + /** The monetary amount. */ + monetary: BillingCreditGrantsResourceMonetaryAmountSchema.nullable() + .describe('The monetary amount.') + .optional(), + /** The type of this amount. We currently only support `monetary` billing credits. */ + type: z + .literal('monetary') + .describe( + 'The type of this amount. We currently only support `monetary` billing credits.' + ) + }) + export type BillingCreditGrantsResourceAmount = z.infer< + typeof BillingCreditGrantsResourceAmountSchema + > + + export const BillingCreditGrantsResourceScopeSchema = z.object({ + /** 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. */ + price_type: z + .literal('metered') + .describe( + '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.' + ) + .optional(), + /** 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. */ + prices: z + .array(BillingCreditGrantsResourceApplicablePriceSchema) + .describe( + '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.' + ) + .optional() + }) + export type BillingCreditGrantsResourceScope = z.infer< + typeof BillingCreditGrantsResourceScopeSchema + > + + export const InvoicesResourceLineItemsProrationDetailsSchema = z.object({ + /** For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + credited_items: InvoicesResourceLineItemsCreditedItemsSchema.nullable() + .describe( + 'For a credit proration `line_item`, the original debit line_items to which the credit proration applies.' + ) + .optional() + }) + export type InvoicesResourceLineItemsProrationDetails = z.infer< + typeof InvoicesResourceLineItemsProrationDetailsSchema + > + + export const InvoicePaymentMethodOptionsCardSchema = z.object({ + installments: InvoiceInstallmentsCardSchema.optional(), + /** 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: z + .enum(['any', 'automatic', 'challenge']) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type InvoicePaymentMethodOptionsCard = z.infer< + typeof InvoicePaymentMethodOptionsCardSchema + > + + export const InvoicesResourceInvoiceRenderingSchema = z.object({ + /** How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display: z + .string() + .max(5000) + .nullable() + .describe( + 'How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.' + ) + .optional(), + /** Invoice pdf rendering options */ + pdf: InvoiceRenderingPdfSchema.nullable() + .describe('Invoice pdf rendering options') + .optional(), + /** ID of the rendering template that the invoice is formatted by. */ + template: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the rendering template that the invoice is formatted by.' + ) + .optional(), + /** Version of the rendering template that the invoice is using. */ + template_version: z + .number() + .int() + .nullable() + .describe('Version of the rendering template that the invoice is using.') + .optional() + }) + export type InvoicesResourceInvoiceRendering = z.infer< + typeof InvoicesResourceInvoiceRenderingSchema + > + + export const ShippingRateDeliveryEstimateSchema = z.object({ + /** The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ + maximum: ShippingRateDeliveryEstimateBoundSchema.nullable() + .describe( + 'The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.' + ) + .optional(), + /** The lower bound of the estimated range. If empty, represents no lower bound. */ + minimum: ShippingRateDeliveryEstimateBoundSchema.nullable() + .describe( + 'The lower bound of the estimated range. If empty, represents no lower bound.' + ) + .optional() + }) + export type ShippingRateDeliveryEstimate = z.infer< + typeof ShippingRateDeliveryEstimateSchema + > + + export const ShippingRateFixedAmountSchema = z.object({ + /** A non-negative integer in cents representing how much to charge. */ + amount: z + .number() + .int() + .describe( + 'A non-negative integer in cents representing how much to charge.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** 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: z + .record(ShippingRateCurrencyOptionSchema) + .describe( + '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).' + ) + .optional() + }) + export type ShippingRateFixedAmount = z.infer< + typeof ShippingRateFixedAmountSchema + > + + export const InvoiceThresholdReasonSchema = z.object({ + /** The total invoice amount threshold boundary if it triggered the threshold invoice. */ + amount_gte: z + .number() + .int() + .nullable() + .describe( + 'The total invoice amount threshold boundary if it triggered the threshold invoice.' + ) + .optional(), + /** Indicates which line items triggered a threshold invoice. */ + item_reasons: z + .array(InvoiceItemThresholdReasonSchema) + .describe('Indicates which line items triggered a threshold invoice.') + }) + export type InvoiceThresholdReason = z.infer< + typeof InvoiceThresholdReasonSchema + > + + /** ABA Records contain U.S. bank account details per the ABA format. */ + export const FundingInstructionsBankTransferAbaRecordSchema = z + .object({ + account_holder_address: AddressSchema, + /** The account holder name */ + account_holder_name: z + .string() + .max(5000) + .describe('The account holder name'), + /** The ABA account number */ + account_number: z.string().max(5000).describe('The ABA account number'), + /** The account type */ + account_type: z.string().max(5000).describe('The account type'), + bank_address: AddressSchema, + /** The bank name */ + bank_name: z.string().max(5000).describe('The bank name'), + /** The ABA routing number */ + routing_number: z.string().max(5000).describe('The ABA routing number') + }) + .describe( + 'ABA Records contain U.S. bank account details per the ABA format.' + ) + export type FundingInstructionsBankTransferAbaRecord = z.infer< + typeof FundingInstructionsBankTransferAbaRecordSchema + > + + /** Iban Records contain E.U. bank account details per the SEPA format. */ + export const FundingInstructionsBankTransferIbanRecordSchema = z + .object({ + account_holder_address: AddressSchema, + /** The name of the person or business that owns the bank account */ + account_holder_name: z + .string() + .max(5000) + .describe( + 'The name of the person or business that owns the bank account' + ), + bank_address: AddressSchema, + /** The BIC/SWIFT code of the account. */ + bic: z.string().max(5000).describe('The BIC/SWIFT code of the account.'), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ), + /** The IBAN of the account. */ + iban: z.string().max(5000).describe('The IBAN of the account.') + }) + .describe( + 'Iban Records contain E.U. bank account details per the SEPA format.' + ) + export type FundingInstructionsBankTransferIbanRecord = z.infer< + typeof FundingInstructionsBankTransferIbanRecordSchema + > + + /** Sort Code Records contain U.K. bank account details per the sort code format. */ + export const FundingInstructionsBankTransferSortCodeRecordSchema = z + .object({ + account_holder_address: AddressSchema, + /** The name of the person or business that owns the bank account */ + account_holder_name: z + .string() + .max(5000) + .describe( + 'The name of the person or business that owns the bank account' + ), + /** The account number */ + account_number: z.string().max(5000).describe('The account number'), + bank_address: AddressSchema, + /** The six-digit sort code */ + sort_code: z.string().max(5000).describe('The six-digit sort code') + }) + .describe( + 'Sort Code Records contain U.K. bank account details per the sort code format.' + ) + export type FundingInstructionsBankTransferSortCodeRecord = z.infer< + typeof FundingInstructionsBankTransferSortCodeRecordSchema + > + + /** SPEI Records contain Mexico bank account details per the SPEI format. */ + export const FundingInstructionsBankTransferSpeiRecordSchema = z + .object({ + account_holder_address: AddressSchema, + /** The account holder name */ + account_holder_name: z + .string() + .max(5000) + .describe('The account holder name'), + bank_address: AddressSchema, + /** The three-digit bank code */ + bank_code: z.string().max(5000).describe('The three-digit bank code'), + /** The short banking institution name */ + bank_name: z + .string() + .max(5000) + .describe('The short banking institution name'), + /** The CLABE number */ + clabe: z.string().max(5000).describe('The CLABE number') + }) + .describe( + 'SPEI Records contain Mexico bank account details per the SPEI format.' + ) + export type FundingInstructionsBankTransferSpeiRecord = z.infer< + typeof FundingInstructionsBankTransferSpeiRecordSchema + > + + /** SWIFT Records contain U.S. bank account details per the SWIFT format. */ + export const FundingInstructionsBankTransferSwiftRecordSchema = z + .object({ + account_holder_address: AddressSchema, + /** The account holder name */ + account_holder_name: z + .string() + .max(5000) + .describe('The account holder name'), + /** The account number */ + account_number: z.string().max(5000).describe('The account number'), + /** The account type */ + account_type: z.string().max(5000).describe('The account type'), + bank_address: AddressSchema, + /** The bank name */ + bank_name: z.string().max(5000).describe('The bank name'), + /** The SWIFT code */ + swift_code: z.string().max(5000).describe('The SWIFT code') + }) + .describe( + 'SWIFT Records contain U.S. bank account details per the SWIFT format.' + ) + export type FundingInstructionsBankTransferSwiftRecord = z.infer< + typeof FundingInstructionsBankTransferSwiftRecordSchema + > + + /** Zengin Records contain Japan bank account details per the Zengin format. */ + export const FundingInstructionsBankTransferZenginRecordSchema = z + .object({ + account_holder_address: AddressSchema, + /** The account holder name */ + account_holder_name: z + .string() + .max(5000) + .nullable() + .describe('The account holder name') + .optional(), + /** The account number */ + account_number: z + .string() + .max(5000) + .nullable() + .describe('The account number') + .optional(), + /** The bank account type. In Japan, this can only be `futsu` or `toza`. */ + account_type: z + .string() + .max(5000) + .nullable() + .describe( + 'The bank account type. In Japan, this can only be `futsu` or `toza`.' + ) + .optional(), + bank_address: AddressSchema, + /** The bank code of the account */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('The bank code of the account') + .optional(), + /** The bank name of the account */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('The bank name of the account') + .optional(), + /** The branch code of the account */ + branch_code: z + .string() + .max(5000) + .nullable() + .describe('The branch code of the account') + .optional(), + /** The branch name of the account */ + branch_name: z + .string() + .max(5000) + .nullable() + .describe('The branch name of the account') + .optional() + }) + .describe( + 'Zengin Records contain Japan bank account details per the Zengin format.' + ) + export type FundingInstructionsBankTransferZenginRecord = z.infer< + typeof FundingInstructionsBankTransferZenginRecordSchema + > + + export const PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeSchema = + z.object({ + /** The URL to the hosted Swish instructions page, which allows customers to view the QR code. */ + hosted_instructions_url: z + .string() + .max(5000) + .describe( + 'The URL to the hosted Swish instructions page, which allows customers to view the QR code.' + ), + qr_code: PaymentIntentNextActionSwishQrCodeSchema + }) + export type PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode = + z.infer< + typeof PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeSchema + > + + export const PaymentIntentPaymentMethodOptionsAcssDebitSchema = z.object({ + mandate_options: + PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type PaymentIntentPaymentMethodOptionsAcssDebit = z.infer< + typeof PaymentIntentPaymentMethodOptionsAcssDebitSchema + > + + export const PaymentFlowsInstallmentOptionsSchema = z.object({ + enabled: z.boolean(), + plan: PaymentMethodDetailsCardInstallmentsPlanSchema.optional() + }) + export type PaymentFlowsInstallmentOptions = z.infer< + typeof PaymentFlowsInstallmentOptionsSchema + > + + export const PaymentIntentPaymentMethodOptionsBacsDebitSchema = z.object({ + mandate_options: + PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebitSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsBacsDebit = z.infer< + typeof PaymentIntentPaymentMethodOptionsBacsDebitSchema + > + + export const PaymentMethodOptionsCardInstallmentsSchema = z.object({ + /** Installment plans that may be selected for this PaymentIntent. */ + available_plans: z + .array(PaymentMethodDetailsCardInstallmentsPlanSchema) + .nullable() + .describe( + 'Installment plans that may be selected for this PaymentIntent.' + ) + .optional(), + /** Whether Installments are enabled for this PaymentIntent. */ + enabled: z + .boolean() + .describe('Whether Installments are enabled for this PaymentIntent.'), + /** Installment plan selected for this PaymentIntent. */ + plan: PaymentMethodDetailsCardInstallmentsPlanSchema.nullable() + .describe('Installment plan selected for this PaymentIntent.') + .optional() + }) + export type PaymentMethodOptionsCardInstallments = z.infer< + typeof PaymentMethodOptionsCardInstallmentsSchema + > + + export const PaymentMethodOptionsCardPresentSchema = z.object({ + /** 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: z + .boolean() + .nullable() + .describe( + 'Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)' + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional(), + routing: PaymentMethodOptionsCardPresentRoutingSchema.optional() + }) + export type PaymentMethodOptionsCardPresent = z.infer< + typeof PaymentMethodOptionsCardPresentSchema + > + + export const PaymentMethodOptionsCustomerBalanceBankTransferSchema = z.object( + { + eu_bank_transfer: + PaymentMethodOptionsCustomerBalanceEuBankAccountSchema.optional(), + /** + * 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: z + .array( + z.enum([ + 'aba', + 'iban', + 'sepa', + 'sort_code', + 'spei', + 'swift', + 'zengin' + ]) + ) + .describe( + 'List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.' + ) + .optional(), + /** 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: z + .enum([ + 'eu_bank_transfer', + 'gb_bank_transfer', + 'jp_bank_transfer', + 'mx_bank_transfer', + 'us_bank_transfer' + ]) + .nullable() + .describe( + '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`.' + ) + .optional() + } + ) + export type PaymentMethodOptionsCustomerBalanceBankTransfer = z.infer< + typeof PaymentMethodOptionsCustomerBalanceBankTransferSchema + > + + export const PaymentIntentPaymentMethodOptionsSepaDebitSchema = z.object({ + mandate_options: + PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsSepaDebit = z.infer< + typeof PaymentIntentPaymentMethodOptionsSepaDebitSchema + > + + export const PaymentIntentCardProcessingSchema = z.object({ + customer_notification: + PaymentIntentProcessingCustomerNotificationSchema.optional() + }) + export type PaymentIntentCardProcessing = z.infer< + typeof PaymentIntentCardProcessingSchema + > + + export const PaymentMethodCardWalletMasterpassSchema = z.object({ + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type PaymentMethodCardWalletMasterpass = z.infer< + typeof PaymentMethodCardWalletMasterpassSchema + > + + export const PaymentMethodCardWalletVisaCheckoutSchema = z.object({ + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type PaymentMethodCardWalletVisaCheckout = z.infer< + typeof PaymentMethodCardWalletVisaCheckoutSchema + > + + export const PaymentMethodInteracPresentSchema = z.object({ + /** Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe('Card brand. Can be `interac`, `mastercard` or `visa`.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** A high-level description of the type of cards issued in this range. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'A high-level description of the type of cards issued in this range.' + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + /** The name of the card's issuing bank. */ + issuer: z + .string() + .max(5000) + .nullable() + .describe("The name of the card's issuing bank.") + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional(), + /** Contains information about card networks that can be used to process the payment. */ + networks: PaymentMethodCardPresentNetworksSchema.nullable() + .describe( + 'Contains information about card networks that can be used to process the payment.' + ) + .optional(), + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + preferred_locales: z + .array(z.string().max(5000)) + .nullable() + .describe( + 'EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.' + ) + .optional(), + /** How card details were read in this transaction. */ + read_method: z + .enum([ + 'contact_emv', + 'contactless_emv', + 'contactless_magstripe_mode', + 'magnetic_stripe_fallback', + 'magnetic_stripe_track2' + ]) + .nullable() + .describe('How card details were read in this transaction.') + .optional() + }) + export type PaymentMethodInteracPresent = z.infer< + typeof PaymentMethodInteracPresentSchema + > + + export const PaymentMethodKlarnaSchema = z.object({ + /** The customer's date of birth, if provided. */ + dob: PaymentFlowsPrivatePaymentMethodsKlarnaDobSchema.nullable() + .describe("The customer's date of birth, if provided.") + .optional() + }) + export type PaymentMethodKlarna = z.infer + + export const PaymentMethodUsBankAccountStatusDetailsSchema = z.object({ + blocked: PaymentMethodUsBankAccountBlockedSchema.optional() + }) + export type PaymentMethodUsBankAccountStatusDetails = z.infer< + typeof PaymentMethodUsBankAccountStatusDetailsSchema + > + + export const CustomerTaxSchema = z.object({ + /** Surfaces if automatic tax computation is possible given the current customer location information. */ + automatic_tax: z + .enum(['failed', 'not_collecting', 'supported', 'unrecognized_location']) + .describe( + 'Surfaces if automatic tax computation is possible given the current customer location information.' + ), + /** A recent IP address of the customer used for tax reporting and tax location inference. */ + ip_address: z + .string() + .max(5000) + .nullable() + .describe( + 'A recent IP address of the customer used for tax reporting and tax location inference.' + ) + .optional(), + /** The customer's location as identified by Stripe Tax. */ + location: CustomerTaxLocationSchema.nullable() + .describe("The customer's location as identified by Stripe Tax.") + .optional() + }) + export type CustomerTax = z.infer + + export const ExternalAccountRequirementsSchema = z.object({ + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .nullable() + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ) + .optional(), + /** Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. */ + past_due: z + .array(z.string().max(5000)) + .nullable() + .describe( + "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account." + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type ExternalAccountRequirements = z.infer< + typeof ExternalAccountRequirementsSchema + > + + export const PersonAdditionalTosAcceptancesSchema = z.object({ + /** Details on the legal guardian's acceptance of the main Stripe service agreement. */ + account: PersonAdditionalTosAcceptanceSchema.nullable() + .describe( + "Details on the legal guardian's acceptance of the main Stripe service agreement." + ) + .optional() + }) + export type PersonAdditionalTosAcceptances = z.infer< + typeof PersonAdditionalTosAcceptancesSchema + > + + export const AccountCardIssuingSettingsSchema = z.object({ + tos_acceptance: CardIssuingAccountTermsOfServiceSchema.optional() + }) + export type AccountCardIssuingSettings = z.infer< + typeof AccountCardIssuingSettingsSchema + > + + export const AccountCardPaymentsSettingsSchema = z.object({ + decline_on: AccountDeclineChargeOnSchema.optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type AccountCardPaymentsSettings = z.infer< + typeof AccountCardPaymentsSettingsSchema + > + + export const AccountPayoutSettingsSchema = z.object({ + /** 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: z + .boolean() + .describe( + '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`.' + ), + schedule: TransferScheduleSchema, + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type AccountPayoutSettings = z.infer< + typeof AccountPayoutSettingsSchema + > + + export const AccountTreasurySettingsSchema = z.object({ + tos_acceptance: AccountTermsOfServiceSchema.optional() + }) + export type AccountTreasurySettings = z.infer< + typeof AccountTreasurySettingsSchema + > + + export const ConnectEmbeddedAccountConfigClaimSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedAccountFeaturesClaimSchema + }) + export type ConnectEmbeddedAccountConfigClaim = z.infer< + typeof ConnectEmbeddedAccountConfigClaimSchema + > + + export const ConnectEmbeddedPayoutsConfigSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedPayoutsFeaturesSchema + }) + export type ConnectEmbeddedPayoutsConfig = z.infer< + typeof ConnectEmbeddedPayoutsConfigSchema + > + + export const ConnectEmbeddedBaseConfigClaimSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedBaseFeaturesSchema + }) + export type ConnectEmbeddedBaseConfigClaim = z.infer< + typeof ConnectEmbeddedBaseConfigClaimSchema + > + + export const ConnectEmbeddedFinancialAccountConfigClaimSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedFinancialAccountFeaturesSchema + }) + export type ConnectEmbeddedFinancialAccountConfigClaim = z.infer< + typeof ConnectEmbeddedFinancialAccountConfigClaimSchema + > + + export const ConnectEmbeddedFinancialAccountTransactionsConfigClaimSchema = + z.object({ + /** Whether the embedded component is enabled. */ + enabled: z + .boolean() + .describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedFinancialAccountTransactionsFeaturesSchema + }) + export type ConnectEmbeddedFinancialAccountTransactionsConfigClaim = z.infer< + typeof ConnectEmbeddedFinancialAccountTransactionsConfigClaimSchema + > + + export const ConnectEmbeddedIssuingCardConfigClaimSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedIssuingCardFeaturesSchema + }) + export type ConnectEmbeddedIssuingCardConfigClaim = z.infer< + typeof ConnectEmbeddedIssuingCardConfigClaimSchema + > + + export const ConnectEmbeddedIssuingCardsListConfigClaimSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedIssuingCardsListFeaturesSchema + }) + export type ConnectEmbeddedIssuingCardsListConfigClaim = z.infer< + typeof ConnectEmbeddedIssuingCardsListConfigClaimSchema + > + + export const ConnectEmbeddedPaymentsConfigClaimSchema = z.object({ + /** Whether the embedded component is enabled. */ + enabled: z.boolean().describe('Whether the embedded component is enabled.'), + features: ConnectEmbeddedPaymentsFeaturesSchema + }) + export type ConnectEmbeddedPaymentsConfigClaim = z.infer< + typeof ConnectEmbeddedPaymentsConfigClaimSchema + > + + /** + * 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 const AppsSecretSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** If true, indicates that this secret has been deleted */ + deleted: z + .boolean() + .describe('If true, indicates that this secret has been deleted') + .optional(), + /** The Unix timestamp for the expiry time of the secret, after which the secret deletes. */ + expires_at: z + .number() + .int() + .nullable() + .describe( + 'The Unix timestamp for the expiry time of the secret, after which the secret deletes.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** A name for the secret that's unique within the scope. */ + name: z + .string() + .max(5000) + .describe("A name for the secret that's unique within the scope."), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('apps.secret') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The plaintext secret value to be stored. */ + payload: z + .string() + .max(5000) + .nullable() + .describe('The plaintext secret value to be stored.') + .optional(), + scope: SecretServiceResourceScopeSchema + }) + .describe( + "Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.\n\nThe 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.\n\nAll 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.\n\nA `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.\n\nRelated guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)" + ) + export type AppsSecret = z.infer + + export const BalanceAmountSchema = z.object({ + /** Balance amount. */ + amount: z.number().int().describe('Balance amount.'), + /** 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: z + .string() + .describe( + '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).' + ), + source_types: BalanceAmountBySourceTypeSchema.optional() + }) + export type BalanceAmount = z.infer + + export const BalanceNetAvailableSchema = z.object({ + /** Net balance amount, subtracting fees from platform-set pricing. */ + amount: z + .number() + .int() + .describe( + 'Net balance amount, subtracting fees from platform-set pricing.' + ), + /** ID of the external account for this net balance (not expandable). */ + destination: z + .string() + .max(5000) + .describe( + 'ID of the external account for this net balance (not expandable).' + ), + source_types: BalanceAmountBySourceTypeSchema.optional() + }) + export type BalanceNetAvailable = z.infer + + /** 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 const BillingMeterEventAdjustmentSchema = z + .object({ + /** Specifies which event to cancel. */ + cancel: + BillingMeterResourceBillingMeterEventAdjustmentCancelSchema.nullable() + .describe('Specifies which event to cancel.') + .optional(), + /** The name of the meter event. Corresponds with the `event_name` field on a meter. */ + event_name: z + .string() + .max(100) + .describe( + 'The name of the meter event. Corresponds with the `event_name` field on a meter.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.meter_event_adjustment') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The meter event adjustment's status. */ + status: z + .enum(['complete', 'pending']) + .describe("The meter event adjustment's status."), + /** Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. */ + type: z + .literal('cancel') + .describe( + 'Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.' + ) + }) + .describe( + '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 BillingMeterEventAdjustment = z.infer< + typeof BillingMeterEventAdjustmentSchema + > + + export const PortalSubscriptionCancelSchema = z.object({ + cancellation_reason: PortalSubscriptionCancellationReasonSchema, + /** Whether the feature is enabled. */ + enabled: z.boolean().describe('Whether the feature is enabled.'), + /** Whether to cancel subscriptions immediately or at the end of the billing period. */ + mode: z + .enum(['at_period_end', 'immediately']) + .describe( + 'Whether to cancel subscriptions immediately or at the end of the billing period.' + ), + /** Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. */ + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .describe( + 'Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.' + ) + }) + export type PortalSubscriptionCancel = z.infer< + typeof PortalSubscriptionCancelSchema + > + + export const PortalResourceScheduleUpdateAtPeriodEndSchema = z.object({ + /** List of conditions. When any condition is true, an update will be scheduled at the end of the current period. */ + conditions: z + .array(PortalResourceScheduleUpdateAtPeriodEndConditionSchema) + .describe( + 'List of conditions. When any condition is true, an update will be scheduled at the end of the current period.' + ) + }) + export type PortalResourceScheduleUpdateAtPeriodEnd = z.infer< + typeof PortalResourceScheduleUpdateAtPeriodEndSchema + > + + export const PortalFlowsRetentionSchema = z.object({ + /** Configuration when `retention.type=coupon_offer`. */ + coupon_offer: PortalFlowsCouponOfferSchema.nullable() + .describe('Configuration when `retention.type=coupon_offer`.') + .optional(), + /** Type of retention strategy that will be used. */ + type: z + .literal('coupon_offer') + .describe('Type of retention strategy that will be used.') + }) + export type PortalFlowsRetention = z.infer + + export const PaymentPagesCheckoutSessionAfterExpirationSchema = z.object({ + /** When set, configuration used to recover the Checkout Session on expiry. */ + recovery: + PaymentPagesCheckoutSessionAfterExpirationRecoverySchema.nullable() + .describe( + 'When set, configuration used to recover the Checkout Session on expiry.' + ) + .optional() + }) + export type PaymentPagesCheckoutSessionAfterExpiration = z.infer< + typeof PaymentPagesCheckoutSessionAfterExpirationSchema + > + + export const PaymentPagesCheckoutSessionConsentCollectionSchema = z.object({ + /** If set to `hidden`, it will hide legal text related to the reuse of a payment method. */ + payment_method_reuse_agreement: + PaymentPagesCheckoutSessionPaymentMethodReuseAgreementSchema.nullable() + .describe( + 'If set to `hidden`, it will hide legal text related to the reuse of a payment method.' + ) + .optional(), + /** + * 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: z + .enum(['auto', 'none']) + .nullable() + .describe( + "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants." + ) + .optional(), + /** If set to `required`, it requires customers to accept the terms of service before being able to pay. */ + terms_of_service: z + .enum(['none', 'required']) + .nullable() + .describe( + 'If set to `required`, it requires customers to accept the terms of service before being able to pay.' + ) + .optional() + }) + export type PaymentPagesCheckoutSessionConsentCollection = z.infer< + typeof PaymentPagesCheckoutSessionConsentCollectionSchema + > + + export const PaymentPagesCheckoutSessionCustomFieldsDropdownSchema = z.object( + { + /** The value that will pre-fill on the payment page. */ + default_value: z + .string() + .max(5000) + .nullable() + .describe('The value that will pre-fill on the payment page.') + .optional(), + /** The options available for the customer to select. Up to 200 options allowed. */ + options: z + .array(PaymentPagesCheckoutSessionCustomFieldsOptionSchema) + .describe( + 'The options available for the customer to select. Up to 200 options allowed.' + ), + /** The option selected by the customer. This will be the `value` for the option. */ + value: z + .string() + .max(5000) + .nullable() + .describe( + 'The option selected by the customer. This will be the `value` for the option.' + ) + .optional() + } + ) + export type PaymentPagesCheckoutSessionCustomFieldsDropdown = z.infer< + typeof PaymentPagesCheckoutSessionCustomFieldsDropdownSchema + > + + export const PaymentPagesCheckoutSessionCustomTextSchema = z.object({ + /** Custom text that should be displayed after the payment confirmation button. */ + after_submit: PaymentPagesCheckoutSessionCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed after the payment confirmation button.' + ) + .optional(), + /** Custom text that should be displayed alongside shipping address collection. */ + shipping_address: + PaymentPagesCheckoutSessionCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed alongside shipping address collection.' + ) + .optional(), + /** Custom text that should be displayed alongside the payment confirmation button. */ + submit: PaymentPagesCheckoutSessionCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed alongside the payment confirmation button.' + ) + .optional(), + /** Custom text that should be displayed in place of the default terms of service agreement text. */ + terms_of_service_acceptance: + PaymentPagesCheckoutSessionCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed in place of the default terms of service agreement text.' + ) + .optional() + }) + export type PaymentPagesCheckoutSessionCustomText = z.infer< + typeof PaymentPagesCheckoutSessionCustomTextSchema + > + + export const PaymentLinksResourceConsentCollectionSchema = z.object({ + /** Settings related to the payment method reuse text shown in the Checkout UI. */ + payment_method_reuse_agreement: + PaymentLinksResourcePaymentMethodReuseAgreementSchema.nullable() + .describe( + 'Settings related to the payment method reuse text shown in the Checkout UI.' + ) + .optional(), + /** If set to `auto`, enables the collection of customer consent for promotional communications. */ + promotions: z + .enum(['auto', 'none']) + .nullable() + .describe( + 'If set to `auto`, enables the collection of customer consent for promotional communications.' + ) + .optional(), + /** 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: z + .enum(['none', 'required']) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type PaymentLinksResourceConsentCollection = z.infer< + typeof PaymentLinksResourceConsentCollectionSchema + > + + export const PaymentLinksResourceCustomFieldsDropdownSchema = z.object({ + /** The options available for the customer to select. Up to 200 options allowed. */ + options: z + .array(PaymentLinksResourceCustomFieldsDropdownOptionSchema) + .describe( + 'The options available for the customer to select. Up to 200 options allowed.' + ) + }) + export type PaymentLinksResourceCustomFieldsDropdown = z.infer< + typeof PaymentLinksResourceCustomFieldsDropdownSchema + > + + export const PaymentLinksResourceCustomTextSchema = z.object({ + /** Custom text that should be displayed after the payment confirmation button. */ + after_submit: PaymentLinksResourceCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed after the payment confirmation button.' + ) + .optional(), + /** Custom text that should be displayed alongside shipping address collection. */ + shipping_address: PaymentLinksResourceCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed alongside shipping address collection.' + ) + .optional(), + /** Custom text that should be displayed alongside the payment confirmation button. */ + submit: PaymentLinksResourceCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed alongside the payment confirmation button.' + ) + .optional(), + /** Custom text that should be displayed in place of the default terms of service agreement text. */ + terms_of_service_acceptance: + PaymentLinksResourceCustomTextPositionSchema.nullable() + .describe( + 'Custom text that should be displayed in place of the default terms of service agreement text.' + ) + .optional() + }) + export type PaymentLinksResourceCustomText = z.infer< + typeof PaymentLinksResourceCustomTextSchema + > + + export const PaymentLinksResourceRestrictionsSchema = z.object({ + completed_sessions: PaymentLinksResourceCompletedSessionsSchema + }) + export type PaymentLinksResourceRestrictions = z.infer< + typeof PaymentLinksResourceRestrictionsSchema + > + + export const CheckoutAcssDebitPaymentMethodOptionsSchema = z.object({ + /** Currency supported by the bank account. Returned when the Session is in `setup` mode. */ + currency: z + .enum(['cad', 'usd']) + .describe( + 'Currency supported by the bank account. Returned when the Session is in `setup` mode.' + ) + .optional(), + mandate_options: CheckoutAcssDebitMandateOptionsSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type CheckoutAcssDebitPaymentMethodOptions = z.infer< + typeof CheckoutAcssDebitPaymentMethodOptionsSchema + > + + export const CheckoutBacsDebitPaymentMethodOptionsSchema = z.object({ + mandate_options: + CheckoutPaymentMethodOptionsMandateOptionsBacsDebitSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional() + }) + export type CheckoutBacsDebitPaymentMethodOptions = z.infer< + typeof CheckoutBacsDebitPaymentMethodOptionsSchema + > + + export const CheckoutCustomerBalanceBankTransferPaymentMethodOptionsSchema = + z.object({ + eu_bank_transfer: + PaymentMethodOptionsCustomerBalanceEuBankAccountSchema.optional(), + /** + * 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: z + .array( + z.enum([ + 'aba', + 'iban', + 'sepa', + 'sort_code', + 'spei', + 'swift', + 'zengin' + ]) + ) + .describe( + 'List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.' + ) + .optional(), + /** 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: z + .enum([ + 'eu_bank_transfer', + 'gb_bank_transfer', + 'jp_bank_transfer', + 'mx_bank_transfer', + 'us_bank_transfer' + ]) + .nullable() + .describe( + '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`.' + ) + .optional() + }) + export type CheckoutCustomerBalanceBankTransferPaymentMethodOptions = z.infer< + typeof CheckoutCustomerBalanceBankTransferPaymentMethodOptionsSchema + > + + export const CheckoutSepaDebitPaymentMethodOptionsSchema = z.object({ + mandate_options: + CheckoutPaymentMethodOptionsMandateOptionsSepaDebitSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional() + }) + export type CheckoutSepaDebitPaymentMethodOptions = z.infer< + typeof CheckoutSepaDebitPaymentMethodOptionsSchema + > + + /** A supplier of carbon removal. */ + export const ClimateSupplierSchema = z + .object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Link to a webpage to learn more about the supplier. */ + info_url: z + .string() + .max(5000) + .describe('Link to a webpage to learn more about the supplier.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The locations in which this supplier operates. */ + locations: z + .array(ClimateRemovalsLocationSchema) + .describe('The locations in which this supplier operates.'), + /** Name of this carbon removal supplier. */ + name: z + .string() + .max(5000) + .describe('Name of this carbon removal supplier.'), + /** String representing the object’s type. Objects of the same type share the same value. */ + object: z + .literal('climate.supplier') + .describe( + 'String representing the object’s type. Objects of the same type share the same value.' + ), + /** The scientific pathway used for carbon removal. */ + removal_pathway: z + .enum([ + 'biomass_carbon_removal_and_storage', + 'direct_air_capture', + 'enhanced_weathering' + ]) + .describe('The scientific pathway used for carbon removal.') + }) + .describe('A supplier of carbon removal.') + export type ClimateSupplier = z.infer + + /** This hash contains details about the customer acceptance of the Mandate. */ + export const ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceSchema = + z + .object({ + /** If this is a Mandate accepted online, this hash contains details about the online acceptance. */ + online: + ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineSchema.nullable() + .describe( + 'If this is a Mandate accepted online, this hash contains details about the online acceptance.' + ) + .optional(), + /** The type of customer acceptance information included with the Mandate. */ + type: z + .string() + .max(5000) + .describe( + 'The type of customer acceptance information included with the Mandate.' + ) + }) + .describe( + 'This hash contains details about the customer acceptance of the Mandate.' + ) + export type ConfirmationTokensResourceMandateDataResourceCustomerAcceptance = + z.infer< + typeof ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceSchema + > + + /** Payment-method-specific configuration */ + export const ConfirmationTokensResourcePaymentMethodOptionsSchema = z + .object({ + /** This hash contains the card payment method options. */ + card: ConfirmationTokensResourcePaymentMethodOptionsResourceCardSchema.nullable() + .describe('This hash contains the card payment method options.') + .optional() + }) + .describe('Payment-method-specific configuration') + export type ConfirmationTokensResourcePaymentMethodOptions = z.infer< + typeof ConfirmationTokensResourcePaymentMethodOptionsSchema + > + + export const ConfirmationTokensResourceShippingSchema = z.object({ + address: AddressSchema, + /** Recipient name. */ + name: z.string().max(5000).describe('Recipient name.'), + /** Recipient phone (including extension). */ + phone: z + .string() + .max(5000) + .nullable() + .describe('Recipient phone (including extension).') + .optional() + }) + export type ConfirmationTokensResourceShipping = z.infer< + typeof ConfirmationTokensResourceShippingSchema + > + + export const CountrySpecVerificationFieldsSchema = z.object({ + company: CountrySpecVerificationFieldDetailsSchema, + individual: CountrySpecVerificationFieldDetailsSchema + }) + export type CountrySpecVerificationFields = z.infer< + typeof CountrySpecVerificationFieldsSchema + > + + /** This hash contains whether the Payment Element is enabled and the features it supports. */ + export const CustomerSessionResourceComponentsResourcePaymentElementSchema = z + .object({ + /** Whether the Payment Element is enabled. */ + enabled: z.boolean().describe('Whether the Payment Element is enabled.'), + /** This hash defines whether the Payment Element supports certain features. */ + features: + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesSchema.nullable() + .describe( + 'This hash defines whether the Payment Element supports certain features.' + ) + .optional() + }) + .describe( + 'This hash contains whether the Payment Element is enabled and the features it supports.' + ) + export type CustomerSessionResourceComponentsResourcePaymentElement = z.infer< + typeof CustomerSessionResourceComponentsResourcePaymentElementSchema + > + + /** An active entitlement describes access to a feature for a customer. */ + export const EntitlementsActiveEntitlementSchema = z + .object({ + /** The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. */ + feature: z + .union([z.string().max(5000), EntitlementsFeatureSchema]) + .describe( + 'The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** A unique key you provide as your own system identifier. This may be up to 80 characters. */ + lookup_key: z + .string() + .max(5000) + .describe( + 'A unique key you provide as your own system identifier. This may be up to 80 characters.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('entitlements.active_entitlement') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'An active entitlement describes access to a feature for a customer.' + ) + export type EntitlementsActiveEntitlement = z.infer< + typeof EntitlementsActiveEntitlementSchema + > + + /** Describes a snapshot of the owners of an account at a particular point in time. */ + export const FinancialConnectionsAccountOwnershipSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('financial_connections.account_ownership') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** A paginated list of owners for this account. */ + owners: z + .object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsAccountOwnerSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('A paginated list of owners for this account.') + }) + .describe( + 'Describes a snapshot of the owners of an account at a particular point in time.' + ) + export type FinancialConnectionsAccountOwnership = z.infer< + typeof FinancialConnectionsAccountOwnershipSchema + > + + /** A Transaction represents a real transaction that affects a Financial Connections Account balance. */ + export const FinancialConnectionsTransactionSchema = z + .object({ + /** The ID of the Financial Connections Account this transaction belongs to. */ + account: z + .string() + .max(5000) + .describe( + 'The ID of the Financial Connections Account this transaction belongs to.' + ), + /** The amount of this transaction, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe( + 'The amount of this transaction, in cents (or local equivalent).' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** The description of this transaction. */ + description: z + .string() + .max(5000) + .describe('The description of this transaction.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('financial_connections.transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The status of the transaction. */ + status: z + .enum(['pending', 'posted', 'void']) + .describe('The status of the transaction.'), + status_transitions: + BankConnectionsResourceTransactionResourceStatusTransitionsSchema, + /** Time at which the transaction was transacted. Measured in seconds since the Unix epoch. */ + transacted_at: z + .number() + .int() + .describe( + 'Time at which the transaction was transacted. Measured in seconds since the Unix epoch.' + ), + /** The token of the transaction refresh that last updated or created this transaction. */ + transaction_refresh: z + .string() + .max(5000) + .describe( + 'The token of the transaction refresh that last updated or created this transaction.' + ), + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: z + .number() + .int() + .describe( + 'Time at which the object was last updated. Measured in seconds since the Unix epoch.' + ) + }) + .describe( + 'A Transaction represents a real transaction that affects a Financial Connections Account balance.' + ) + export type FinancialConnectionsTransaction = z.infer< + typeof FinancialConnectionsTransactionSchema + > + + /** Details about the request forwarded to the destination endpoint. */ + export const ForwardedRequestDetailsSchema = z + .object({ + /** The body payload to send to the destination endpoint. */ + body: z + .string() + .max(5000) + .describe('The body payload to send to the destination endpoint.'), + /** 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: z + .array(ForwardedRequestHeaderSchema) + .describe( + '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.' + ), + /** The HTTP method used to call the destination endpoint. */ + http_method: z + .literal('POST') + .describe('The HTTP method used to call the destination endpoint.') + }) + .describe( + 'Details about the request forwarded to the destination endpoint.' + ) + export type ForwardedRequestDetails = z.infer< + typeof ForwardedRequestDetailsSchema + > + + /** Details about the response from the destination endpoint. */ + export const ForwardedResponseDetailsSchema = z + .object({ + /** The response body from the destination endpoint to Stripe. */ + body: z + .string() + .max(5000) + .describe('The response body from the destination endpoint to Stripe.'), + /** HTTP headers that the destination endpoint returned. */ + headers: z + .array(ForwardedRequestHeaderSchema) + .describe('HTTP headers that the destination endpoint returned.'), + /** The HTTP status code that the destination endpoint returned. */ + status: z + .number() + .int() + .describe( + 'The HTTP status code that the destination endpoint returned.' + ) + }) + .describe('Details about the response from the destination endpoint.') + export type ForwardedResponseDetails = z.infer< + typeof ForwardedResponseDetailsSchema + > + + /** Result from a email check */ + export const GelatoEmailReportSchema = z + .object({ + /** Email to be verified. */ + email: z + .string() + .max(5000) + .nullable() + .describe('Email to be verified.') + .optional(), + /** Details on the verification error. Present when status is `unverified`. */ + error: GelatoEmailReportErrorSchema.nullable() + .describe( + 'Details on the verification error. Present when status is `unverified`.' + ) + .optional(), + /** Status of this `email` check. */ + status: z + .enum(['unverified', 'verified']) + .describe('Status of this `email` check.') + }) + .describe('Result from a email check') + export type GelatoEmailReport = z.infer + + /** Result from a phone check */ + export const GelatoPhoneReportSchema = z + .object({ + /** Details on the verification error. Present when status is `unverified`. */ + error: GelatoPhoneReportErrorSchema.nullable() + .describe( + 'Details on the verification error. Present when status is `unverified`.' + ) + .optional(), + /** Phone to be verified. */ + phone: z + .string() + .max(5000) + .nullable() + .describe('Phone to be verified.') + .optional(), + /** Status of this `phone` check. */ + status: z + .enum(['unverified', 'verified']) + .describe('Status of this `phone` check.') + }) + .describe('Result from a phone check') + export type GelatoPhoneReport = z.infer + + /** Result from a selfie check */ + export const GelatoSelfieReportSchema = z + .object({ + /** ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. */ + document: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.' + ) + .optional(), + /** Details on the verification error. Present when status is `unverified`. */ + error: GelatoSelfieReportErrorSchema.nullable() + .describe( + 'Details on the verification error. Present when status is `unverified`.' + ) + .optional(), + /** ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. */ + selfie: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.' + ) + .optional(), + /** Status of this `selfie` check. */ + status: z + .enum(['unverified', 'verified']) + .describe('Status of this `selfie` check.') + }) + .describe('Result from a selfie check') + export type GelatoSelfieReport = z.infer + + export const PaymentMethodConfigResourcePaymentMethodPropertiesSchema = + z.object({ + /** Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. */ + available: z + .boolean() + .describe( + "Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active." + ), + display_preference: PaymentMethodConfigResourceDisplayPreferenceSchema + }) + export type PaymentMethodConfigResourcePaymentMethodProperties = z.infer< + typeof PaymentMethodConfigResourcePaymentMethodPropertiesSchema + > + + /** Indicates the status of a specific payment method on a payment method domain. */ + export const PaymentMethodDomainResourcePaymentMethodStatusSchema = z + .object({ + /** The status of the payment method on the domain. */ + status: z + .enum(['active', 'inactive']) + .describe('The status of the payment method on the domain.'), + status_details: + PaymentMethodDomainResourcePaymentMethodStatusDetailsSchema.optional() + }) + .describe( + 'Indicates the status of a specific payment method on a payment method domain.' + ) + export type PaymentMethodDomainResourcePaymentMethodStatus = z.infer< + typeof PaymentMethodDomainResourcePaymentMethodStatusSchema + > + + /** + * 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 ProductFeatureSchema = z + .object({ + entitlement_feature: EntitlementsFeatureSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('product_feature') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'A product_feature represents an attachment between a feature and a product.\nWhen a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer.' + ) + export type ProductFeature = z.infer + + /** + * 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 RadarValueListSchema = z + .object({ + /** The name of the value list for use in rules. */ + alias: z + .string() + .max(5000) + .describe('The name of the value list for use in rules.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The name or email address of the user who created this value list. */ + created_by: z + .string() + .max(5000) + .describe( + 'The name or email address of the user who created this value list.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. */ + item_type: z + .enum([ + 'card_bin', + 'card_fingerprint', + 'case_sensitive_string', + 'country', + 'customer_id', + 'email', + 'ip_address', + 'sepa_debit_fingerprint', + 'string', + 'us_bank_account_fingerprint' + ]) + .describe( + 'The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.' + ), + /** List of items contained within this value list. */ + list_items: z + .object({ + /** Details about each object. */ + data: z + .array(RadarValueListItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('List of items contained within this value list.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The name of the value list. */ + name: z.string().max(5000).describe('The name of the value list.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('radar.value_list') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'Value lists allow you to group values together which can then be referenced in rules.\n\nRelated guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items)' + ) + export type RadarValueList = z.infer + + /** A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. */ + export const UsageRecordSummarySchema = z + .object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The invoice in which this usage period has been billed for. */ + invoice: z + .string() + .max(5000) + .nullable() + .describe('The invoice in which this usage period has been billed for.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('usage_record_summary') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + period: PeriodSchema, + /** The ID of the subscription item this summary is describing. */ + subscription_item: z + .string() + .max(5000) + .describe( + 'The ID of the subscription item this summary is describing.' + ), + /** The total usage within this usage period. */ + total_usage: z + .number() + .int() + .describe('The total usage within this usage period.') + }) + .describe( + 'A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period.' + ) + export type UsageRecordSummary = z.infer + + export const TaxProductResourceShipFromDetailsSchema = z.object({ + address: TaxProductResourcePostalAddressSchema + }) + export type TaxProductResourceShipFromDetails = z.infer< + typeof TaxProductResourceShipFromDetailsSchema + > + + export const TaxProductResourceTaxRateDetailsSchema = z.object({ + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ) + .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. */ + flat_amount: TaxRateFlatAmountSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. */ + percentage_decimal: z + .string() + .max(5000) + .describe( + 'The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`.' + ), + /** Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. */ + rate_type: z + .enum(['flat_amount', 'percentage']) + .nullable() + .describe( + 'Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location.' + ) + .optional(), + /** State, county, province, or region. */ + state: z + .string() + .max(5000) + .nullable() + .describe('State, county, province, or region.') + .optional(), + /** The tax type, such as `vat` or `sales_tax`. */ + tax_type: z + .enum([ + 'amusement_tax', + 'communications_tax', + 'gst', + 'hst', + 'igst', + 'jct', + 'lease_tax', + 'pst', + 'qst', + 'retail_delivery_fee', + 'rst', + 'sales_tax', + 'service_tax', + 'vat' + ]) + .nullable() + .describe('The tax type, such as `vat` or `sales_tax`.') + .optional() + }) + export type TaxProductResourceTaxRateDetails = z.infer< + typeof TaxProductResourceTaxRateDetailsSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsEuropeSchema = + z.object({ + standard: + TaxProductRegistrationsResourceCountryOptionsEuStandardSchema.optional(), + /** Type of registration in an EU country. */ + type: z + .enum(['ioss', 'oss_non_union', 'oss_union', 'standard']) + .describe('Type of registration in an EU country.') + }) + export type TaxProductRegistrationsResourceCountryOptionsEurope = z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsEuropeSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsCanadaSchema = + z.object({ + province_standard: + TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardSchema.optional(), + /** Type of registration in Canada. */ + type: z + .enum(['province_standard', 'simplified', 'standard']) + .describe('Type of registration in Canada.') + }) + export type TaxProductRegistrationsResourceCountryOptionsCanada = z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsCanadaSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxSchema = + z.object({ + /** Elections for the state sales tax registration. */ + elections: z + .array( + TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElectionSchema + ) + .describe('Elections for the state sales tax registration.') + .optional() + }) + export type TaxProductRegistrationsResourceCountryOptionsUsStateSalesTax = + z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxSchema + > + + export const TaxProductResourceTaxSettingsHeadOfficeSchema = z.object({ + address: AddressSchema + }) + export type TaxProductResourceTaxSettingsHeadOffice = z.infer< + typeof TaxProductResourceTaxSettingsHeadOfficeSchema + > + + export const TaxTransactionLineItemSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_tax: z + .number() + .int() + .describe( + 'The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax.transaction_line_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The ID of an existing [Product](https://stripe.com/docs/api/products/object). */ + product: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of an existing [Product](https://stripe.com/docs/api/products/object).' + ) + .optional(), + /** The number of units of the item being purchased. For reversals, this is the quantity reversed. */ + quantity: z + .number() + .int() + .describe( + 'The number of units of the item being purchased. For reversals, this is the quantity reversed.' + ), + /** A custom identifier for this line item in the transaction. */ + reference: z + .string() + .max(5000) + .describe('A custom identifier for this line item in the transaction.'), + /** If `type=reversal`, contains information about what was reversed. */ + reversal: + TaxProductResourceTaxTransactionLineItemResourceReversalSchema.nullable() + .describe( + 'If `type=reversal`, contains information about what was reversed.' + ) + .optional(), + /** Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. */ + tax_behavior: z + .enum(['exclusive', 'inclusive']) + .describe( + 'Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.' + ), + /** The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. */ + tax_code: z + .string() + .max(5000) + .describe( + 'The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.' + ), + /** If `reversal`, this line item reverses an earlier transaction. */ + type: z + .enum(['reversal', 'transaction']) + .describe( + 'If `reversal`, this line item reverses an earlier transaction.' + ) + }) + export type TaxTransactionLineItem = z.infer< + typeof TaxTransactionLineItemSchema + > + + export const TerminalConfigurationConfigurationResourceTippingSchema = + z.object({ + aud: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + cad: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + chf: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + czk: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + dkk: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + eur: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + gbp: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + hkd: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + jpy: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + myr: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + nok: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + nzd: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + pln: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + sek: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + sgd: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional(), + usd: TerminalConfigurationConfigurationResourceCurrencySpecificConfigSchema.optional() + }) + export type TerminalConfigurationConfigurationResourceTipping = z.infer< + typeof TerminalConfigurationConfigurationResourceTippingSchema + > + + /** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + */ + export const TerminalLocationSchema = z + .object({ + address: AddressSchema, + /** The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides: z + .string() + .max(5000) + .describe( + 'The ID of a configuration that will be used to customize all readers in this location.' + ) + .optional(), + /** The display name of the location. */ + display_name: z + .string() + .max(5000) + .describe('The display name of the location.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.location') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'A Location represents a grouping of readers.\n\nRelated guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)' + ) + export type TerminalLocation = z.infer + + /** Represents a per-transaction override of a reader configuration */ + export const TerminalReaderReaderResourceProcessConfigSchema = z + .object({ + /** Enable customer initiated cancellation when processing this payment. */ + enable_customer_cancellation: z + .boolean() + .describe( + 'Enable customer initiated cancellation when processing this payment.' + ) + .optional(), + /** Override showing a tipping selection screen on this transaction. */ + skip_tipping: z + .boolean() + .describe( + 'Override showing a tipping selection screen on this transaction.' + ) + .optional(), + tipping: TerminalReaderReaderResourceTippingConfigSchema.optional() + }) + .describe('Represents a per-transaction override of a reader configuration') + export type TerminalReaderReaderResourceProcessConfig = z.infer< + typeof TerminalReaderReaderResourceProcessConfigSchema + > + + /** Represents a cart to be displayed on the reader */ + export const TerminalReaderReaderResourceCartSchema = z + .object({ + /** 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: z + .string() + .describe( + '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).' + ), + /** List of line items in the cart. */ + line_items: z + .array(TerminalReaderReaderResourceLineItemSchema) + .describe('List of line items in the cart.'), + /** Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + tax: z + .number() + .int() + .nullable() + .describe( + 'Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + .optional(), + /** Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + total: z + .number() + .int() + .describe( + 'Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + }) + .describe('Represents a cart to be displayed on the reader') + export type TerminalReaderReaderResourceCart = z.infer< + typeof TerminalReaderReaderResourceCartSchema + > + + export const TreasurySharedResourceBillingDetailsSchema = z.object({ + address: AddressSchema, + /** Email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe('Email address.') + .optional(), + /** Full name. */ + name: z.string().max(5000).nullable().describe('Full name.').optional() + }) + export type TreasurySharedResourceBillingDetails = z.infer< + typeof TreasurySharedResourceBillingDetailsSchema + > + + /** Toggle settings for enabling/disabling a feature */ + export const TreasuryFinancialAccountsResourceToggleSettingsSchema = z + .object({ + /** Whether the FinancialAccount should have the Feature. */ + requested: z + .boolean() + .describe('Whether the FinancialAccount should have the Feature.'), + /** Whether the Feature is operational. */ + status: z + .enum(['active', 'pending', 'restricted']) + .describe('Whether the Feature is operational.'), + /** Additional details; includes at least one entry when the status is not `active`. */ + status_details: z + .array( + TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsSchema + ) + .describe( + 'Additional details; includes at least one entry when the status is not `active`.' + ) + }) + .describe('Toggle settings for enabling/disabling a feature') + export type TreasuryFinancialAccountsResourceToggleSettings = z.infer< + typeof TreasuryFinancialAccountsResourceToggleSettingsSchema + > + + /** Toggle settings for enabling/disabling the ABA address feature */ + export const TreasuryFinancialAccountsResourceAbaToggleSettingsSchema = z + .object({ + /** Whether the FinancialAccount should have the Feature. */ + requested: z + .boolean() + .describe('Whether the FinancialAccount should have the Feature.'), + /** Whether the Feature is operational. */ + status: z + .enum(['active', 'pending', 'restricted']) + .describe('Whether the Feature is operational.'), + /** Additional details; includes at least one entry when the status is not `active`. */ + status_details: z + .array( + TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsSchema + ) + .describe( + 'Additional details; includes at least one entry when the status is not `active`.' + ) + }) + .describe('Toggle settings for enabling/disabling the ABA address feature') + export type TreasuryFinancialAccountsResourceAbaToggleSettings = z.infer< + typeof TreasuryFinancialAccountsResourceAbaToggleSettingsSchema + > + + /** Toggle settings for enabling/disabling an inbound ACH specific feature */ + export const TreasuryFinancialAccountsResourceInboundAchToggleSettingsSchema = + z + .object({ + /** Whether the FinancialAccount should have the Feature. */ + requested: z + .boolean() + .describe('Whether the FinancialAccount should have the Feature.'), + /** Whether the Feature is operational. */ + status: z + .enum(['active', 'pending', 'restricted']) + .describe('Whether the Feature is operational.'), + /** Additional details; includes at least one entry when the status is not `active`. */ + status_details: z + .array( + TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsSchema + ) + .describe( + 'Additional details; includes at least one entry when the status is not `active`.' + ) + }) + .describe( + 'Toggle settings for enabling/disabling an inbound ACH specific feature' + ) + export type TreasuryFinancialAccountsResourceInboundAchToggleSettings = + z.infer< + typeof TreasuryFinancialAccountsResourceInboundAchToggleSettingsSchema + > + + /** Toggle settings for enabling/disabling an outbound ACH specific feature */ + export const TreasuryFinancialAccountsResourceOutboundAchToggleSettingsSchema = + z + .object({ + /** Whether the FinancialAccount should have the Feature. */ + requested: z + .boolean() + .describe('Whether the FinancialAccount should have the Feature.'), + /** Whether the Feature is operational. */ + status: z + .enum(['active', 'pending', 'restricted']) + .describe('Whether the Feature is operational.'), + /** Additional details; includes at least one entry when the status is not `active`. */ + status_details: z + .array( + TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsSchema + ) + .describe( + 'Additional details; includes at least one entry when the status is not `active`.' + ) + }) + .describe( + 'Toggle settings for enabling/disabling an outbound ACH specific feature' + ) + export type TreasuryFinancialAccountsResourceOutboundAchToggleSettings = + z.infer< + typeof TreasuryFinancialAccountsResourceOutboundAchToggleSettingsSchema + > + + /** FinancialAddresses contain identifying information that resolves to a FinancialAccount. */ + export const TreasuryFinancialAccountsResourceFinancialAddressSchema = z + .object({ + aba: TreasuryFinancialAccountsResourceAbaRecordSchema.optional(), + /** The list of networks that the address supports */ + supported_networks: z + .array(z.enum(['ach', 'us_domestic_wire'])) + .describe('The list of networks that the address supports') + .optional(), + /** The type of financial address */ + type: z.literal('aba').describe('The type of financial address') + }) + .describe( + 'FinancialAddresses contain identifying information that resolves to a FinancialAccount.' + ) + export type TreasuryFinancialAccountsResourceFinancialAddress = z.infer< + typeof TreasuryFinancialAccountsResourceFinancialAddressSchema + > + + export const TreasuryFinancialAccountsResourceStatusDetailsSchema = z.object({ + /** Details related to the closure of this FinancialAccount */ + closed: + TreasuryFinancialAccountsResourceClosedStatusDetailsSchema.nullable() + .describe('Details related to the closure of this FinancialAccount') + .optional() + }) + export type TreasuryFinancialAccountsResourceStatusDetails = z.infer< + typeof TreasuryFinancialAccountsResourceStatusDetailsSchema + > + + export const LegalEntityCompanyVerificationDocumentSchema = z.object({ + /** The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ + back: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.' + ) + .optional(), + /** A user-displayable string describing the verification state of this document. */ + details: z + .string() + .max(5000) + .nullable() + .describe( + 'A user-displayable string describing the verification state of this document.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ + front: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.' + ) + .optional() + }) + export type LegalEntityCompanyVerificationDocument = z.infer< + typeof LegalEntityCompanyVerificationDocumentSchema + > + + /** + * 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 CouponSchema = z + .object({ + /** Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: z + .number() + .int() + .nullable() + .describe( + 'Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.' + ) + .optional(), + applies_to: CouponAppliesToSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .record(CouponCurrencyOptionSchema) + .describe( + '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).' + ) + .optional(), + /** One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. */ + duration: z + .enum(['forever', 'once', 'repeating']) + .describe( + 'One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.' + ), + /** If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. */ + duration_in_months: z + .number() + .int() + .nullable() + .describe( + 'If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. */ + max_redemptions: z + .number() + .int() + .nullable() + .describe( + 'Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Name of the coupon displayed to customers on for instance invoices or receipts. */ + name: z + .string() + .max(5000) + .nullable() + .describe( + 'Name of the coupon displayed to customers on for instance invoices or receipts.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('coupon') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .number() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Date after which the coupon can no longer be redeemed. */ + redeem_by: z + .number() + .int() + .nullable() + .describe('Date after which the coupon can no longer be redeemed.') + .optional(), + /** Number of times this coupon has been applied to a customer. */ + times_redeemed: z + .number() + .int() + .describe( + 'Number of times this coupon has been applied to a customer.' + ), + /** Taking account of the above properties, whether this coupon can still be applied to a customer. */ + valid: z + .boolean() + .describe( + 'Taking account of the above properties, whether this coupon can still be applied to a customer.' + ) + }) + .describe( + 'A coupon contains information about a percent-off or amount-off discount you\nmight 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),\n[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 Coupon = z.infer + + export const CustomerAcceptanceSchema = z.object({ + /** The time that the customer accepts the mandate. */ + accepted_at: z + .number() + .int() + .nullable() + .describe('The time that the customer accepts the mandate.') + .optional(), + offline: OfflineAcceptanceSchema.optional(), + online: OnlineAcceptanceSchema.optional(), + /** The mandate includes the type of customer acceptance information, such as: `online` or `offline`. */ + type: z + .enum(['offline', 'online']) + .describe( + 'The mandate includes the type of customer acceptance information, such as: `online` or `offline`.' + ) + }) + export type CustomerAcceptance = z.infer + + export const SetupAttemptPaymentMethodDetailsCardWalletSchema = z.object({ + apple_pay: PaymentMethodDetailsCardWalletApplePaySchema.optional(), + google_pay: PaymentMethodDetailsCardWalletGooglePaySchema.optional(), + /** 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: z + .enum(['apple_pay', 'google_pay', 'link']) + .describe( + '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.' + ) + }) + export type SetupAttemptPaymentMethodDetailsCardWallet = z.infer< + typeof SetupAttemptPaymentMethodDetailsCardWalletSchema + > + + export const RefundNextActionSchema = z.object({ + display_details: RefundNextActionDisplayDetailsSchema.optional(), + /** Type of the next action to perform. */ + type: z.string().max(5000).describe('Type of the next action to perform.') + }) + export type RefundNextAction = z.infer + + export const DisputeEnhancedEligibilitySchema = z.object({ + visa_compelling_evidence_3: + DisputeEnhancedEligibilityVisaCompellingEvidence3Schema.optional(), + visa_compliance: DisputeEnhancedEligibilityVisaComplianceSchema.optional() + }) + export type DisputeEnhancedEligibility = z.infer< + typeof DisputeEnhancedEligibilitySchema + > + + export const IssuingCardholderIdDocumentSchema = z.object({ + /** 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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.' + ) + .optional() + }) + export type IssuingCardholderIdDocument = z.infer< + typeof IssuingCardholderIdDocumentSchema + > + + export const IssuingCardWalletsSchema = z.object({ + apple_pay: IssuingCardApplePaySchema, + google_pay: IssuingCardGooglePaySchema, + /** Unique identifier for a card used with digital wallets */ + primary_account_identifier: z + .string() + .max(5000) + .nullable() + .describe('Unique identifier for a card used with digital wallets') + .optional() + }) + export type IssuingCardWallets = z.infer + + export const IssuingDisputeCanceledEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Date when order was canceled. */ + canceled_at: z + .number() + .int() + .nullable() + .describe('Date when order was canceled.') + .optional(), + /** Whether the cardholder was provided with a cancellation policy. */ + cancellation_policy_provided: z + .boolean() + .nullable() + .describe( + 'Whether the cardholder was provided with a cancellation policy.' + ) + .optional(), + /** Reason for canceling the order. */ + cancellation_reason: z + .string() + .max(5000) + .nullable() + .describe('Reason for canceling the order.') + .optional(), + /** Date when the cardholder expected to receive the product. */ + expected_at: z + .number() + .int() + .nullable() + .describe('Date when the cardholder expected to receive the product.') + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional(), + /** Description of the merchandise or service that was purchased. */ + product_description: z + .string() + .max(5000) + .nullable() + .describe('Description of the merchandise or service that was purchased.') + .optional(), + /** Whether the product was a merchandise or service. */ + product_type: z + .enum(['merchandise', 'service']) + .nullable() + .describe('Whether the product was a merchandise or service.') + .optional(), + /** Result of cardholder's attempt to return the product. */ + return_status: z + .enum(['merchant_rejected', 'successful']) + .nullable() + .describe("Result of cardholder's attempt to return the product.") + .optional(), + /** Date when the product was returned or attempted to be returned. */ + returned_at: z + .number() + .int() + .nullable() + .describe( + 'Date when the product was returned or attempted to be returned.' + ) + .optional() + }) + export type IssuingDisputeCanceledEvidence = z.infer< + typeof IssuingDisputeCanceledEvidenceSchema + > + + export const IssuingDisputeDuplicateEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + export type IssuingDisputeDuplicateEvidence = z.infer< + typeof IssuingDisputeDuplicateEvidenceSchema + > + + export const IssuingDisputeFraudulentEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional() + }) + export type IssuingDisputeFraudulentEvidence = z.infer< + typeof IssuingDisputeFraudulentEvidenceSchema + > + + export const IssuingDisputeMerchandiseNotAsDescribedEvidenceSchema = z.object( + { + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional(), + /** Date when the product was received. */ + received_at: z + .number() + .int() + .nullable() + .describe('Date when the product was received.') + .optional(), + /** Description of the cardholder's attempt to return the product. */ + return_description: z + .string() + .max(5000) + .nullable() + .describe( + "Description of the cardholder's attempt to return the product." + ) + .optional(), + /** Result of cardholder's attempt to return the product. */ + return_status: z + .enum(['merchant_rejected', 'successful']) + .nullable() + .describe("Result of cardholder's attempt to return the product.") + .optional(), + /** Date when the product was returned or attempted to be returned. */ + returned_at: z + .number() + .int() + .nullable() + .describe( + 'Date when the product was returned or attempted to be returned.' + ) + .optional() + } + ) + export type IssuingDisputeMerchandiseNotAsDescribedEvidence = z.infer< + typeof IssuingDisputeMerchandiseNotAsDescribedEvidenceSchema + > + + export const IssuingDisputeNoValidAuthorizationEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional() + }) + export type IssuingDisputeNoValidAuthorizationEvidence = z.infer< + typeof IssuingDisputeNoValidAuthorizationEvidenceSchema + > + + export const IssuingDisputeNotReceivedEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Date when the cardholder expected to receive the product. */ + expected_at: z + .number() + .int() + .nullable() + .describe('Date when the cardholder expected to receive the product.') + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional(), + /** Description of the merchandise or service that was purchased. */ + product_description: z + .string() + .max(5000) + .nullable() + .describe('Description of the merchandise or service that was purchased.') + .optional(), + /** Whether the product was a merchandise or service. */ + product_type: z + .enum(['merchandise', 'service']) + .nullable() + .describe('Whether the product was a merchandise or service.') + .optional() + }) + export type IssuingDisputeNotReceivedEvidence = z.infer< + typeof IssuingDisputeNotReceivedEvidenceSchema + > + + export const IssuingDisputeOtherEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional(), + /** Description of the merchandise or service that was purchased. */ + product_description: z + .string() + .max(5000) + .nullable() + .describe('Description of the merchandise or service that was purchased.') + .optional(), + /** Whether the product was a merchandise or service. */ + product_type: z + .enum(['merchandise', 'service']) + .nullable() + .describe('Whether the product was a merchandise or service.') + .optional() + }) + export type IssuingDisputeOtherEvidence = z.infer< + typeof IssuingDisputeOtherEvidenceSchema + > + + export const IssuingDisputeServiceNotAsDescribedEvidenceSchema = z.object({ + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.' + ) + .optional(), + /** Date when order was canceled. */ + canceled_at: z + .number() + .int() + .nullable() + .describe('Date when order was canceled.') + .optional(), + /** Reason for canceling the order. */ + cancellation_reason: z + .string() + .max(5000) + .nullable() + .describe('Reason for canceling the order.') + .optional(), + /** Explanation of why the cardholder is disputing this transaction. */ + explanation: z + .string() + .max(5000) + .nullable() + .describe( + 'Explanation of why the cardholder is disputing this transaction.' + ) + .optional(), + /** Date when the product was received. */ + received_at: z + .number() + .int() + .nullable() + .describe('Date when the product was received.') + .optional() + }) + export type IssuingDisputeServiceNotAsDescribedEvidence = z.infer< + typeof IssuingDisputeServiceNotAsDescribedEvidenceSchema + > + + export const IssuingAuthorizationVerificationDataSchema = z.object({ + /** Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. */ + address_line1_check: z + .enum(['match', 'mismatch', 'not_provided']) + .describe( + 'Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.' + ), + /** Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. */ + address_postal_code_check: z + .enum(['match', 'mismatch', 'not_provided']) + .describe( + 'Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.' + ), + /** The exemption applied to this authorization. */ + authentication_exemption: + IssuingAuthorizationAuthenticationExemptionSchema.nullable() + .describe('The exemption applied to this authorization.') + .optional(), + /** Whether the cardholder provided a CVC and if it matched Stripe’s record. */ + cvc_check: z + .enum(['match', 'mismatch', 'not_provided']) + .describe( + 'Whether the cardholder provided a CVC and if it matched Stripe’s record.' + ), + /** Whether the cardholder provided an expiry date and if it matched Stripe’s record. */ + expiry_check: z + .enum(['match', 'mismatch', 'not_provided']) + .describe( + 'Whether the cardholder provided an expiry date and if it matched Stripe’s record.' + ), + /** The postal code submitted as part of the authorization used for postal code verification. */ + postal_code: z + .string() + .max(5000) + .nullable() + .describe( + 'The postal code submitted as part of the authorization used for postal code verification.' + ) + .optional(), + /** 3D Secure details. */ + three_d_secure: IssuingAuthorizationThreeDSecureSchema.nullable() + .describe('3D Secure details.') + .optional() + }) + export type IssuingAuthorizationVerificationData = z.infer< + typeof IssuingAuthorizationVerificationDataSchema + > + + export const PaymentMethodDetailsAmazonPaySchema = z.object({ + funding: AmazonPayUnderlyingPaymentMethodFundingDetailsSchema.optional() + }) + export type PaymentMethodDetailsAmazonPay = z.infer< + typeof PaymentMethodDetailsAmazonPaySchema + > + + export const PaymentMethodDetailsKlarnaSchema = z.object({ + /** The payer details for this transaction. */ + payer_details: KlarnaPayerDetailsSchema.nullable() + .describe('The payer details for this transaction.') + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The Klarna payment method used for this transaction.\nCan be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'Preferred language of the Klarna authorization page that the customer is redirected to.\nCan 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`' + ) + .optional() + }) + export type PaymentMethodDetailsKlarna = z.infer< + typeof PaymentMethodDetailsKlarnaSchema + > + + export const PaymentMethodDetailsRevolutPaySchema = z.object({ + funding: RevolutPayUnderlyingPaymentMethodFundingDetailsSchema.optional() + }) + export type PaymentMethodDetailsRevolutPay = z.infer< + typeof PaymentMethodDetailsRevolutPaySchema + > + + export const CurrencyOptionSchema = z.object({ + /** When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount: CustomUnitAmountSchema.nullable() + .describe( + 'When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.' + ) + .optional(), + /** 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: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers: z + .array(PriceTierSchema) + .describe( + 'Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + '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`.' + ) + .optional() + }) + export type CurrencyOption = z.infer + + export const InvoicePaymentMethodOptionsCustomerBalanceSchema = z.object({ + bank_transfer: + InvoicePaymentMethodOptionsCustomerBalanceBankTransferSchema.optional(), + /** The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. */ + funding_type: z + .literal('bank_transfer') + .nullable() + .describe( + 'The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.' + ) + .optional() + }) + export type InvoicePaymentMethodOptionsCustomerBalance = z.infer< + typeof InvoicePaymentMethodOptionsCustomerBalanceSchema + > + + export const InvoicePaymentMethodOptionsUsBankAccountSchema = z.object({ + financial_connections: + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsSchema.optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type InvoicePaymentMethodOptionsUsBankAccount = z.infer< + typeof InvoicePaymentMethodOptionsUsBankAccountSchema + > + + /** + * 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 const TestHelpersTestClockSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Time at which this clock is scheduled to auto delete. */ + deletes_after: z + .number() + .int() + .describe('Time at which this clock is scheduled to auto delete.'), + /** Time at which all objects belonging to this clock are frozen. */ + frozen_time: z + .number() + .int() + .describe( + 'Time at which all objects belonging to this clock are frozen.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The custom name supplied at creation. */ + name: z + .string() + .max(5000) + .nullable() + .describe('The custom name supplied at creation.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('test_helpers.test_clock') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The status of the Test Clock. */ + status: z + .enum(['advancing', 'internal_failure', 'ready']) + .describe('The status of the Test Clock.'), + status_details: BillingClocksResourceStatusDetailsStatusDetailsSchema + }) + .describe( + 'A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects 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,\nyou 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 TestHelpersTestClock = z.infer + + export const BillingCreditGrantsResourceApplicabilityConfigSchema = z.object({ + scope: BillingCreditGrantsResourceScopeSchema + }) + export type BillingCreditGrantsResourceApplicabilityConfig = z.infer< + typeof BillingCreditGrantsResourceApplicabilityConfigSchema + > + + export const InvoiceTaxAmountSchema = z.object({ + /** The amount, in cents (or local equivalent), of the tax. */ + amount: z + .number() + .int() + .describe('The amount, in cents (or local equivalent), of the tax.'), + /** Whether this tax amount is inclusive or exclusive. */ + inclusive: z + .boolean() + .describe('Whether this tax amount is inclusive or exclusive.'), + /** The tax rate that was applied to get this tax amount. */ + tax_rate: z + .union([z.string().max(5000), TaxRateSchema]) + .describe('The tax rate that was applied to get this tax amount.'), + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The amount on which tax is calculated, in cents (or local equivalent). */ + taxable_amount: z + .number() + .int() + .nullable() + .describe( + 'The amount on which tax is calculated, in cents (or local equivalent).' + ) + .optional() + }) + export type InvoiceTaxAmount = z.infer + + export const LineItemsTaxAmountSchema = z.object({ + /** Amount of tax applied for this rate. */ + amount: z.number().int().describe('Amount of tax applied for this rate.'), + rate: TaxRateSchema, + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The amount on which tax is calculated, in cents (or local equivalent). */ + taxable_amount: z + .number() + .int() + .nullable() + .describe( + 'The amount on which tax is calculated, in cents (or local equivalent).' + ) + .optional() + }) + export type LineItemsTaxAmount = z.infer + + export const PaymentMethodOptionsCustomerBalanceSchema = z.object({ + bank_transfer: + PaymentMethodOptionsCustomerBalanceBankTransferSchema.optional(), + /** The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. */ + funding_type: z + .literal('bank_transfer') + .nullable() + .describe( + 'The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type PaymentMethodOptionsCustomerBalance = z.infer< + typeof PaymentMethodOptionsCustomerBalanceSchema + > + + export const PaymentIntentProcessingSchema = z.object({ + card: PaymentIntentCardProcessingSchema.optional(), + /** Type of the payment method for which payment is in `processing` state, one of `card`. */ + type: z + .literal('card') + .describe( + 'Type of the payment method for which payment is in `processing` state, one of `card`.' + ) + }) + export type PaymentIntentProcessing = z.infer< + typeof PaymentIntentProcessingSchema + > + + export const AccountFutureRequirementsSchema = z.object({ + /** Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives: z + .array(AccountRequirementsAlternativeSchema) + .nullable() + .describe( + 'Fields that are due and can be satisfied by providing the corresponding alternative fields instead.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** This is typed as an enum for consistency with `requirements.disabled_reason`. */ + disabled_reason: z + .enum([ + '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' + ]) + .nullable() + .describe( + 'This is typed as an enum for consistency with `requirements.disabled_reason`.' + ) + .optional(), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .nullable() + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ) + .optional(), + /** Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. */ + eventually_due: z + .array(z.string().max(5000)) + .nullable() + .describe( + 'Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + "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`." + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type AccountFutureRequirements = z.infer< + typeof AccountFutureRequirementsSchema + > + + export const PersonFutureRequirementsSchema = z.object({ + /** Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives: z + .array(AccountRequirementsAlternativeSchema) + .nullable() + .describe( + 'Fields that are due and can be satisfied by providing the corresponding alternative fields instead.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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`." + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ) + }) + export type PersonFutureRequirements = z.infer< + typeof PersonFutureRequirementsSchema + > + + export const PersonRequirementsSchema = z.object({ + /** Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives: z + .array(AccountRequirementsAlternativeSchema) + .nullable() + .describe( + 'Fields that are due and can be satisfied by providing the corresponding alternative fields instead.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account." + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ) + }) + export type PersonRequirements = z.infer + + export const LegalEntityPersonVerificationDocumentSchema = z.object({ + /** 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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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".' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.' + ) + .optional() + }) + export type LegalEntityPersonVerificationDocument = z.infer< + typeof LegalEntityPersonVerificationDocumentSchema + > + + export const AccountRequirementsSchema = z.object({ + /** Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives: z + .array(AccountRequirementsAlternativeSchema) + .nullable() + .describe( + 'Fields that are due and can be satisfied by providing the corresponding alternative fields instead.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + 'If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).' + ) + .optional(), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .nullable() + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. */ + past_due: z + .array(z.string().max(5000)) + .nullable() + .describe( + "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account." + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .nullable() + .describe( + "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." + ) + .optional() + }) + export type AccountRequirements = z.infer + + export const AccountBrandingSettingsSchema = z.object({ + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + "(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." + ) + .optional(), + /** A CSS hex color value representing the primary branding color for this account */ + primary_color: z + .string() + .max(5000) + .nullable() + .describe( + 'A CSS hex color value representing the primary branding color for this account' + ) + .optional(), + /** A CSS hex color value representing the secondary branding color for this account */ + secondary_color: z + .string() + .max(5000) + .nullable() + .describe( + 'A CSS hex color value representing the secondary branding color for this account' + ) + .optional() + }) + export type AccountBrandingSettings = z.infer< + typeof AccountBrandingSettingsSchema + > + + export const DeletedExternalAccountSchema = z.union([ + DeletedBankAccountSchema, + DeletedCardSchema + ]) + export type DeletedExternalAccount = z.infer< + typeof DeletedExternalAccountSchema + > + + export const AccountCapabilityFutureRequirementsSchema = z.object({ + /** Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives: z + .array(AccountRequirementsAlternativeSchema) + .nullable() + .describe( + 'Fields that are due and can be satisfied by providing the corresponding alternative fields instead.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .describe( + '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.' + ), + /** 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: z + .enum([ + 'other', + 'paused.inactivity', + 'pending.onboarding', + 'pending.review', + 'platform_disabled', + 'platform_paused', + 'rejected.inactivity', + 'rejected.other', + 'rejected.unsupported_business', + 'requirements.fields_needed' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ), + /** Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. */ + eventually_due: z + .array(z.string().max(5000)) + .describe( + 'Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.' + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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`." + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ) + }) + export type AccountCapabilityFutureRequirements = z.infer< + typeof AccountCapabilityFutureRequirementsSchema + > + + export const AccountCapabilityRequirementsSchema = z.object({ + /** Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives: z + .array(AccountRequirementsAlternativeSchema) + .nullable() + .describe( + 'Fields that are due and can be satisfied by providing the corresponding alternative fields instead.' + ) + .optional(), + /** Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. */ + current_deadline: z + .number() + .int() + .nullable() + .describe( + 'Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.' + ) + .optional(), + /** 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: z + .array(z.string().max(5000)) + .describe( + '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.' + ), + /** Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). */ + disabled_reason: z + .enum([ + 'other', + 'paused.inactivity', + 'pending.onboarding', + 'pending.review', + 'platform_disabled', + 'platform_paused', + 'rejected.inactivity', + 'rejected.other', + 'rejected.unsupported_business', + 'requirements.fields_needed' + ]) + .nullable() + .describe( + 'Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).' + ) + .optional(), + /** Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: z + .array(AccountRequirementsErrorSchema) + .describe( + 'Fields that are `currently_due` and need to be collected again because validation or verification failed.' + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + '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.' + ), + /** Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. */ + past_due: z + .array(z.string().max(5000)) + .describe( + "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account." + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + "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." + ) + }) + export type AccountCapabilityRequirements = z.infer< + typeof AccountCapabilityRequirementsSchema + > + + export const BalanceAmountNetSchema = z.object({ + /** Balance amount. */ + amount: z.number().int().describe('Balance amount.'), + /** 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: z + .string() + .describe( + '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).' + ), + /** Breakdown of balance by destination. */ + net_available: z + .array(BalanceNetAvailableSchema) + .describe('Breakdown of balance by destination.') + .optional(), + source_types: BalanceAmountBySourceTypeSchema.optional() + }) + export type BalanceAmountNet = z.infer + + export const BalanceDetailSchema = z.object({ + /** Funds that are available for use. */ + available: z + .array(BalanceAmountSchema) + .describe('Funds that are available for use.') + }) + export type BalanceDetail = z.infer + + export const CreditBalanceSchema = z.object({ + available_balance: BillingCreditGrantsResourceAmountSchema, + ledger_balance: BillingCreditGrantsResourceAmountSchema + }) + export type CreditBalance = z.infer + + export const PortalFlowsFlowAfterCompletionSchema = z.object({ + /** Configuration when `after_completion.type=hosted_confirmation`. */ + hosted_confirmation: + PortalFlowsAfterCompletionHostedConfirmationSchema.nullable() + .describe( + 'Configuration when `after_completion.type=hosted_confirmation`.' + ) + .optional(), + /** Configuration when `after_completion.type=redirect`. */ + redirect: PortalFlowsAfterCompletionRedirectSchema.nullable() + .describe('Configuration when `after_completion.type=redirect`.') + .optional(), + /** The specified type of behavior after the flow is completed. */ + type: z + .enum(['hosted_confirmation', 'portal_homepage', 'redirect']) + .describe('The specified type of behavior after the flow is completed.') + }) + export type PortalFlowsFlowAfterCompletion = z.infer< + typeof PortalFlowsFlowAfterCompletionSchema + > + + export const PortalFlowsFlowSubscriptionCancelSchema = z.object({ + /** Specify a retention strategy to be used in the cancellation flow. */ + retention: PortalFlowsRetentionSchema.nullable() + .describe( + 'Specify a retention strategy to be used in the cancellation flow.' + ) + .optional(), + /** The ID of the subscription to be canceled. */ + subscription: z + .string() + .max(5000) + .describe('The ID of the subscription to be canceled.') + }) + export type PortalFlowsFlowSubscriptionCancel = z.infer< + typeof PortalFlowsFlowSubscriptionCancelSchema + > + + export const PortalFlowsFlowSubscriptionUpdateConfirmSchema = z.object({ + /** The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. */ + discounts: z + .array(PortalFlowsSubscriptionUpdateConfirmDiscountSchema) + .nullable() + .describe( + 'The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.' + ) + .optional(), + /** 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: z + .array(PortalFlowsSubscriptionUpdateConfirmItemSchema) + .describe( + '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.' + ), + /** The ID of the subscription to be updated. */ + subscription: z + .string() + .max(5000) + .describe('The ID of the subscription to be updated.') + }) + export type PortalFlowsFlowSubscriptionUpdateConfirm = z.infer< + typeof PortalFlowsFlowSubscriptionUpdateConfirmSchema + > + + export const PaymentPagesCheckoutSessionCollectedInformationSchema = z.object( + { + /** Shipping information for this Checkout Session. */ + shipping_details: ShippingSchema.nullable() + .describe('Shipping information for this Checkout Session.') + .optional() + } + ) + export type PaymentPagesCheckoutSessionCollectedInformation = z.infer< + typeof PaymentPagesCheckoutSessionCollectedInformationSchema + > + + export const PaymentPagesCheckoutSessionCustomerDetailsSchema = z.object({ + /** The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + address: AddressSchema.nullable() + .describe( + "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022." + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.' + ) + .optional(), + /** The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + name: z + .string() + .max(5000) + .nullable() + .describe( + "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022." + ) + .optional(), + /** The customer's phone number after a completed Checkout Session. */ + phone: z + .string() + .max(5000) + .nullable() + .describe( + "The customer's phone number after a completed Checkout Session." + ) + .optional(), + /** The customer’s tax exempt status after a completed Checkout Session. */ + tax_exempt: z + .enum(['exempt', 'none', 'reverse']) + .nullable() + .describe( + 'The customer’s tax exempt status after a completed Checkout Session.' + ) + .optional(), + /** The customer’s tax IDs after a completed Checkout Session. */ + tax_ids: z + .array(PaymentPagesCheckoutSessionTaxIdSchema) + .nullable() + .describe('The customer’s tax IDs after a completed Checkout Session.') + .optional() + }) + export type PaymentPagesCheckoutSessionCustomerDetails = z.infer< + typeof PaymentPagesCheckoutSessionCustomerDetailsSchema + > + + export const PaymentLinksResourceAfterCompletionSchema = z.object({ + hosted_confirmation: + PaymentLinksResourceCompletionBehaviorConfirmationPageSchema.optional(), + redirect: PaymentLinksResourceCompletionBehaviorRedirectSchema.optional(), + /** The specified behavior after the purchase is complete. */ + type: z + .enum(['hosted_confirmation', 'redirect']) + .describe('The specified behavior after the purchase is complete.') + }) + export type PaymentLinksResourceAfterCompletion = z.infer< + typeof PaymentLinksResourceAfterCompletionSchema + > + + export const CheckoutCardPaymentMethodOptionsSchema = z.object({ + installments: CheckoutCardInstallmentsOptionsSchema.optional(), + /** Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. */ + request_extended_authorization: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.' + ) + .optional(), + /** Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. */ + request_incremental_authorization: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.' + ) + .optional(), + /** Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. */ + request_multicapture: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.' + ) + .optional(), + /** Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. */ + request_overcapture: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.' + ) + .optional(), + /** 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: z + .enum(['any', 'automatic', 'challenge']) + .describe( + '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.' + ), + restrictions: + PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictionsSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional() + }) + export type CheckoutCardPaymentMethodOptions = z.infer< + typeof CheckoutCardPaymentMethodOptionsSchema + > + + export const CheckoutCustomerBalancePaymentMethodOptionsSchema = z.object({ + bank_transfer: + CheckoutCustomerBalanceBankTransferPaymentMethodOptionsSchema.optional(), + /** The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. */ + funding_type: z + .literal('bank_transfer') + .nullable() + .describe( + 'The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.' + ) + .optional(), + /** + * 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: z + .literal('none') + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional() + }) + export type CheckoutCustomerBalancePaymentMethodOptions = z.infer< + typeof CheckoutCustomerBalancePaymentMethodOptionsSchema + > + + export const CheckoutUsBankAccountPaymentMethodOptionsSchema = z.object({ + financial_connections: LinkedAccountOptionsUsBankAccountSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant']) + .describe('Bank account verification method.') + .optional() + }) + export type CheckoutUsBankAccountPaymentMethodOptions = z.infer< + typeof CheckoutUsBankAccountPaymentMethodOptionsSchema + > + + /** The delivery of a specified quantity of carbon for an order. */ + export const ClimateRemovalsOrderDeliveriesSchema = z + .object({ + /** Time at which the delivery occurred. Measured in seconds since the Unix epoch. */ + delivered_at: z + .number() + .int() + .describe( + 'Time at which the delivery occurred. Measured in seconds since the Unix epoch.' + ), + /** Specific location of this delivery. */ + location: ClimateRemovalsLocationSchema.nullable() + .describe('Specific location of this delivery.') + .optional(), + /** Quantity of carbon removal supplied by this delivery. */ + metric_tons: z + .string() + .max(5000) + .describe('Quantity of carbon removal supplied by this delivery.'), + /** Once retired, a URL to the registry entry for the tons from this delivery. */ + registry_url: z + .string() + .max(5000) + .nullable() + .describe( + 'Once retired, a URL to the registry entry for the tons from this delivery.' + ) + .optional(), + supplier: ClimateSupplierSchema + }) + .describe('The delivery of a specified quantity of carbon for an order.') + export type ClimateRemovalsOrderDeliveries = z.infer< + typeof ClimateRemovalsOrderDeliveriesSchema + > + + /** Data used for generating a Mandate. */ + export const ConfirmationTokensResourceMandateDataSchema = z + .object({ + customer_acceptance: + ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceSchema + }) + .describe('Data used for generating a Mandate.') + export type ConfirmationTokensResourceMandateData = z.infer< + typeof ConfirmationTokensResourceMandateDataSchema + > + + /** + * 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 const CountrySpecSchema = z + .object({ + /** The default currency for this country. This applies to both payment methods and bank accounts. */ + default_currency: z + .string() + .max(5000) + .describe( + 'The default currency for this country. This applies to both payment methods and bank accounts.' + ), + /** Unique identifier for the object. Represented as the ISO country code for this country. */ + id: z + .string() + .max(5000) + .describe( + 'Unique identifier for the object. Represented as the ISO country code for this country.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('country_spec') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Currencies that can be accepted in the specific country (for transfers). */ + supported_bank_account_currencies: z + .record(z.array(z.string().max(5000))) + .describe( + 'Currencies that can be accepted in the specific country (for transfers).' + ), + /** Currencies that can be accepted in the specified country (for payments). */ + supported_payment_currencies: z + .array(z.string().max(5000)) + .describe( + 'Currencies that can be accepted in the specified country (for payments).' + ), + /** 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: z + .array(z.string().max(5000)) + .describe( + '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).' + ), + /** Countries that can accept transfers from the specified country. */ + supported_transfer_countries: z + .array(z.string().max(5000)) + .describe( + 'Countries that can accept transfers from the specified country.' + ), + verification_fields: CountrySpecVerificationFieldsSchema + }) + .describe( + "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information)." + ) + export type CountrySpec = z.infer + + export const CreditNoteTaxAmountSchema = z.object({ + /** The amount, in cents (or local equivalent), of the tax. */ + amount: z + .number() + .int() + .describe('The amount, in cents (or local equivalent), of the tax.'), + /** Whether this tax amount is inclusive or exclusive. */ + inclusive: z + .boolean() + .describe('Whether this tax amount is inclusive or exclusive.'), + /** The tax rate that was applied to get this tax amount. */ + tax_rate: z + .union([z.string().max(5000), TaxRateSchema]) + .describe('The tax rate that was applied to get this tax amount.'), + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The amount on which tax is calculated, in cents (or local equivalent). */ + taxable_amount: z + .number() + .int() + .nullable() + .describe( + 'The amount on which tax is calculated, in cents (or local equivalent).' + ) + .optional() + }) + export type CreditNoteTaxAmount = z.infer + + export const DeletedPaymentSourceSchema = z.union([ + DeletedBankAccountSchema, + DeletedCardSchema + ]) + export type DeletedPaymentSource = z.infer + + /** + * Events are our way of letting you know when something interesting happens in + * your account. When an interesting event occurs, we create a new `Event` + * object. For example, when a charge succeeds, we create a `charge.succeeded` + * event, and when an invoice payment attempt fails, we create an + * `invoice.payment_failed` event. Certain API requests might create multiple + * events. For example, if you create a new subscription for a + * customer, you receive both a `customer.subscription.created` event and a + * `charge.succeeded` event. + * + * Events occur when the state of another API resource changes. The event's data + * field embeds the resource's state at the time of the change. For + * example, a `charge.succeeded` event contains a charge, and an + * `invoice.payment_failed` event contains an invoice. + * + * As with other API resources, you can use endpoints to retrieve an + * [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) + * from the API. We also have a separate + * [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the + * `Event` objects directly to an endpoint on your server. You can manage + * webhooks in your + * [account settings](https://dashboard.stripe.com/account/webhooks). Learn how + * to [listen for events](https://docs.stripe.com/webhooks) + * so that your integration can automatically trigger reactions. + * + * When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications + * that occur in connected accounts. For these events, there's an + * additional `account` attribute in the received `Event` object. + * + * We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) + * for 30 days. + */ + export const EventSchema = z + .object({ + /** The connected account that originates the event. */ + account: z + .string() + .max(5000) + .describe('The connected account that originates the event.') + .optional(), + /** The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. */ + api_version: z + .string() + .max(5000) + .nullable() + .describe( + 'The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + data: NotificationEventDataSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('event') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. */ + pending_webhooks: z + .number() + .int() + .describe( + "Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify." + ), + /** Information on the API request that triggers the event. */ + request: NotificationEventRequestSchema.nullable() + .describe('Information on the API request that triggers the event.') + .optional(), + /** Description of the event (for example, `invoice.created` or `charge.refunded`). */ + type: z + .string() + .max(5000) + .describe( + 'Description of the event (for example, `invoice.created` or `charge.refunded`).' + ) + }) + .describe( + "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent, and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Certain API requests might create multiple\nevents. For example, if you create a new subscription for a\ncustomer, you receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The event's data\nfield embeds the resource's state at the time of the change. For\nexample, a `charge.succeeded` event contains a charge, and an\n`invoice.payment_failed` event contains an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. You can manage\nwebhooks in your\n[account settings](https://dashboard.stripe.com/account/webhooks). Learn how\nto [listen for events](https://docs.stripe.com/webhooks)\nso that your integration can automatically trigger reactions.\n\nWhen using [Connect](https://docs.stripe.com/connect), you can also receive event notifications\nthat occur in connected accounts. For these events, there's an\nadditional `account` attribute in the received `Event` object.\n\nWe only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)\nfor 30 days." + ) + export type Event = z.infer + + export const BankConnectionsResourceBalanceSchema = z.object({ + /** The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. */ + as_of: z + .number() + .int() + .describe( + 'The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.' + ), + cash: BankConnectionsResourceBalanceApiResourceCashBalanceSchema.optional(), + credit: + BankConnectionsResourceBalanceApiResourceCreditBalanceSchema.optional(), + /** + * 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: z + .record(z.number().int()) + .describe( + 'The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach 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.' + ), + /** The `type` of the balance. An additional hash is included on the balance with a name matching this value. */ + type: z + .enum(['cash', 'credit']) + .describe( + 'The `type` of the balance. An additional hash is included on the balance with a name matching this value.' + ) + }) + export type BankConnectionsResourceBalance = z.infer< + typeof BankConnectionsResourceBalanceSchema + > + + /** Result from an id_number check */ + export const GelatoIdNumberReportSchema = z + .object({ + /** Date of birth. */ + dob: GelatoDataIdNumberReportDateSchema.nullable() + .describe('Date of birth.') + .optional(), + /** Details on the verification error. Present when status is `unverified`. */ + error: GelatoIdNumberReportErrorSchema.nullable() + .describe( + 'Details on the verification error. Present when status is `unverified`.' + ) + .optional(), + /** First name. */ + first_name: z + .string() + .max(5000) + .nullable() + .describe('First name.') + .optional(), + /** ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. */ + id_number: z + .string() + .max(5000) + .nullable() + .describe( + 'ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.' + ) + .optional(), + /** Type of ID number. */ + id_number_type: z + .enum(['br_cpf', 'sg_nric', 'us_ssn']) + .nullable() + .describe('Type of ID number.') + .optional(), + /** Last name. */ + last_name: z + .string() + .max(5000) + .nullable() + .describe('Last name.') + .optional(), + /** Status of this `id_number` check. */ + status: z + .enum(['unverified', 'verified']) + .describe('Status of this `id_number` check.') + }) + .describe('Result from an id_number check') + export type GelatoIdNumberReport = z.infer + + export const GelatoVerificationReportOptionsSchema = z.object({ + document: GelatoReportDocumentOptionsSchema.optional(), + id_number: GelatoReportIdNumberOptionsSchema.optional() + }) + export type GelatoVerificationReportOptions = z.infer< + typeof GelatoVerificationReportOptionsSchema + > + + export const GelatoVerifiedOutputsSchema = z.object({ + /** The user's verified address. */ + address: AddressSchema.nullable() + .describe("The user's verified address.") + .optional(), + /** The user’s verified date of birth. */ + dob: GelatoDataVerifiedOutputsDateSchema.nullable() + .describe('The user’s verified date of birth.') + .optional(), + /** The user's verified email address */ + email: z + .string() + .max(5000) + .nullable() + .describe("The user's verified email address") + .optional(), + /** The user's verified first name. */ + first_name: z + .string() + .max(5000) + .nullable() + .describe("The user's verified first name.") + .optional(), + /** The user's verified id number. */ + id_number: z + .string() + .max(5000) + .nullable() + .describe("The user's verified id number.") + .optional(), + /** The user's verified id number type. */ + id_number_type: z + .enum(['br_cpf', 'sg_nric', 'us_ssn']) + .nullable() + .describe("The user's verified id number type.") + .optional(), + /** The user's verified last name. */ + last_name: z + .string() + .max(5000) + .nullable() + .describe("The user's verified last name.") + .optional(), + /** The user's verified phone number */ + phone: z + .string() + .max(5000) + .nullable() + .describe("The user's verified phone number") + .optional() + }) + export type GelatoVerifiedOutputs = z.infer< + typeof GelatoVerifiedOutputsSchema + > + + /** + * 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 const PaymentMethodConfigurationSchema = z + .object({ + acss_debit: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** Whether the configuration can be used for new payments. */ + active: z + .boolean() + .describe('Whether the configuration can be used for new payments.'), + affirm: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + afterpay_clearpay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + alipay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + alma: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + amazon_pay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + apple_pay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** For child configs, the Connect application associated with the configuration. */ + application: z + .string() + .max(5000) + .nullable() + .describe( + 'For child configs, the Connect application associated with the configuration.' + ) + .optional(), + au_becs_debit: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + bacs_debit: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + bancontact: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + blik: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + boleto: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + card: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + cartes_bancaires: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + cashapp: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + customer_balance: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + eps: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + fpx: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + giropay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + google_pay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + grabpay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + ideal: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** The default configuration is used whenever a payment method configuration is not specified. */ + is_default: z + .boolean() + .describe( + 'The default configuration is used whenever a payment method configuration is not specified.' + ), + jcb: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + klarna: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + konbini: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + link: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + mobilepay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + multibanco: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** The configuration's name. */ + name: z.string().max(5000).describe("The configuration's name."), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('payment_method_configuration') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + oxxo: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + p24: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + /** For child configs, the configuration's parent configuration. */ + parent: z + .string() + .max(5000) + .nullable() + .describe( + "For child configs, the configuration's parent configuration." + ) + .optional(), + pay_by_bank: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + paynow: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + paypal: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + promptpay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + revolut_pay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + sepa_debit: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + sofort: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + swish: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + twint: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + us_bank_account: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + wechat_pay: + PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional(), + zip: PaymentMethodConfigResourcePaymentMethodPropertiesSchema.optional() + }) + .describe( + "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.\n\nThere are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges):\n\n**Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect.\n\n**Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter.\n\nChild 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.\n\nRelated guides:\n- [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations)\n- [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)\n- [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations)" + ) + export type PaymentMethodConfiguration = z.infer< + typeof PaymentMethodConfigurationSchema + > + + /** + * 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 PaymentMethodDomainSchema = z + .object({ + amazon_pay: PaymentMethodDomainResourcePaymentMethodStatusSchema, + apple_pay: PaymentMethodDomainResourcePaymentMethodStatusSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The domain name that this payment method domain object represents. */ + domain_name: z + .string() + .max(5000) + .describe( + 'The domain name that this payment method domain object represents.' + ), + /** 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: z + .boolean() + .describe( + '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.' + ), + google_pay: PaymentMethodDomainResourcePaymentMethodStatusSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + link: PaymentMethodDomainResourcePaymentMethodStatusSchema, + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('payment_method_domain') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + paypal: PaymentMethodDomainResourcePaymentMethodStatusSchema + }) + .describe( + 'A payment method domain represents a web domain that you have registered with Stripe.\nStripe Elements use registered payment method domains to control where certain payment methods are shown.\n\nRelated guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).' + ) + export type PaymentMethodDomain = z.infer + + export const TaxProductResourceCustomerDetailsSchema = z.object({ + /** The customer's postal address (for example, home or business location). */ + address: TaxProductResourcePostalAddressSchema.nullable() + .describe( + "The customer's postal address (for example, home or business location)." + ) + .optional(), + /** The type of customer address provided. */ + address_source: z + .enum(['billing', 'shipping']) + .nullable() + .describe('The type of customer address provided.') + .optional(), + /** The customer's IP address (IPv4 or IPv6). */ + ip_address: z + .string() + .max(5000) + .nullable() + .describe("The customer's IP address (IPv4 or IPv6).") + .optional(), + /** The customer's tax IDs (for example, EU VAT numbers). */ + tax_ids: z + .array(TaxProductResourceCustomerDetailsResourceTaxIdSchema) + .describe("The customer's tax IDs (for example, EU VAT numbers)."), + /** The taxability override used for taxation. */ + taxability_override: z + .enum(['customer_exempt', 'none', 'reverse_charge']) + .describe('The taxability override used for taxation.') + }) + export type TaxProductResourceCustomerDetails = z.infer< + typeof TaxProductResourceCustomerDetailsSchema + > + + export const TaxProductResourceLineItemTaxBreakdownSchema = z.object({ + /** The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: z + .number() + .int() + .describe( + 'The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + jurisdiction: TaxProductResourceJurisdictionSchema, + /** Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). */ + sourcing: z + .enum(['destination', 'origin']) + .describe( + "Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address)." + ), + /** 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: TaxProductResourceLineItemTaxRateDetailsSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .enum([ + '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' + ]) + .describe( + '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.' + ), + /** The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + taxable_amount: z + .number() + .int() + .describe( + 'The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + }) + export type TaxProductResourceLineItemTaxBreakdown = z.infer< + typeof TaxProductResourceLineItemTaxBreakdownSchema + > + + export const TaxProductResourceTaxBreakdownSchema = z.object({ + /** The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: z + .number() + .int() + .describe( + 'The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** Specifies whether the tax amount is included in the line item amount. */ + inclusive: z + .boolean() + .describe( + 'Specifies whether the tax amount is included in the line item amount.' + ), + tax_rate_details: TaxProductResourceTaxRateDetailsSchema, + /** 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: z + .enum([ + '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' + ]) + .describe( + '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.' + ), + /** The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + taxable_amount: z + .number() + .int() + .describe( + 'The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + }) + export type TaxProductResourceTaxBreakdown = z.infer< + typeof TaxProductResourceTaxBreakdownSchema + > + + export const TaxProductResourceTaxSettingsStatusDetailsSchema = z.object({ + active: + TaxProductResourceTaxSettingsStatusDetailsResourceActiveSchema.optional(), + pending: + TaxProductResourceTaxSettingsStatusDetailsResourcePendingSchema.optional() + }) + export type TaxProductResourceTaxSettingsStatusDetails = z.infer< + typeof TaxProductResourceTaxSettingsStatusDetailsSchema + > + + export const TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigSchema = + z.object({ + /** A File ID representing an image you would like displayed on the reader. */ + splashscreen: z + .union([z.string().max(5000), FileSchema]) + .describe( + 'A File ID representing an image you would like displayed on the reader.' + ) + .optional() + }) + export type TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig = + z.infer< + typeof TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigSchema + > + + /** Represents a reader action to set the reader display */ + export const TerminalReaderReaderResourceSetReaderDisplayActionSchema = z + .object({ + /** Cart object to be displayed by the reader. */ + cart: TerminalReaderReaderResourceCartSchema.nullable() + .describe('Cart object to be displayed by the reader.') + .optional(), + /** Type of information to be displayed by the reader. */ + type: z + .literal('cart') + .describe('Type of information to be displayed by the reader.') + }) + .describe('Represents a reader action to set the reader display') + export type TerminalReaderReaderResourceSetReaderDisplayAction = z.infer< + typeof TerminalReaderReaderResourceSetReaderDisplayActionSchema + > + + export const TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsSchema = + z.object({ + ach: TreasuryOutboundPaymentsResourceAchTrackingDetailsSchema.optional(), + /** The US bank account network used to send funds. */ + type: z + .enum(['ach', 'us_domestic_wire']) + .describe('The US bank account network used to send funds.'), + us_domestic_wire: + TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetailsSchema.optional() + }) + export type TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetails = + z.infer< + typeof TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsSchema + > + + export const TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsSchema = + z.object({ + ach: TreasuryOutboundTransfersResourceAchTrackingDetailsSchema.optional(), + /** The US bank account network used to send funds. */ + type: z + .enum(['ach', 'us_domestic_wire']) + .describe('The US bank account network used to send funds.'), + us_domestic_wire: + TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetailsSchema.optional() + }) + export type TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetails = + z.infer< + typeof TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsSchema + > + + /** Settings related to Financial Addresses features on a Financial Account */ + export const TreasuryFinancialAccountsResourceFinancialAddressesFeaturesSchema = + z + .object({ + aba: TreasuryFinancialAccountsResourceAbaToggleSettingsSchema.optional() + }) + .describe( + 'Settings related to Financial Addresses features on a Financial Account' + ) + export type TreasuryFinancialAccountsResourceFinancialAddressesFeatures = + z.infer< + typeof TreasuryFinancialAccountsResourceFinancialAddressesFeaturesSchema + > + + /** InboundTransfers contains inbound transfers features for a FinancialAccount. */ + export const TreasuryFinancialAccountsResourceInboundTransfersSchema = z + .object({ + ach: TreasuryFinancialAccountsResourceInboundAchToggleSettingsSchema.optional() + }) + .describe( + 'InboundTransfers contains inbound transfers features for a FinancialAccount.' + ) + export type TreasuryFinancialAccountsResourceInboundTransfers = z.infer< + typeof TreasuryFinancialAccountsResourceInboundTransfersSchema + > + + export const AccountBusinessProfileSchema = z.object({ + /** The applicant's gross annual revenue for its preceding fiscal year. */ + annual_revenue: AccountAnnualRevenueSchema.nullable() + .describe( + "The applicant's gross annual revenue for its preceding fiscal year." + ) + .optional(), + /** An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. */ + estimated_worker_count: z + .number() + .int() + .nullable() + .describe( + 'An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.' + ) + .optional(), + /** [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: z + .string() + .max(5000) + .nullable() + .describe( + '[The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.' + ) + .optional(), + monthly_estimated_revenue: AccountMonthlyEstimatedRevenueSchema.optional(), + /** The customer-facing business name. */ + name: z + .string() + .max(5000) + .nullable() + .describe('The customer-facing business name.') + .optional(), + /** 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: z + .string() + .max(40_000) + .nullable() + .describe( + "Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes." + ) + .optional(), + /** A publicly available mailing address for sending support issues to. */ + support_address: AddressSchema.nullable() + .describe( + 'A publicly available mailing address for sending support issues to.' + ) + .optional(), + /** A publicly available email address for sending support issues to. */ + support_email: z + .string() + .max(5000) + .nullable() + .describe( + 'A publicly available email address for sending support issues to.' + ) + .optional(), + /** A publicly available phone number to call with support issues. */ + support_phone: z + .string() + .max(5000) + .nullable() + .describe( + 'A publicly available phone number to call with support issues.' + ) + .optional(), + /** A publicly available website for handling support issues. */ + support_url: z + .string() + .max(5000) + .nullable() + .describe('A publicly available website for handling support issues.') + .optional(), + /** The business's publicly available website. */ + url: z + .string() + .max(5000) + .nullable() + .describe("The business's publicly available website.") + .optional() + }) + export type AccountBusinessProfile = z.infer< + typeof AccountBusinessProfileSchema + > + + export const LegalEntityCompanyVerificationSchema = z.object({ + document: LegalEntityCompanyVerificationDocumentSchema + }) + export type LegalEntityCompanyVerification = z.infer< + typeof LegalEntityCompanyVerificationSchema + > + + export const AccountUnificationAccountControllerSchema = z.object({ + fees: AccountUnificationAccountControllerFeesSchema.optional(), + /** `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: z + .boolean() + .describe( + '`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.' + ) + .optional(), + losses: AccountUnificationAccountControllerLossesSchema.optional(), + /** A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. */ + requirement_collection: z + .enum(['application', 'stripe']) + .describe( + 'A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.' + ) + .optional(), + stripe_dashboard: + AccountUnificationAccountControllerStripeDashboardSchema.optional(), + /** The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. */ + type: z + .enum(['account', 'application']) + .describe( + 'The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.' + ) + }) + export type AccountUnificationAccountController = z.infer< + typeof AccountUnificationAccountControllerSchema + > + + export const SourceOrderSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** The email address of the customer placing the order. */ + email: z + .string() + .max(5000) + .describe('The email address of the customer placing the order.') + .optional(), + /** List of items constituting the order. */ + items: z + .array(SourceOrderItemSchema) + .nullable() + .describe('List of items constituting the order.') + .optional(), + shipping: ShippingSchema.optional() + }) + export type SourceOrder = z.infer + + export const PaymentMethodDetailsCardPresentSchema = z.object({ + /** The authorized amount */ + amount_authorized: z + .number() + .int() + .nullable() + .describe('The authorized amount') + .optional(), + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ) + .optional(), + /** The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. */ + brand_product: z + .string() + .max(5000) + .nullable() + .describe( + 'The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.' + ) + .optional(), + /** When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ + capture_before: z + .number() + .int() + .describe( + 'When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** A high-level description of the type of cards issued in this range. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'A high-level description of the type of cards issued in this range.' + ) + .optional(), + /** Authorization response cryptogram. */ + emv_auth_data: z + .string() + .max(5000) + .nullable() + .describe('Authorization response cryptogram.') + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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).' + ), + /** The name of the card's issuing bank. */ + issuer: z + .string() + .max(5000) + .nullable() + .describe("The name of the card's issuing bank.") + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Details about payments collected offline. */ + offline: PaymentMethodDetailsCardPresentOfflineSchema.nullable() + .describe('Details about payments collected offline.') + .optional(), + /** Defines whether the authorized amount can be over-captured or not */ + overcapture_supported: z + .boolean() + .describe( + 'Defines whether the authorized amount can be over-captured or not' + ), + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + preferred_locales: z + .array(z.string().max(5000)) + .nullable() + .describe( + 'EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.' + ) + .optional(), + /** How card details were read in this transaction. */ + read_method: z + .enum([ + 'contact_emv', + 'contactless_emv', + 'contactless_magstripe_mode', + 'magnetic_stripe_fallback', + 'magnetic_stripe_track2' + ]) + .nullable() + .describe('How card details were read in this transaction.') + .optional(), + /** A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt: PaymentMethodDetailsCardPresentReceiptSchema.nullable() + .describe( + 'A collection of fields required to be displayed on receipts. Only required for EMV transactions.' + ) + .optional(), + wallet: + PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletSchema.optional() + }) + export type PaymentMethodDetailsCardPresent = z.infer< + typeof PaymentMethodDetailsCardPresentSchema + > + + export const DisputeEnhancedEvidenceVisaCompellingEvidence3Schema = z.object({ + /** Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. */ + disputed_transaction: + DisputeVisaCompellingEvidence3DisputedTransactionSchema.nullable() + .describe( + 'Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.' + ) + .optional(), + /** List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. */ + prior_undisputed_transactions: z + .array(DisputeVisaCompellingEvidence3PriorUndisputedTransactionSchema) + .describe( + 'List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.' + ) + }) + export type DisputeEnhancedEvidenceVisaCompellingEvidence3 = z.infer< + typeof DisputeEnhancedEvidenceVisaCompellingEvidence3Schema + > + + export const DisputeEvidenceDetailsSchema = z.object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + "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." + ) + .optional(), + enhanced_eligibility: DisputeEnhancedEligibilitySchema, + /** Whether evidence has been staged for this dispute. */ + has_evidence: z + .boolean() + .describe('Whether evidence has been staged for this dispute.'), + /** 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: z + .boolean() + .describe( + '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.' + ), + /** The number of times evidence has been submitted. Typically, you may only submit evidence once. */ + submission_count: z + .number() + .int() + .describe( + 'The number of times evidence has been submitted. Typically, you may only submit evidence once.' + ) + }) + export type DisputeEvidenceDetails = z.infer< + typeof DisputeEvidenceDetailsSchema + > + + export const IssuingCardholderVerificationSchema = z.object({ + /** An identifying document, either a passport or local ID card. */ + document: IssuingCardholderIdDocumentSchema.nullable() + .describe('An identifying document, either a passport or local ID card.') + .optional() + }) + export type IssuingCardholderVerification = z.infer< + typeof IssuingCardholderVerificationSchema + > + + export const IssuingCardShippingSchema = z.object({ + address: AddressSchema, + /** Address validation details for the shipment. */ + address_validation: IssuingCardShippingAddressValidationSchema.nullable() + .describe('Address validation details for the shipment.') + .optional(), + /** The delivery company that shipped a card. */ + carrier: z + .enum(['dhl', 'fedex', 'royal_mail', 'usps']) + .nullable() + .describe('The delivery company that shipped a card.') + .optional(), + /** Additional information that may be required for clearing customs. */ + customs: IssuingCardShippingCustomsSchema.nullable() + .describe( + 'Additional information that may be required for clearing customs.' + ) + .optional(), + /** A unix timestamp representing a best estimate of when the card will be delivered. */ + eta: z + .number() + .int() + .nullable() + .describe( + 'A unix timestamp representing a best estimate of when the card will be delivered.' + ) + .optional(), + /** Recipient name. */ + name: z.string().max(5000).describe('Recipient name.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Shipment service, such as `standard` or `express`. */ + service: z + .enum(['express', 'priority', 'standard']) + .describe('Shipment service, such as `standard` or `express`.'), + /** The delivery status of the card. */ + status: z + .enum([ + 'canceled', + 'delivered', + 'failure', + 'pending', + 'returned', + 'shipped', + 'submitted' + ]) + .nullable() + .describe('The delivery status of the card.') + .optional(), + /** A tracking number for a card shipment. */ + tracking_number: z + .string() + .max(5000) + .nullable() + .describe('A tracking number for a card shipment.') + .optional(), + /** A link to the shipping carrier's site where you can view detailed information about a card shipment. */ + tracking_url: z + .string() + .max(5000) + .nullable() + .describe( + "A link to the shipping carrier's site where you can view detailed information about a card shipment." + ) + .optional(), + /** Packaging options. */ + type: z.enum(['bulk', 'individual']).describe('Packaging options.') + }) + export type IssuingCardShipping = z.infer + + export const IssuingAuthorizationFleetReportedBreakdownSchema = z.object({ + /** Breakdown of fuel portion of the purchase. */ + fuel: IssuingAuthorizationFleetFuelPriceDataSchema.nullable() + .describe('Breakdown of fuel portion of the purchase.') + .optional(), + /** Breakdown of non-fuel portion of the purchase. */ + non_fuel: IssuingAuthorizationFleetNonFuelPriceDataSchema.nullable() + .describe('Breakdown of non-fuel portion of the purchase.') + .optional(), + /** Information about tax included in this transaction. */ + tax: IssuingAuthorizationFleetTaxDataSchema.nullable() + .describe('Information about tax included in this transaction.') + .optional() + }) + export type IssuingAuthorizationFleetReportedBreakdown = z.infer< + typeof IssuingAuthorizationFleetReportedBreakdownSchema + > + + export const IssuingTransactionFleetReportedBreakdownSchema = z.object({ + /** Breakdown of fuel portion of the purchase. */ + fuel: IssuingTransactionFleetFuelPriceDataSchema.nullable() + .describe('Breakdown of fuel portion of the purchase.') + .optional(), + /** Breakdown of non-fuel portion of the purchase. */ + non_fuel: IssuingTransactionFleetNonFuelPriceDataSchema.nullable() + .describe('Breakdown of non-fuel portion of the purchase.') + .optional(), + /** Information about tax included in this transaction. */ + tax: IssuingTransactionFleetTaxDataSchema.nullable() + .describe('Information about tax included in this transaction.') + .optional() + }) + export type IssuingTransactionFleetReportedBreakdown = z.infer< + typeof IssuingTransactionFleetReportedBreakdownSchema + > + + export const SetupIntentPaymentMethodOptionsUsBankAccountSchema = z.object({ + financial_connections: LinkedAccountOptionsUsBankAccountSchema.optional(), + mandate_options: + PaymentMethodOptionsUsBankAccountMandateOptionsSchema.optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type SetupIntentPaymentMethodOptionsUsBankAccount = z.infer< + typeof SetupIntentPaymentMethodOptionsUsBankAccountSchema + > + + export const PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema = + z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .enum(['manual', 'manual_preferred']) + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + installments: PaymentFlowsInstallmentOptionsSchema.optional(), + /** 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: z + .boolean() + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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).' + ) + .optional(), + routing: PaymentMethodOptionsCardPresentRoutingSchema.optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type PaymentIntentTypeSpecificPaymentMethodOptionsClient = z.infer< + typeof PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + > + + export const PaymentIntentPaymentMethodOptionsCardSchema = z.object({ + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .literal('manual') + .describe( + "Controls when the funds will be captured from the customer's account." + ) + .optional(), + /** + * Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments: PaymentMethodOptionsCardInstallmentsSchema.nullable() + .describe( + 'Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).' + ) + .optional(), + /** Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options: PaymentMethodOptionsCardMandateOptionsSchema.nullable() + .describe( + 'Configuration options for setting up an eMandate for cards issued in India.' + ) + .optional(), + /** 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: z + .enum([ + 'amex', + 'cartes_bancaires', + 'diners', + 'discover', + 'eftpos_au', + 'girocard', + 'interac', + 'jcb', + 'link', + 'mastercard', + 'unionpay', + 'unknown', + 'visa' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. */ + request_extended_authorization: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.' + ) + .optional(), + /** Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. */ + request_incremental_authorization: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.' + ) + .optional(), + /** Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. */ + request_multicapture: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.' + ) + .optional(), + /** Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. */ + request_overcapture: z + .enum(['if_available', 'never']) + .describe( + 'Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.' + ) + .optional(), + /** 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: z + .enum(['any', 'automatic', 'challenge']) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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).' + ) + .optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional() + }) + export type PaymentIntentPaymentMethodOptionsCard = z.infer< + typeof PaymentIntentPaymentMethodOptionsCardSchema + > + + export const PaymentIntentPaymentMethodOptionsUsBankAccountSchema = z.object({ + financial_connections: LinkedAccountOptionsUsBankAccountSchema.optional(), + mandate_options: + PaymentMethodOptionsUsBankAccountMandateOptionsSchema.optional(), + /** Preferred transaction settlement speed */ + preferred_settlement_speed: z + .enum(['fastest', 'standard']) + .describe('Preferred transaction settlement speed') + .optional(), + /** + * 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: z + .enum(['none', 'off_session', 'on_session']) + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional(), + /** Bank account verification method. */ + verification_method: z + .enum(['automatic', 'instant', 'microdeposits']) + .describe('Bank account verification method.') + .optional() + }) + export type PaymentIntentPaymentMethodOptionsUsBankAccount = z.infer< + typeof PaymentIntentPaymentMethodOptionsUsBankAccountSchema + > + + export const PaymentMethodCardPresentSchema = z.object({ + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ) + .optional(), + /** The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. */ + brand_product: z + .string() + .max(5000) + .nullable() + .describe( + 'The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** A high-level description of the type of cards issued in this range. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'A high-level description of the type of cards issued in this range.' + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + /** The name of the card's issuing bank. */ + issuer: z + .string() + .max(5000) + .nullable() + .describe("The name of the card's issuing bank.") + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional(), + /** Contains information about card networks that can be used to process the payment. */ + networks: PaymentMethodCardPresentNetworksSchema.nullable() + .describe( + 'Contains information about card networks that can be used to process the payment.' + ) + .optional(), + /** Details about payment methods collected offline. */ + offline: PaymentMethodDetailsCardPresentOfflineSchema.nullable() + .describe('Details about payment methods collected offline.') + .optional(), + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + preferred_locales: z + .array(z.string().max(5000)) + .nullable() + .describe( + 'EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.' + ) + .optional(), + /** How card details were read in this transaction. */ + read_method: z + .enum([ + 'contact_emv', + 'contactless_emv', + 'contactless_magstripe_mode', + 'magnetic_stripe_fallback', + 'magnetic_stripe_track2' + ]) + .nullable() + .describe('How card details were read in this transaction.') + .optional(), + wallet: + PaymentFlowsPrivatePaymentMethodsCardPresentCommonWalletSchema.optional() + }) + export type PaymentMethodCardPresent = z.infer< + typeof PaymentMethodCardPresentSchema + > + + export const PaymentMethodUsBankAccountSchema = z.object({ + /** Account holder type: individual or company. */ + account_holder_type: z + .enum(['company', 'individual']) + .nullable() + .describe('Account holder type: individual or company.') + .optional(), + /** Account type: checkings or savings. Defaults to checking if omitted. */ + account_type: z + .enum(['checking', 'savings']) + .nullable() + .describe( + 'Account type: checkings or savings. Defaults to checking if omitted.' + ) + .optional(), + /** The name of the bank. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('The name of the bank.') + .optional(), + /** The ID of the Financial Connections Account used to create the payment method. */ + financial_connections_account: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of the Financial Connections Account used to create the payment method.' + ) + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** Contains information about US bank account networks that can be used. */ + networks: UsBankAccountNetworksSchema.nullable() + .describe( + 'Contains information about US bank account networks that can be used.' + ) + .optional(), + /** Routing number of the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('Routing number of the bank account.') + .optional(), + /** Contains information about the future reusability of this PaymentMethod. */ + status_details: PaymentMethodUsBankAccountStatusDetailsSchema.nullable() + .describe( + 'Contains information about the future reusability of this PaymentMethod.' + ) + .optional() + }) + export type PaymentMethodUsBankAccount = z.infer< + typeof PaymentMethodUsBankAccountSchema + > + + export const LegalEntityPersonVerificationSchema = z.object({ + /** A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ + additional_document: LegalEntityPersonVerificationDocumentSchema.nullable() + .describe( + 'A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.' + ) + .optional(), + /** A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ + details: z + .string() + .max(5000) + .nullable() + .describe( + 'A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified".' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + document: LegalEntityPersonVerificationDocumentSchema.optional(), + /** The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ + status: z + .string() + .max(5000) + .describe( + 'The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.' + ) + }) + export type LegalEntityPersonVerification = z.infer< + typeof LegalEntityPersonVerificationSchema + > + + export const PortalSubscriptionUpdateSchema = z.object({ + /** The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. */ + default_allowed_updates: z + .array(z.enum(['price', 'promotion_code', 'quantity'])) + .describe( + 'The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.' + ), + /** Whether the feature is enabled. */ + enabled: z.boolean().describe('Whether the feature is enabled.'), + /** The list of up to 10 products that support subscription updates. */ + products: z + .array(PortalSubscriptionUpdateProductSchema) + .nullable() + .describe( + 'The list of up to 10 products that support subscription updates.' + ) + .optional(), + /** 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: z + .enum(['always_invoice', 'create_prorations', 'none']) + .describe( + "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." + ), + schedule_at_period_end: PortalResourceScheduleUpdateAtPeriodEndSchema + }) + export type PortalSubscriptionUpdate = z.infer< + typeof PortalSubscriptionUpdateSchema + > + + /** + * 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 const ClimateProductSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Current prices for a metric ton of carbon removal in a currency's smallest unit. */ + current_prices_per_metric_ton: z + .record(ClimateRemovalsProductsPriceSchema) + .describe( + "Current prices for a metric ton of carbon removal in a currency's smallest unit." + ), + /** The year in which the carbon removal is expected to be delivered. */ + delivery_year: z + .number() + .int() + .nullable() + .describe( + 'The year in which the carbon removal is expected to be delivered.' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .describe( + 'Unique identifier for the object. For convenience, Climate product IDs are human-readable strings\nthat start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)\nfor a list of available carbon removal products.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The quantity of metric tons available for reservation. */ + metric_tons_available: z + .string() + .describe('The quantity of metric tons available for reservation.'), + /** The Climate product's name. */ + name: z.string().max(5000).describe("The Climate product's name."), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('climate.product') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The carbon removal suppliers that fulfill orders for this Climate product. */ + suppliers: z + .array(ClimateSupplierSchema) + .describe( + 'The carbon removal suppliers that fulfill orders for this Climate product.' + ) + }) + .describe( + 'A Climate product represents a type of carbon removal unit available for reservation.\nYou can retrieve it to see the current price and availability.' + ) + export type ClimateProduct = z.infer + + /** + * 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 ReportingReportRunSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** + * If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ + error: z + .string() + .max(5000) + .nullable() + .describe( + 'If something should go wrong during the run, a message about the failure (populated when\n `status=failed`).' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** `true` if the report is run on live mode data and `false` if it is run on test mode data. */ + livemode: z + .boolean() + .describe( + '`true` if the report is run on live mode data and `false` if it is run on test mode data.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('reporting.report_run') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + parameters: FinancialReportingFinanceReportRunRunParametersSchema, + /** The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. */ + report_type: z + .string() + .max(5000) + .describe( + 'The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`.' + ), + /** + * The file object representing the result of the report run (populated when + * `status=succeeded`). + */ + result: FileSchema.nullable() + .describe( + 'The file object representing the result of the report run (populated when\n `status=succeeded`).' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .describe( + 'Status of this report run. This will be `pending` when the run is initially created.\n When the run finishes, this will be set to `succeeded` and the `result` field will be populated.\n Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.' + ), + /** + * Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ + succeeded_at: z + .number() + .int() + .nullable() + .describe( + 'Timestamp at which this run successfully finished (populated when\n `status=succeeded`). Measured in seconds since the Unix epoch.' + ) + .optional() + }) + .describe( + 'The Report Run object represents an instance of a report type generated with\nspecific run parameters. Once the object is created, Stripe begins processing the report.\nWhen the report has finished running, it will give you a reference to a file\nwhere you can retrieve your results. For an overview, see\n[API Access to Reports](https://stripe.com/docs/reporting/statements/api).\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).' + ) + export type ReportingReportRun = z.infer + + /** + * 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 const ScheduledQueryRunSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** When the query was run, Sigma contained a snapshot of your Stripe data at this time. */ + data_load_time: z + .number() + .int() + .describe( + 'When the query was run, Sigma contained a snapshot of your Stripe data at this time.' + ), + error: SigmaScheduledQueryRunErrorSchema.optional(), + /** The file object representing the results of the query. */ + file: FileSchema.nullable() + .describe('The file object representing the results of the query.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('scheduled_query_run') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Time at which the result expires and is no longer available for download. */ + result_available_until: z + .number() + .int() + .describe( + 'Time at which the result expires and is no longer available for download.' + ), + /** SQL for the query. */ + sql: z.string().max(100_000).describe('SQL for the query.'), + /** The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. */ + status: z + .string() + .max(5000) + .describe( + "The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise." + ), + /** Title of the query. */ + title: z.string().max(5000).describe('Title of the query.') + }) + .describe( + "If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results." + ) + export type ScheduledQueryRun = z.infer + + export const TaxCalculationLineItemSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_tax: z + .number() + .int() + .describe( + 'The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax.calculation_line_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The ID of an existing [Product](https://stripe.com/docs/api/products/object). */ + product: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of an existing [Product](https://stripe.com/docs/api/products/object).' + ) + .optional(), + /** The number of units of the item being purchased. For reversals, this is the quantity reversed. */ + quantity: z + .number() + .int() + .describe( + 'The number of units of the item being purchased. For reversals, this is the quantity reversed.' + ), + /** A custom identifier for this line item. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('A custom identifier for this line item.') + .optional(), + /** Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. */ + tax_behavior: z + .enum(['exclusive', 'inclusive']) + .describe( + 'Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.' + ), + /** Detailed account of taxes relevant to this line item. */ + tax_breakdown: z + .array(TaxProductResourceLineItemTaxBreakdownSchema) + .nullable() + .describe('Detailed account of taxes relevant to this line item.') + .optional(), + /** The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. */ + tax_code: z + .string() + .max(5000) + .describe( + 'The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.' + ) + }) + export type TaxCalculationLineItem = z.infer< + typeof TaxCalculationLineItemSchema + > + + export const TaxProductResourceTaxCalculationShippingCostSchema = z.object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_tax: z + .number() + .int() + .describe( + 'The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). */ + shipping_rate: z + .string() + .max(5000) + .describe( + 'The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).' + ) + .optional(), + /** Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. */ + tax_behavior: z + .enum(['exclusive', 'inclusive']) + .describe( + 'Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.' + ), + /** Detailed account of taxes relevant to shipping cost. */ + tax_breakdown: z + .array(TaxProductResourceLineItemTaxBreakdownSchema) + .describe('Detailed account of taxes relevant to shipping cost.') + .optional(), + /** The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. */ + tax_code: z + .string() + .max(5000) + .describe( + 'The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.' + ) + }) + export type TaxProductResourceTaxCalculationShippingCost = z.infer< + typeof TaxProductResourceTaxCalculationShippingCostSchema + > + + /** Settings related to Outbound Payments features on a Financial Account */ + export const TreasuryFinancialAccountsResourceOutboundPaymentsSchema = z + .object({ + ach: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsSchema.optional(), + us_domestic_wire: + TreasuryFinancialAccountsResourceToggleSettingsSchema.optional() + }) + .describe( + 'Settings related to Outbound Payments features on a Financial Account' + ) + export type TreasuryFinancialAccountsResourceOutboundPayments = z.infer< + typeof TreasuryFinancialAccountsResourceOutboundPaymentsSchema + > + + /** OutboundTransfers contains outbound transfers features for a FinancialAccount. */ + export const TreasuryFinancialAccountsResourceOutboundTransfersSchema = z + .object({ + ach: TreasuryFinancialAccountsResourceOutboundAchToggleSettingsSchema.optional(), + us_domestic_wire: + TreasuryFinancialAccountsResourceToggleSettingsSchema.optional() + }) + .describe( + 'OutboundTransfers contains outbound transfers features for a FinancialAccount.' + ) + export type TreasuryFinancialAccountsResourceOutboundTransfers = z.infer< + typeof TreasuryFinancialAccountsResourceOutboundTransfersSchema + > + + export const CardGeneratedFromPaymentMethodDetailsSchema = z.object({ + card_present: PaymentMethodDetailsCardPresentSchema.optional(), + /** The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. */ + type: z + .string() + .max(5000) + .describe( + 'The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.' + ) + }) + export type CardGeneratedFromPaymentMethodDetails = z.infer< + typeof CardGeneratedFromPaymentMethodDetailsSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferSchema = + z.object({ + eu_bank_transfer: + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferSchema.optional(), + gb_bank_transfer: + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferSchema.optional(), + jp_bank_transfer: + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferSchema.optional(), + /** The user-supplied reference field on the bank transfer. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('The user-supplied reference field on the bank transfer.') + .optional(), + /** 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: z + .enum([ + 'eu_bank_transfer', + 'gb_bank_transfer', + 'jp_bank_transfer', + 'mx_bank_transfer', + 'us_bank_transfer' + ]) + .describe( + '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`.' + ), + us_bank_transfer: + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferSchema.optional() + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferSchema + > + + export const DisputePaymentMethodDetailsSchema = z.object({ + amazon_pay: DisputePaymentMethodDetailsAmazonPaySchema.optional(), + card: DisputePaymentMethodDetailsCardSchema.optional(), + klarna: DisputePaymentMethodDetailsKlarnaSchema.optional(), + paypal: DisputePaymentMethodDetailsPaypalSchema.optional(), + /** Payment method type. */ + type: z + .enum(['amazon_pay', 'card', 'klarna', 'paypal']) + .describe('Payment method type.') + }) + export type DisputePaymentMethodDetails = z.infer< + typeof DisputePaymentMethodDetailsSchema + > + + export const SetupIntentNextActionSchema = z.object({ + cashapp_handle_redirect_or_display_qr_code: + PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeSchema.optional(), + redirect_to_url: SetupIntentNextActionRedirectToUrlSchema.optional(), + /** Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ + type: z + .string() + .max(5000) + .describe( + 'Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.' + ), + /** 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: z + .record(z.any()) + .describe( + '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.' + ) + .optional(), + verify_with_microdeposits: + SetupIntentNextActionVerifyWithMicrodepositsSchema.optional() + }) + export type SetupIntentNextAction = z.infer< + typeof SetupIntentNextActionSchema + > + + export const PaymentIntentNextActionKonbiniStoresSchema = z.object({ + /** FamilyMart instruction details. */ + familymart: PaymentIntentNextActionKonbiniFamilymartSchema.nullable() + .describe('FamilyMart instruction details.') + .optional(), + /** Lawson instruction details. */ + lawson: PaymentIntentNextActionKonbiniLawsonSchema.nullable() + .describe('Lawson instruction details.') + .optional(), + /** Ministop instruction details. */ + ministop: PaymentIntentNextActionKonbiniMinistopSchema.nullable() + .describe('Ministop instruction details.') + .optional(), + /** Seicomart instruction details. */ + seicomart: PaymentIntentNextActionKonbiniSeicomartSchema.nullable() + .describe('Seicomart instruction details.') + .optional() + }) + export type PaymentIntentNextActionKonbiniStores = z.infer< + typeof PaymentIntentNextActionKonbiniStoresSchema + > + + /** + * 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 const BillingMeterSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + customer_mapping: BillingMeterResourceCustomerMappingSettingsSchema, + default_aggregation: BillingMeterResourceAggregationSettingsSchema, + /** The meter's name. */ + display_name: z.string().max(5000).describe("The meter's name."), + /** The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. */ + event_name: z + .string() + .max(5000) + .describe( + 'The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.' + ), + /** The time window to pre-aggregate meter events for, if any. */ + event_time_window: z + .enum(['day', 'hour']) + .nullable() + .describe('The time window to pre-aggregate meter events for, if any.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.meter') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The meter's status. */ + status: z.enum(['active', 'inactive']).describe("The meter's status."), + status_transitions: + BillingMeterResourceBillingMeterStatusTransitionsSchema, + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: z + .number() + .int() + .describe( + 'Time at which the object was last updated. Measured in seconds since the Unix epoch.' + ), + value_settings: BillingMeterResourceBillingMeterValueSchema + }) + .describe( + '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.\n\nRelated guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)' + ) + export type BillingMeter = z.infer + + /** Configuration for the components supported by this Customer Session. */ + export const CustomerSessionResourceComponentsSchema = z + .object({ + buy_button: CustomerSessionResourceComponentsResourceBuyButtonSchema, + payment_element: + CustomerSessionResourceComponentsResourcePaymentElementSchema, + pricing_table: CustomerSessionResourceComponentsResourcePricingTableSchema + }) + .describe( + 'Configuration for the components supported by this Customer Session.' + ) + export type CustomerSessionResourceComponents = z.infer< + typeof CustomerSessionResourceComponentsSchema + > + + /** + * 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 ForwardingRequestSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('forwarding.request') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. */ + payment_method: z + .string() + .max(5000) + .describe( + 'The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.' + ), + /** The field kinds to be replaced in the forwarded request. */ + replacements: z + .array( + z.enum([ + 'card_cvc', + 'card_expiry', + 'card_number', + 'cardholder_name', + 'request_signature' + ]) + ) + .describe('The field kinds to be replaced in the forwarded request.'), + /** Context about the request from Stripe's servers to the destination endpoint. */ + request_context: ForwardedRequestContextSchema.nullable() + .describe( + "Context about the request from Stripe's servers to the destination endpoint." + ) + .optional(), + /** The request that was sent to the destination endpoint. We redact any sensitive fields. */ + request_details: ForwardedRequestDetailsSchema.nullable() + .describe( + 'The request that was sent to the destination endpoint. We redact any sensitive fields.' + ) + .optional(), + /** The response that the destination endpoint returned to us. We redact any sensitive fields. */ + response_details: ForwardedResponseDetailsSchema.nullable() + .describe( + 'The response that the destination endpoint returned to us. We redact any sensitive fields.' + ) + .optional(), + /** The destination URL for the forwarded request. Must be supported by the config. */ + url: z + .string() + .max(5000) + .nullable() + .describe( + 'The destination URL for the forwarded request. Must be supported by the config.' + ) + .optional() + }) + .describe( + 'Instructs Stripe to make a request on your behalf using the destination URL. The destination URL\nis activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials\nprovided during onboarding, and injects card details from the payment_method into the request.\n\nStripe redacts all sensitive fields and headers, including authentication credentials and card numbers,\nbefore storing the request and response data in the forwarding Request object, which are subject to a\n30-day retention period.\n\nYou can provide a Stripe idempotency key to make sure that requests with the same key result in only one\noutbound request. The Stripe idempotency key provided should be unique and different from any idempotency\nkeys provided on the underlying third-party request.\n\nForwarding Requests are synchronous requests that return a response or time out according to\nStripe’s limits.\n\nRelated guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding).' + ) + export type ForwardingRequest = z.infer + + export const GelatoVerificationSessionOptionsSchema = z.object({ + document: GelatoSessionDocumentOptionsSchema.optional(), + email: GelatoSessionEmailOptionsSchema.optional(), + id_number: GelatoSessionIdNumberOptionsSchema.optional(), + phone: GelatoSessionPhoneOptionsSchema.optional() + }) + export type GelatoVerificationSessionOptions = z.infer< + typeof GelatoVerificationSessionOptionsSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsUnitedStatesSchema = + z.object({ + local_amusement_tax: + TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxSchema.optional(), + local_lease_tax: + TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxSchema.optional(), + /** Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). */ + state: z + .string() + .max(5000) + .describe( + 'Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).' + ), + state_sales_tax: + TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxSchema.optional(), + /** Type of registration in the US. */ + type: z + .enum([ + 'local_amusement_tax', + 'local_lease_tax', + 'state_communications_tax', + 'state_retail_delivery_fee', + 'state_sales_tax' + ]) + .describe('Type of registration in the US.') + }) + export type TaxProductRegistrationsResourceCountryOptionsUnitedStates = + z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsUnitedStatesSchema + > + + export const TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsSchema = + z.object({ + /** Set when `type` is `balance`. */ + balance: z + .literal('payments') + .describe('Set when `type` is `balance`.') + .optional(), + billing_details: TreasurySharedResourceBillingDetailsSchema, + financial_account: + ReceivedPaymentMethodDetailsFinancialAccountSchema.optional(), + /** Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + issuing_card: z + .string() + .max(5000) + .describe( + 'Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.' + ) + .optional(), + /** Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. */ + type: z + .enum([ + 'balance', + 'financial_account', + 'issuing_card', + 'stripe', + 'us_bank_account' + ]) + .describe( + "Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount." + ), + us_bank_account: + TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountSchema.optional() + }) + export type TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails = + z.infer< + typeof TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsSchema + > + + export const SetupAttemptPaymentMethodDetailsCardSchema = z.object({ + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ) + .optional(), + /** Check results by Card networks on Card address and CVC at the time of authorization */ + checks: SetupAttemptPaymentMethodDetailsCardChecksSchema.nullable() + .describe( + 'Check results by Card networks on Card address and CVC at the time of authorization' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .nullable() + .describe("Two-digit number representing the card's expiration month.") + .optional(), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .nullable() + .describe("Four-digit number representing the card's expiration year.") + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** Populated if this authorization used 3D Secure authentication. */ + three_d_secure: ThreeDSecureDetailsSchema.nullable() + .describe( + 'Populated if this authorization used 3D Secure authentication.' + ) + .optional(), + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet: SetupAttemptPaymentMethodDetailsCardWalletSchema.nullable() + .describe( + 'If this Card is part of a card wallet, this contains the details of the card wallet.' + ) + .optional() + }) + export type SetupAttemptPaymentMethodDetailsCard = z.infer< + typeof SetupAttemptPaymentMethodDetailsCardSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionSchema = + z.object({ + bank_transfer: + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferSchema + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionSchema + > + + export const DisputeEnhancedEvidenceSchema = z.object({ + visa_compelling_evidence_3: + DisputeEnhancedEvidenceVisaCompellingEvidence3Schema.optional(), + visa_compliance: DisputeEnhancedEvidenceVisaComplianceSchema.optional() + }) + export type DisputeEnhancedEvidence = z.infer< + typeof DisputeEnhancedEvidenceSchema + > + + export const IssuingAuthorizationFleetDataSchema = z.object({ + /** 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: + IssuingAuthorizationFleetCardholderPromptDataSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** The type of purchase. */ + purchase_type: z + .enum([ + 'fuel_and_non_fuel_purchase', + 'fuel_purchase', + 'non_fuel_purchase' + ]) + .nullable() + .describe('The type of purchase.') + .optional(), + /** 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: + IssuingAuthorizationFleetReportedBreakdownSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** The type of fuel service. */ + service_type: z + .enum(['full_service', 'non_fuel_transaction', 'self_service']) + .nullable() + .describe('The type of fuel service.') + .optional() + }) + export type IssuingAuthorizationFleetData = z.infer< + typeof IssuingAuthorizationFleetDataSchema + > + + export const IssuingNetworkTokenNetworkDataSchema = z.object({ + device: IssuingNetworkTokenDeviceSchema.optional(), + mastercard: IssuingNetworkTokenMastercardSchema.optional(), + /** 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: z + .enum(['mastercard', 'visa']) + .describe( + '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.' + ), + visa: IssuingNetworkTokenVisaSchema.optional(), + wallet_provider: IssuingNetworkTokenWalletProviderSchema.optional() + }) + export type IssuingNetworkTokenNetworkData = z.infer< + typeof IssuingNetworkTokenNetworkDataSchema + > + + export const IssuingTransactionFleetDataSchema = z.object({ + /** Answers to prompts presented to cardholder at point of sale. */ + cardholder_prompt_data: + IssuingTransactionFleetCardholderPromptDataSchema.nullable() + .describe( + 'Answers to prompts presented to cardholder at point of sale.' + ) + .optional(), + /** The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. */ + purchase_type: z + .string() + .max(5000) + .nullable() + .describe( + 'The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.' + ) + .optional(), + /** More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. */ + reported_breakdown: + IssuingTransactionFleetReportedBreakdownSchema.nullable() + .describe( + 'More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.' + ) + .optional(), + /** The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. */ + service_type: z + .string() + .max(5000) + .nullable() + .describe( + 'The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.' + ) + .optional() + }) + export type IssuingTransactionFleetData = z.infer< + typeof IssuingTransactionFleetDataSchema + > + + /** + * 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 ShippingRateSchema = z + .object({ + /** Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active: z + .boolean() + .describe( + 'Whether the shipping rate can be used for new purchases. Defaults to `true`.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + delivery_estimate: ShippingRateDeliveryEstimateSchema.nullable() + .describe( + 'The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.' + ) + .optional(), + /** The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.' + ) + .optional(), + fixed_amount: ShippingRateFixedAmountSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('shipping_rate') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. */ + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .nullable() + .describe( + 'Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.' + ) + .optional(), + /** A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code: z + .union([z.string().max(5000), TaxCodeSchema]) + .nullable() + .describe( + 'A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.' + ) + .optional(), + /** The type of calculation to use on the shipping rate. */ + type: z + .literal('fixed_amount') + .describe('The type of calculation to use on the shipping rate.') + }) + .describe( + 'Shipping rates describe the price of shipping presented to your customers and\napplied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).' + ) + export type ShippingRate = z.infer + + export const PaymentIntentNextActionKonbiniSchema = z.object({ + /** The timestamp at which the pending Konbini payment expires. */ + expires_at: z + .number() + .int() + .describe('The timestamp at which the pending Konbini payment expires.'), + /** The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + hosted_voucher_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.' + ) + .optional(), + stores: PaymentIntentNextActionKonbiniStoresSchema + }) + export type PaymentIntentNextActionKonbini = z.infer< + typeof PaymentIntentNextActionKonbiniSchema + > + + /** + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * You can also retrieve the balance history, which contains a list of + * [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance + * (charges, payouts, and so forth). + * + * The available and pending amounts for each currency are broken down further by + * payment source types. + * + * Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + */ + export const BalanceSchema = z + .object({ + /** 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: z + .array(BalanceAmountSchema) + .describe( + '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.' + ), + /** 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: z + .array(BalanceAmountSchema) + .describe( + '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.' + ) + .optional(), + /** Funds that you can pay out using Instant Payouts. */ + instant_available: z + .array(BalanceAmountNetSchema) + .describe('Funds that you can pay out using Instant Payouts.') + .optional(), + issuing: BalanceDetailSchema.optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('balance') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .array(BalanceAmountSchema) + .describe( + "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." + ) + }) + .describe( + 'This is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.\n\nYou can also retrieve the balance history, which contains a list of\n[transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance\n(charges, payouts, and so forth).\n\nThe available and pending amounts for each currency are broken down further by\npayment source types.\n\nRelated guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)' + ) + export type Balance = z.infer + + export const PaymentPagesCheckoutSessionCustomFieldsSchema = z.object({ + dropdown: PaymentPagesCheckoutSessionCustomFieldsDropdownSchema.optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + label: PaymentPagesCheckoutSessionCustomFieldsLabelSchema, + numeric: PaymentPagesCheckoutSessionCustomFieldsNumericSchema.optional(), + /** Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. */ + optional: z + .boolean() + .describe( + 'Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.' + ), + text: PaymentPagesCheckoutSessionCustomFieldsTextSchema.optional(), + /** The type of the field. */ + type: z + .enum(['dropdown', 'numeric', 'text']) + .describe('The type of the field.') + }) + export type PaymentPagesCheckoutSessionCustomFields = z.infer< + typeof PaymentPagesCheckoutSessionCustomFieldsSchema + > + + export const PaymentLinksResourceCustomFieldsSchema = z.object({ + dropdown: PaymentLinksResourceCustomFieldsDropdownSchema.optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + label: PaymentLinksResourceCustomFieldsLabelSchema, + numeric: PaymentLinksResourceCustomFieldsNumericSchema.optional(), + /** Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. */ + optional: z + .boolean() + .describe( + 'Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.' + ), + text: PaymentLinksResourceCustomFieldsTextSchema.optional(), + /** The type of the field. */ + type: z + .enum(['dropdown', 'numeric', 'text']) + .describe('The type of the field.') + }) + export type PaymentLinksResourceCustomFields = z.infer< + typeof PaymentLinksResourceCustomFieldsSchema + > + + /** Result from a document check */ + export const GelatoDocumentReportSchema = z + .object({ + /** Address as it appears in the document. */ + address: AddressSchema.nullable() + .describe('Address as it appears in the document.') + .optional(), + /** Date of birth as it appears in the document. */ + dob: GelatoDataDocumentReportDateOfBirthSchema.nullable() + .describe('Date of birth as it appears in the document.') + .optional(), + /** Details on the verification error. Present when status is `unverified`. */ + error: GelatoDocumentReportErrorSchema.nullable() + .describe( + 'Details on the verification error. Present when status is `unverified`.' + ) + .optional(), + /** Expiration date of the document. */ + expiration_date: GelatoDataDocumentReportExpirationDateSchema.nullable() + .describe('Expiration date of the document.') + .optional(), + /** Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. */ + files: z + .array(z.string().max(5000)) + .nullable() + .describe( + 'Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.' + ) + .optional(), + /** First name as it appears in the document. */ + first_name: z + .string() + .max(5000) + .nullable() + .describe('First name as it appears in the document.') + .optional(), + /** Issued date of the document. */ + issued_date: GelatoDataDocumentReportIssuedDateSchema.nullable() + .describe('Issued date of the document.') + .optional(), + /** Issuing country of the document. */ + issuing_country: z + .string() + .max(5000) + .nullable() + .describe('Issuing country of the document.') + .optional(), + /** Last name as it appears in the document. */ + last_name: z + .string() + .max(5000) + .nullable() + .describe('Last name as it appears in the document.') + .optional(), + /** Document ID number. */ + number: z + .string() + .max(5000) + .nullable() + .describe('Document ID number.') + .optional(), + /** Status of this `document` check. */ + status: z + .enum(['unverified', 'verified']) + .describe('Status of this `document` check.'), + /** Type of the document. */ + type: z + .enum(['driving_license', 'id_card', 'passport']) + .nullable() + .describe('Type of the document.') + .optional() + }) + .describe('Result from a document check') + export type GelatoDocumentReport = z.infer + + /** + * 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 const SourceTransactionSchema = z + .object({ + ach_credit_transfer: + SourceTransactionAchCreditTransferDataSchema.optional(), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + chf_credit_transfer: + SourceTransactionChfCreditTransferDataSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + gbp_credit_transfer: + SourceTransactionGbpCreditTransferDataSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('source_transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + paper_check: SourceTransactionPaperCheckDataSchema.optional(), + sepa_credit_transfer: + SourceTransactionSepaCreditTransferDataSchema.optional(), + /** The ID of the source this transaction is attached to. */ + source: z + .string() + .max(5000) + .describe('The ID of the source this transaction is attached to.'), + /** The status of the transaction, one of `succeeded`, `pending`, or `failed`. */ + status: z + .string() + .max(5000) + .describe( + 'The status of the transaction, one of `succeeded`, `pending`, or `failed`.' + ), + /** The type of source this transaction is attached to. */ + 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' + ]) + .describe('The type of source this transaction is attached to.') + }) + .describe( + 'Some payment methods have no required amount that a customer must send.\nCustomers can be instructed to send any amount, and it can be made up of\nmultiple transactions. As such, sources can have multiple associated\ntransactions.' + ) + export type SourceTransaction = z.infer + + export const PaymentLinksResourceShippingOptionSchema = z.object({ + /** A non-negative integer in cents representing how much to charge. */ + shipping_amount: z + .number() + .int() + .describe( + 'A non-negative integer in cents representing how much to charge.' + ), + /** The ID of the Shipping Rate to use for this shipping option. */ + shipping_rate: z + .union([z.string().max(5000), ShippingRateSchema]) + .describe('The ID of the Shipping Rate to use for this shipping option.') + }) + export type PaymentLinksResourceShippingOption = z.infer< + typeof PaymentLinksResourceShippingOptionSchema + > + + export const PaymentPagesCheckoutSessionShippingOptionSchema = z.object({ + /** A non-negative integer in cents representing how much to charge. */ + shipping_amount: z + .number() + .int() + .describe( + 'A non-negative integer in cents representing how much to charge.' + ), + /** The shipping rate. */ + shipping_rate: z + .union([z.string().max(5000), ShippingRateSchema]) + .describe('The shipping rate.') + }) + export type PaymentPagesCheckoutSessionShippingOption = z.infer< + typeof PaymentPagesCheckoutSessionShippingOptionSchema + > + + /** + * 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 ClimateOrderSchema = z + .object({ + /** Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. */ + amount_fees: z + .number() + .int() + .describe( + "Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit." + ), + /** Total amount of the carbon removal in the currency's smallest unit. */ + amount_subtotal: z + .number() + .int() + .describe( + "Total amount of the carbon removal in the currency's smallest unit." + ), + /** Total amount of the order including fees in the currency's smallest unit. */ + amount_total: z + .number() + .int() + .describe( + "Total amount of the order including fees in the currency's smallest unit." + ), + beneficiary: ClimateRemovalsBeneficiarySchema.optional(), + /** Time at which the order was canceled. Measured in seconds since the Unix epoch. */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the order was canceled. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Reason for the cancellation of this order. */ + cancellation_reason: z + .enum(['expired', 'product_unavailable', 'requested']) + .nullable() + .describe('Reason for the cancellation of this order.') + .optional(), + /** For delivered orders, a URL to a delivery certificate for the order. */ + certificate: z + .string() + .max(5000) + .nullable() + .describe( + 'For delivered orders, a URL to a delivery certificate for the order.' + ) + .optional(), + /** Time at which the order was confirmed. Measured in seconds since the Unix epoch. */ + confirmed_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the order was confirmed. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. */ + currency: z + .string() + .max(5000) + .describe( + 'Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order.' + ), + /** Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. */ + delayed_at: z + .number() + .int() + .nullable() + .describe( + "Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch." + ) + .optional(), + /** Time at which the order was delivered. Measured in seconds since the Unix epoch. */ + delivered_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the order was delivered. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Details about the delivery of carbon removal for this order. */ + delivery_details: z + .array(ClimateRemovalsOrderDeliveriesSchema) + .describe( + 'Details about the delivery of carbon removal for this order.' + ), + /** The year this order is expected to be delivered. */ + expected_delivery_year: z + .number() + .int() + .describe('The year this order is expected to be delivered.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** Quantity of carbon removal that is included in this order. */ + metric_tons: z + .string() + .describe('Quantity of carbon removal that is included in this order.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('climate.order') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Unique ID for the Climate `Product` this order is purchasing. */ + product: z + .union([z.string().max(5000), ClimateProductSchema]) + .describe( + 'Unique ID for the Climate `Product` this order is purchasing.' + ), + /** Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. */ + product_substituted_at: z + .number() + .int() + .nullable() + .describe( + "Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch." + ) + .optional(), + /** The current status of this order. */ + status: z + .enum(['awaiting_funds', 'canceled', 'confirmed', 'delivered', 'open']) + .describe('The current status of this order.') + }) + .describe( + 'Orders represent your intent to purchase a particular Climate product. When you create an order, the\npayment is deducted from your merchant balance.' + ) + export type ClimateOrder = z.infer + + /** + * 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 const TaxSettingsSchema = z + .object({ + defaults: TaxProductResourceTaxSettingsDefaultsSchema, + /** The place where your business is located. */ + head_office: TaxProductResourceTaxSettingsHeadOfficeSchema.nullable() + .describe('The place where your business is located.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax.settings') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The status of the Tax `Settings`. */ + status: z + .enum(['active', 'pending']) + .describe('The status of the Tax `Settings`.'), + status_details: TaxProductResourceTaxSettingsStatusDetailsSchema + }) + .describe( + 'You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.\n\nRelated guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)' + ) + export type TaxSettings = z.infer + + export const IssuingCardholderIndividualSchema = z.object({ + /** Information related to the card_issuing program for this cardholder. */ + card_issuing: IssuingCardholderCardIssuingSchema.nullable() + .describe( + 'Information related to the card_issuing program for this cardholder.' + ) + .optional(), + /** The date of birth of this cardholder. */ + dob: IssuingCardholderIndividualDobSchema.nullable() + .describe('The date of birth of this cardholder.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Government-issued ID document for this cardholder. */ + verification: IssuingCardholderVerificationSchema.nullable() + .describe('Government-issued ID document for this cardholder.') + .optional() + }) + export type IssuingCardholderIndividual = z.infer< + typeof IssuingCardholderIndividualSchema + > + + /** A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. */ + export const IssuingPersonalizationDesignSchema = z + .object({ + /** 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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + 'The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.' + ) + .optional(), + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ + carrier_text: IssuingPersonalizationDesignCarrierTextSchema.nullable() + .describe( + 'Hash containing carrier text, for use with physical bundles that support carrier text.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. */ + lookup_key: z + .string() + .max(5000) + .nullable() + .describe( + 'A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** Friendly display name. */ + name: z + .string() + .max(5000) + .nullable() + .describe('Friendly display name.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.personalization_design') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The physical bundle object belonging to this personalization design. */ + physical_bundle: z + .union([z.string().max(5000), IssuingPhysicalBundleSchema]) + .describe( + 'The physical bundle object belonging to this personalization design.' + ), + preferences: IssuingPersonalizationDesignPreferencesSchema, + rejection_reasons: IssuingPersonalizationDesignRejectionReasonsSchema, + /** Whether this personalization design can be used to create cards. */ + status: z + .enum(['active', 'inactive', 'rejected', 'review']) + .describe( + 'Whether this personalization design can be used to create cards.' + ) + }) + .describe( + 'A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.' + ) + export type IssuingPersonalizationDesign = z.infer< + typeof IssuingPersonalizationDesignSchema + > + + /** FinancialAddresses contain identifying information that resolves to a FinancialAccount. */ + export const FundingInstructionsBankTransferFinancialAddressSchema = z + .object({ + aba: FundingInstructionsBankTransferAbaRecordSchema.optional(), + iban: FundingInstructionsBankTransferIbanRecordSchema.optional(), + sort_code: FundingInstructionsBankTransferSortCodeRecordSchema.optional(), + spei: FundingInstructionsBankTransferSpeiRecordSchema.optional(), + /** The payment networks supported by this FinancialAddress */ + supported_networks: z + .array( + z.enum([ + 'ach', + 'bacs', + 'domestic_wire_us', + 'fps', + 'sepa', + 'spei', + 'swift', + 'zengin' + ]) + ) + .describe('The payment networks supported by this FinancialAddress') + .optional(), + swift: FundingInstructionsBankTransferSwiftRecordSchema.optional(), + /** The type of financial address */ + type: z + .enum(['aba', 'iban', 'sort_code', 'spei', 'swift', 'zengin']) + .describe('The type of financial address'), + zengin: FundingInstructionsBankTransferZenginRecordSchema.optional() + }) + .describe( + 'FinancialAddresses contain identifying information that resolves to a FinancialAccount.' + ) + export type FundingInstructionsBankTransferFinancialAddress = z.infer< + typeof FundingInstructionsBankTransferFinancialAddressSchema + > + + /** A Configurations object represents how features should be configured for terminal readers. */ + export const TerminalConfigurationSchema = z + .object({ + bbpos_wisepos_e: + TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Whether this Configuration is the default for your account */ + is_account_default: z + .boolean() + .nullable() + .describe('Whether this Configuration is the default for your account') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String indicating the name of the Configuration object, set by the user */ + name: z + .string() + .max(5000) + .nullable() + .describe( + 'String indicating the name of the Configuration object, set by the user' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.configuration') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + offline: + TerminalConfigurationConfigurationResourceOfflineConfigSchema.optional(), + reboot_window: + TerminalConfigurationConfigurationResourceRebootWindowSchema.optional(), + stripe_s700: + TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigSchema.optional(), + tipping: + TerminalConfigurationConfigurationResourceTippingSchema.optional(), + verifone_p400: + TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigSchema.optional() + }) + .describe( + 'A Configurations object represents how features should be configured for terminal readers.' + ) + export type TerminalConfiguration = z.infer< + typeof TerminalConfigurationSchema + > + + export const LegalEntityCompanySchema = z.object({ + address: AddressSchema.optional(), + /** The Kana variation of the company's primary address (Japan only). */ + address_kana: LegalEntityJapanAddressSchema.nullable() + .describe( + "The Kana variation of the company's primary address (Japan only)." + ) + .optional(), + /** The Kanji variation of the company's primary address (Japan only). */ + address_kanji: LegalEntityJapanAddressSchema.nullable() + .describe( + "The Kanji variation of the company's primary address (Japan only)." + ) + .optional(), + /** 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: z + .boolean() + .describe( + "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)." + ) + .optional(), + /** This hash is used to attest that the director information provided to Stripe is both current and correct. */ + directorship_declaration: + LegalEntityDirectorshipDeclarationSchema.nullable() + .describe( + 'This hash is used to attest that the director information provided to Stripe is both current and correct.' + ) + .optional(), + /** 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: z + .boolean() + .describe( + "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." + ) + .optional(), + /** The export license ID number of the company, also referred as Import Export Code (India only). */ + export_license_id: z + .string() + .max(5000) + .describe( + 'The export license ID number of the company, also referred as Import Export Code (India only).' + ) + .optional(), + /** The purpose code to use for export transactions (India only). */ + export_purpose_code: z + .string() + .max(5000) + .describe('The purpose code to use for export transactions (India only).') + .optional(), + /** The company's legal name. */ + name: z + .string() + .max(5000) + .nullable() + .describe("The company's legal name.") + .optional(), + /** The Kana variation of the company's legal name (Japan only). */ + name_kana: z + .string() + .max(5000) + .nullable() + .describe("The Kana variation of the company's legal name (Japan only).") + .optional(), + /** The Kanji variation of the company's legal name (Japan only). */ + name_kanji: z + .string() + .max(5000) + .nullable() + .describe("The Kanji variation of the company's legal name (Japan only).") + .optional(), + /** 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: z + .boolean() + .describe( + "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)." + ) + .optional(), + /** This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. */ + ownership_declaration: LegalEntityUboDeclarationSchema.nullable() + .describe( + 'This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.' + ) + .optional(), + ownership_exemption_reason: z + .enum([ + 'qualified_entity_exceeds_ownership_threshold', + 'qualifies_as_financial_institution' + ]) + .optional(), + /** The company's phone number (used for verification). */ + phone: z + .string() + .max(5000) + .nullable() + .describe("The company's phone number (used for verification).") + .optional(), + /** The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. */ + structure: z + .enum([ + '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' + ]) + .describe( + 'The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.' + ) + .optional(), + /** Whether the company's business ID number was provided. */ + tax_id_provided: z + .boolean() + .describe("Whether the company's business ID number was provided.") + .optional(), + /** The jurisdiction in which the `tax_id` is registered (Germany-based companies only). */ + tax_id_registrar: z + .string() + .max(5000) + .describe( + 'The jurisdiction in which the `tax_id` is registered (Germany-based companies only).' + ) + .optional(), + /** Whether the company's business VAT number was provided. */ + vat_id_provided: z + .boolean() + .describe("Whether the company's business VAT number was provided.") + .optional(), + /** Information on the verification state of the company. */ + verification: LegalEntityCompanyVerificationSchema.nullable() + .describe('Information on the verification state of the company.') + .optional() + }) + export type LegalEntityCompany = z.infer + + export const DisputeEvidenceSchema = z.object({ + /** 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: z + .string() + .max(150_000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The billing address provided by the customer. */ + billing_address: z + .string() + .max(5000) + .nullable() + .describe('The billing address provided by the customer.') + .optional(), + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ + cancellation_policy: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.' + ) + .optional(), + /** An explanation of how and when the customer was shown your refund policy prior to purchase. */ + cancellation_policy_disclosure: z + .string() + .max(150_000) + .nullable() + .describe( + 'An explanation of how and when the customer was shown your refund policy prior to purchase.' + ) + .optional(), + /** A justification for why the customer's subscription was not canceled. */ + cancellation_rebuttal: z + .string() + .max(150_000) + .nullable() + .describe( + "A justification for why the customer's subscription was not canceled." + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** The email address of the customer. */ + customer_email_address: z + .string() + .max(5000) + .nullable() + .describe('The email address of the customer.') + .optional(), + /** The name of the customer. */ + customer_name: z + .string() + .max(5000) + .nullable() + .describe('The name of the customer.') + .optional(), + /** The IP address that the customer used when making the purchase. */ + customer_purchase_ip: z + .string() + .max(5000) + .nullable() + .describe( + 'The IP address that the customer used when making the purchase.' + ) + .optional(), + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ + customer_signature: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature." + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ + duplicate_charge_explanation: z + .string() + .max(150_000) + .nullable() + .describe( + 'An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.' + ) + .optional(), + /** The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ + duplicate_charge_id: z + .string() + .max(5000) + .nullable() + .describe( + 'The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.' + ) + .optional(), + enhanced_evidence: DisputeEnhancedEvidenceSchema, + /** A description of the product or service that was sold. */ + product_description: z + .string() + .max(150_000) + .nullable() + .describe('A description of the product or service that was sold.') + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ + refund_policy: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.' + ) + .optional(), + /** Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ + refund_policy_disclosure: z + .string() + .max(150_000) + .nullable() + .describe( + 'Documentation demonstrating that the customer was shown your refund policy prior to purchase.' + ) + .optional(), + /** A justification for why the customer is not entitled to a refund. */ + refund_refusal_explanation: z + .string() + .max(150_000) + .nullable() + .describe( + 'A justification for why the customer is not entitled to a refund.' + ) + .optional(), + /** The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ + service_date: z + .string() + .max(5000) + .nullable() + .describe( + 'The date on which the customer received or began receiving the purchased service, in a clear human-readable format.' + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(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.' + ) + .optional(), + /** The address to which a physical product was shipped. You should try to include as complete address information as possible. */ + shipping_address: z + .string() + .max(5000) + .nullable() + .describe( + 'The address to which a physical product was shipped. You should try to include as complete address information as possible.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ + shipping_date: z + .string() + .max(5000) + .nullable() + .describe( + 'The date on which a physical product began its route to the shipping address, in a clear human-readable format.' + ) + .optional(), + /** (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: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + "(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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ + uncategorized_file: z + .union([z.string().max(5000), FileSchema]) + .nullable() + .describe( + '(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.' + ) + .optional(), + /** Any additional evidence or statements. */ + uncategorized_text: z + .string() + .max(150_000) + .nullable() + .describe('Any additional evidence or statements.') + .optional() + }) + export type DisputeEvidence = z.infer + + export const PaymentMethodDetailsCardWalletSchema = z.object({ + amex_express_checkout: + PaymentMethodDetailsCardWalletAmexExpressCheckoutSchema.optional(), + apple_pay: PaymentMethodDetailsCardWalletApplePaySchema.optional(), + /** (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4: z + .string() + .max(5000) + .nullable() + .describe( + '(For tokenized numbers only.) The last four digits of the device account number.' + ) + .optional(), + google_pay: PaymentMethodDetailsCardWalletGooglePaySchema.optional(), + link: PaymentMethodDetailsCardWalletLinkSchema.optional(), + masterpass: PaymentMethodDetailsCardWalletMasterpassSchema.optional(), + samsung_pay: PaymentMethodDetailsCardWalletSamsungPaySchema.optional(), + /** 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: z + .enum([ + 'amex_express_checkout', + 'apple_pay', + 'google_pay', + 'link', + 'masterpass', + 'samsung_pay', + 'visa_checkout' + ]) + .describe( + '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.' + ), + visa_checkout: PaymentMethodDetailsCardWalletVisaCheckoutSchema.optional() + }) + export type PaymentMethodDetailsCardWallet = z.infer< + typeof PaymentMethodDetailsCardWalletSchema + > + + export const PaymentIntentNextActionDisplayBankTransferInstructionsSchema = + z.object({ + /** The remaining amount that needs to be transferred to complete the payment. */ + amount_remaining: z + .number() + .int() + .nullable() + .describe( + 'The remaining amount that needs to be transferred to complete the payment.' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + '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).' + ) + .optional(), + /** A list of financial addresses that can be used to fund the customer balance */ + financial_addresses: z + .array(FundingInstructionsBankTransferFinancialAddressSchema) + .describe( + 'A list of financial addresses that can be used to fund the customer balance' + ) + .optional(), + /** A link to a hosted page that guides your customer through completing the transfer. */ + hosted_instructions_url: z + .string() + .max(5000) + .nullable() + .describe( + 'A link to a hosted page that guides your customer through completing the transfer.' + ) + .optional(), + /** A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + reference: z + .string() + .max(5000) + .nullable() + .describe( + 'A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer.' + ) + .optional(), + /** Type of bank transfer */ + type: z + .enum([ + 'eu_bank_transfer', + 'gb_bank_transfer', + 'jp_bank_transfer', + 'mx_bank_transfer', + 'us_bank_transfer' + ]) + .describe('Type of bank transfer') + }) + export type PaymentIntentNextActionDisplayBankTransferInstructions = z.infer< + typeof PaymentIntentNextActionDisplayBankTransferInstructionsSchema + > + + export const PaymentMethodCardWalletSchema = z.object({ + amex_express_checkout: + PaymentMethodCardWalletAmexExpressCheckoutSchema.optional(), + apple_pay: PaymentMethodCardWalletApplePaySchema.optional(), + /** (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4: z + .string() + .max(5000) + .nullable() + .describe( + '(For tokenized numbers only.) The last four digits of the device account number.' + ) + .optional(), + google_pay: PaymentMethodCardWalletGooglePaySchema.optional(), + link: PaymentMethodCardWalletLinkSchema.optional(), + masterpass: PaymentMethodCardWalletMasterpassSchema.optional(), + samsung_pay: PaymentMethodCardWalletSamsungPaySchema.optional(), + /** 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: z + .enum([ + 'amex_express_checkout', + 'apple_pay', + 'google_pay', + 'link', + 'masterpass', + 'samsung_pay', + 'visa_checkout' + ]) + .describe( + '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.' + ), + visa_checkout: PaymentMethodCardWalletVisaCheckoutSchema.optional() + }) + export type PaymentMethodCardWallet = z.infer< + typeof PaymentMethodCardWalletSchema + > + + export const FundingInstructionsBankTransferSchema = z.object({ + /** The country of the bank account to fund */ + country: z + .string() + .max(5000) + .describe('The country of the bank account to fund'), + /** A list of financial addresses that can be used to fund a particular balance */ + financial_addresses: z + .array(FundingInstructionsBankTransferFinancialAddressSchema) + .describe( + 'A list of financial addresses that can be used to fund a particular balance' + ), + /** The bank_transfer type */ + type: z + .enum(['eu_bank_transfer', 'jp_bank_transfer']) + .describe('The bank_transfer type') + }) + export type FundingInstructionsBankTransfer = z.infer< + typeof FundingInstructionsBankTransferSchema + > + + /** + * 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 const TaxTransactionSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. */ + customer: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.' + ) + .optional(), + customer_details: TaxProductResourceCustomerDetailsSchema, + /** Unique identifier for the transaction. */ + id: z + .string() + .max(5000) + .describe('Unique identifier for the transaction.'), + /** The tax collected or refunded, by line item. */ + line_items: z + .object({ + /** Details about each object. */ + data: z + .array(TaxTransactionLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/tax/transactions/[^/]+/line_items')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .nullable() + .describe('The tax collected or refunded, by line item.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax.transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The Unix timestamp representing when the tax liability is assumed or reduced. */ + posted_at: z + .number() + .int() + .describe( + 'The Unix timestamp representing when the tax liability is assumed or reduced.' + ), + /** A custom unique identifier, such as 'myOrder_123'. */ + reference: z + .string() + .max(5000) + .describe("A custom unique identifier, such as 'myOrder_123'."), + /** If `type=reversal`, contains information about what was reversed. */ + reversal: + TaxProductResourceTaxTransactionResourceReversalSchema.nullable() + .describe( + 'If `type=reversal`, contains information about what was reversed.' + ) + .optional(), + /** The details of the ship from location, such as the address. */ + ship_from_details: TaxProductResourceShipFromDetailsSchema.nullable() + .describe('The details of the ship from location, such as the address.') + .optional(), + /** The shipping cost details for the transaction. */ + shipping_cost: + TaxProductResourceTaxTransactionShippingCostSchema.nullable() + .describe('The shipping cost details for the transaction.') + .optional(), + /** Timestamp of date at which the tax rules and rates in effect applies for the calculation. */ + tax_date: z + .number() + .int() + .describe( + 'Timestamp of date at which the tax rules and rates in effect applies for the calculation.' + ), + /** If `reversal`, this transaction reverses an earlier transaction. */ + type: z + .enum(['reversal', 'transaction']) + .describe( + 'If `reversal`, this transaction reverses an earlier transaction.' + ) + }) + .describe( + 'A Tax Transaction records the tax collected from or refunded to your customer.\n\nRelated guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)' + ) + export type TaxTransaction = z.infer + + export const InvoicesResourceShippingCostSchema = z.object({ + /** Total shipping cost before any taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe('Total shipping cost before any taxes are applied.'), + /** Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: z + .number() + .int() + .describe( + 'Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.' + ), + /** Total shipping cost after taxes are applied. */ + amount_total: z + .number() + .int() + .describe('Total shipping cost after taxes are applied.'), + /** The ID of the ShippingRate for this invoice. */ + shipping_rate: z + .union([z.string().max(5000), ShippingRateSchema]) + .nullable() + .describe('The ID of the ShippingRate for this invoice.') + .optional(), + /** The taxes applied to the shipping rate. */ + taxes: z + .array(LineItemsTaxAmountSchema) + .describe('The taxes applied to the shipping rate.') + .optional() + }) + export type InvoicesResourceShippingCost = z.infer< + typeof InvoicesResourceShippingCostSchema + > + + export const PortalFeaturesSchema = z.object({ + customer_update: PortalCustomerUpdateSchema, + invoice_history: PortalInvoiceListSchema, + payment_method_update: PortalPaymentMethodUpdateSchema, + subscription_cancel: PortalSubscriptionCancelSchema, + subscription_update: PortalSubscriptionUpdateSchema + }) + export type PortalFeatures = z.infer + + export const PaymentPagesCheckoutSessionShippingCostSchema = z.object({ + /** Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe( + 'Total shipping cost before any discounts or taxes are applied.' + ), + /** Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: z + .number() + .int() + .describe( + 'Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.' + ), + /** Total shipping cost after discounts and taxes are applied. */ + amount_total: z + .number() + .int() + .describe('Total shipping cost after discounts and taxes are applied.'), + /** The ID of the ShippingRate for this order. */ + shipping_rate: z + .union([z.string().max(5000), ShippingRateSchema]) + .nullable() + .describe('The ID of the ShippingRate for this order.') + .optional(), + /** The taxes applied to the shipping rate. */ + taxes: z + .array(LineItemsTaxAmountSchema) + .describe('The taxes applied to the shipping rate.') + .optional() + }) + export type PaymentPagesCheckoutSessionShippingCost = z.infer< + typeof PaymentPagesCheckoutSessionShippingCostSchema + > + + /** + * 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 const FundingInstructionsSchema = z + .object({ + bank_transfer: FundingInstructionsBankTransferSchema, + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** The `funding_type` of the returned instructions */ + funding_type: z + .literal('bank_transfer') + .describe('The `funding_type` of the returned instructions'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('funding_instructions') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is\nautomatically applied to future invoices and payments using the `customer_balance` payment method.\nCustomers can fund this balance by initiating a bank transfer to any account in the\n`financial_addresses` field.\nRelated guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)' + ) + export type FundingInstructions = z.infer + + /** + * 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 TreasuryFinancialAccountFeaturesSchema = z + .object({ + card_issuing: + TreasuryFinancialAccountsResourceToggleSettingsSchema.optional(), + deposit_insurance: + TreasuryFinancialAccountsResourceToggleSettingsSchema.optional(), + financial_addresses: + TreasuryFinancialAccountsResourceFinancialAddressesFeaturesSchema.optional(), + inbound_transfers: + TreasuryFinancialAccountsResourceInboundTransfersSchema.optional(), + intra_stripe_flows: + TreasuryFinancialAccountsResourceToggleSettingsSchema.optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.financial_account_features') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + outbound_payments: + TreasuryFinancialAccountsResourceOutboundPaymentsSchema.optional(), + outbound_transfers: + TreasuryFinancialAccountsResourceOutboundTransfersSchema.optional() + }) + .describe( + 'Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.\nStripe or the platform can control Features via the requested field.' + ) + export type TreasuryFinancialAccountFeatures = z.infer< + typeof TreasuryFinancialAccountFeaturesSchema + > + + export const IssuingDisputeEvidenceSchema = z.object({ + canceled: IssuingDisputeCanceledEvidenceSchema.optional(), + duplicate: IssuingDisputeDuplicateEvidenceSchema.optional(), + fraudulent: IssuingDisputeFraudulentEvidenceSchema.optional(), + merchandise_not_as_described: + IssuingDisputeMerchandiseNotAsDescribedEvidenceSchema.optional(), + no_valid_authorization: + IssuingDisputeNoValidAuthorizationEvidenceSchema.optional(), + not_received: IssuingDisputeNotReceivedEvidenceSchema.optional(), + other: IssuingDisputeOtherEvidenceSchema.optional(), + /** The reason for filing the dispute. Its value will match the field containing the evidence. */ + reason: z + .enum([ + 'canceled', + 'duplicate', + 'fraudulent', + 'merchandise_not_as_described', + 'no_valid_authorization', + 'not_received', + 'other', + 'service_not_as_described' + ]) + .describe( + 'The reason for filing the dispute. Its value will match the field containing the evidence.' + ), + service_not_as_described: + IssuingDisputeServiceNotAsDescribedEvidenceSchema.optional() + }) + export type IssuingDisputeEvidence = z.infer< + typeof IssuingDisputeEvidenceSchema + > + + /** + * 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 PriceSchema = z + .object({ + /** Whether the price can be used for new purchases. */ + active: z + .boolean() + .describe('Whether the price can be used for new purchases.'), + /** 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: z + .enum(['per_unit', 'tiered']) + .describe( + '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.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** 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: z + .record(CurrencyOptionSchema) + .describe( + '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).' + ) + .optional(), + /** When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount: CustomUnitAmountSchema.nullable() + .describe( + 'When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key: z + .string() + .max(5000) + .nullable() + .describe( + 'A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** A brief description of the price, hidden from customers. */ + nickname: z + .string() + .max(5000) + .nullable() + .describe('A brief description of the price, hidden from customers.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('price') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The ID of the product this price is associated with. */ + product: z + .union([z.string().max(5000), ProductSchema, DeletedProductSchema]) + .describe('The ID of the product this price is associated with.'), + /** The recurring components of a price such as `interval` and `usage_type`. */ + recurring: RecurringSchema.nullable() + .describe( + 'The recurring components of a price such as `interval` and `usage_type`.' + ) + .optional(), + /** 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: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers: z + .array(PriceTierSchema) + .describe( + 'Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.' + ) + .optional(), + /** 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: z + .enum(['graduated', 'volume']) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ + transform_quantity: TransformQuantitySchema.nullable() + .describe( + 'Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.' + ) + .optional(), + /** One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. */ + type: z + .enum(['one_time', 'recurring']) + .describe( + 'One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + '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`.' + ) + .optional() + }) + .describe( + 'Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[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.\n\nFor example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated 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 Price = z.infer + + /** + * 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 ProductSchema = z + .object({ + /** Whether the product is currently available for purchase. */ + active: z + .boolean() + .describe('Whether the product is currently available for purchase.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price: z + .union([z.string().max(5000), PriceSchema]) + .nullable() + .describe( + 'The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images: z + .array(z.string().max(5000)) + .describe( + 'A list of up to 8 URLs of images for this product, meant to be displayable to the customer.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .array(ProductMarketingFeatureSchema) + .describe( + '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).' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The product's name, meant to be displayable to the customer. */ + name: z + .string() + .max(5000) + .describe( + "The product's name, meant to be displayable to the customer." + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('product') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The dimensions of this product for shipping purposes. */ + package_dimensions: PackageDimensionsSchema.nullable() + .describe('The dimensions of this product for shipping purposes.') + .optional(), + /** Whether this product is shipped (i.e., physical goods). */ + shippable: z + .boolean() + .nullable() + .describe('Whether this product is shipped (i.e., physical goods).') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code: z + .union([z.string().max(5000), TaxCodeSchema]) + .nullable() + .describe( + 'A [tax code](https://stripe.com/docs/tax/tax-categories) ID.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal." + ) + .optional(), + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: z + .number() + .int() + .describe( + 'Time at which the object was last updated. Measured in seconds since the Unix epoch.' + ), + /** A URL of a publicly-accessible webpage for this product. */ + url: z + .string() + .max(2048) + .nullable() + .describe('A URL of a publicly-accessible webpage for this product.') + .optional() + }) + .describe( + 'Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payment-links),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)' + ) + export type Product = z.infer + + export const PortalFlowsFlowSchema = z.object({ + after_completion: PortalFlowsFlowAfterCompletionSchema, + /** Configuration when `flow.type=subscription_cancel`. */ + subscription_cancel: PortalFlowsFlowSubscriptionCancelSchema.nullable() + .describe('Configuration when `flow.type=subscription_cancel`.') + .optional(), + /** Configuration when `flow.type=subscription_update`. */ + subscription_update: PortalFlowsFlowSubscriptionUpdateSchema.nullable() + .describe('Configuration when `flow.type=subscription_update`.') + .optional(), + /** Configuration when `flow.type=subscription_update_confirm`. */ + subscription_update_confirm: + PortalFlowsFlowSubscriptionUpdateConfirmSchema.nullable() + .describe('Configuration when `flow.type=subscription_update_confirm`.') + .optional(), + /** Type of flow that the customer will go through. */ + type: z + .enum([ + 'payment_method_update', + 'subscription_cancel', + 'subscription_update', + 'subscription_update_confirm' + ]) + .describe('Type of flow that the customer will go through.') + }) + export type PortalFlowsFlow = z.infer + + export const IssuingTransactionPurchaseDetailsSchema = z.object({ + /** Fleet-specific information for transactions using Fleet cards. */ + fleet: IssuingTransactionFleetDataSchema.nullable() + .describe( + 'Fleet-specific information for transactions using Fleet cards.' + ) + .optional(), + /** Information about the flight that was purchased with this transaction. */ + flight: IssuingTransactionFlightDataSchema.nullable() + .describe( + 'Information about the flight that was purchased with this transaction.' + ) + .optional(), + /** Information about fuel that was purchased with this transaction. */ + fuel: IssuingTransactionFuelDataSchema.nullable() + .describe( + 'Information about fuel that was purchased with this transaction.' + ) + .optional(), + /** Information about lodging that was purchased with this transaction. */ + lodging: IssuingTransactionLodgingDataSchema.nullable() + .describe( + 'Information about lodging that was purchased with this transaction.' + ) + .optional(), + /** The line items in the purchase. */ + receipt: z + .array(IssuingTransactionReceiptDataSchema) + .nullable() + .describe('The line items in the purchase.') + .optional(), + /** A merchant-specific order number. */ + reference: z + .string() + .max(5000) + .nullable() + .describe('A merchant-specific order number.') + .optional() + }) + export type IssuingTransactionPurchaseDetails = z.infer< + typeof IssuingTransactionPurchaseDetailsSchema + > + + export const TaxProductRegistrationsResourceCountryOptionsSchema = z.object({ + ae: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + al: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + am: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + ao: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + at: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + au: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + ba: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + bb: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + be: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + bg: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + bh: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + bs: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + by: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + ca: TaxProductRegistrationsResourceCountryOptionsCanadaSchema.optional(), + cd: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + ch: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + cl: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + co: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + cr: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + cy: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + cz: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + de: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + dk: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + ec: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + ee: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + eg: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + es: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + fi: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + fr: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + gb: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + ge: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + gn: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + gr: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + hr: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + hu: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + id: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + ie: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + is: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + it: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + jp: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + ke: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + kh: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + kr: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + kz: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + lt: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + lu: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + lv: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + ma: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + md: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + me: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + mk: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + mr: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + mt: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + mx: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + my: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + ng: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + nl: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + no: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + np: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + nz: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + om: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + pe: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + pl: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + pt: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + ro: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + rs: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + ru: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + sa: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + se: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + sg: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + si: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + sk: TaxProductRegistrationsResourceCountryOptionsEuropeSchema.optional(), + sn: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + sr: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + th: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + tj: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + tr: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + tz: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + ug: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + us: TaxProductRegistrationsResourceCountryOptionsUnitedStatesSchema.optional(), + uy: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + uz: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + vn: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + za: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional(), + zm: TaxProductRegistrationsResourceCountryOptionsSimplifiedSchema.optional(), + zw: TaxProductRegistrationsResourceCountryOptionsDefaultSchema.optional() + }) + export type TaxProductRegistrationsResourceCountryOptions = z.infer< + typeof TaxProductRegistrationsResourceCountryOptionsSchema + > + + /** + * 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 const TaxCalculationSchema = z + .object({ + /** Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_total: z + .number() + .int() + .describe( + 'Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. */ + customer: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.' + ) + .optional(), + customer_details: TaxProductResourceCustomerDetailsSchema, + /** Timestamp of date at which the tax calculation will expire. */ + expires_at: z + .number() + .int() + .nullable() + .describe('Timestamp of date at which the tax calculation will expire.') + .optional(), + /** Unique identifier for the calculation. */ + id: z + .string() + .max(5000) + .nullable() + .describe('Unique identifier for the calculation.') + .optional(), + /** The list of items the customer is purchasing. */ + line_items: z + .object({ + /** Details about each object. */ + data: z + .array(TaxCalculationLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/tax/calculations/[^/]+/line_items')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .nullable() + .describe('The list of items the customer is purchasing.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax.calculation') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The details of the ship from location, such as the address. */ + ship_from_details: TaxProductResourceShipFromDetailsSchema.nullable() + .describe('The details of the ship from location, such as the address.') + .optional(), + /** The shipping cost details for the calculation. */ + shipping_cost: + TaxProductResourceTaxCalculationShippingCostSchema.nullable() + .describe('The shipping cost details for the calculation.') + .optional(), + /** The amount of tax to be collected on top of the line item prices. */ + tax_amount_exclusive: z + .number() + .int() + .describe( + 'The amount of tax to be collected on top of the line item prices.' + ), + /** The amount of tax already included in the line item prices. */ + tax_amount_inclusive: z + .number() + .int() + .describe( + 'The amount of tax already included in the line item prices.' + ), + /** Breakdown of individual tax amounts that add up to the total. */ + tax_breakdown: z + .array(TaxProductResourceTaxBreakdownSchema) + .describe( + 'Breakdown of individual tax amounts that add up to the total.' + ), + /** Timestamp of date at which the tax rules and rates in effect applies for the calculation. */ + tax_date: z + .number() + .int() + .describe( + 'Timestamp of date at which the tax rules and rates in effect applies for the calculation.' + ) + }) + .describe( + 'A Tax Calculation allows you to calculate the tax to collect from your customer.\n\nRelated guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)' + ) + export type TaxCalculation = z.infer + + /** + * 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 const TaxRegistrationSchema = z + .object({ + /** Time at which the registration becomes active. Measured in seconds since the Unix epoch. */ + active_from: z + .number() + .int() + .describe( + 'Time at which the registration becomes active. Measured in seconds since the Unix epoch.' + ), + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ), + country_options: TaxProductRegistrationsResourceCountryOptionsSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax.registration') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. */ + status: z + .enum(['active', 'expired', 'scheduled']) + .describe( + 'The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`.' + ) + }) + .describe( + "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).\n\nStripe 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).\n\nRelated guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api)" + ) + export type TaxRegistration = z.infer + + export const MandatePaymentMethodDetailsSchema = z.object({ + acss_debit: MandateAcssDebitSchema.optional(), + amazon_pay: MandateAmazonPaySchema.optional(), + au_becs_debit: MandateAuBecsDebitSchema.optional(), + bacs_debit: MandateBacsDebitSchema.optional(), + card: CardMandatePaymentMethodDetailsSchema.optional(), + cashapp: MandateCashappSchema.optional(), + kakao_pay: MandateKakaoPaySchema.optional(), + kr_card: MandateKrCardSchema.optional(), + link: MandateLinkSchema.optional(), + paypal: MandatePaypalSchema.optional(), + revolut_pay: MandateRevolutPaySchema.optional(), + sepa_debit: MandateSepaDebitSchema.optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ), + us_bank_account: MandateUsBankAccountSchema.optional() + }) + export type MandatePaymentMethodDetails = z.infer< + typeof MandatePaymentMethodDetailsSchema + > + + export const RefundDestinationDetailsSchema = z.object({ + affirm: DestinationDetailsUnimplementedSchema.optional(), + afterpay_clearpay: DestinationDetailsUnimplementedSchema.optional(), + alipay: DestinationDetailsUnimplementedSchema.optional(), + alma: DestinationDetailsUnimplementedSchema.optional(), + amazon_pay: DestinationDetailsUnimplementedSchema.optional(), + au_bank_transfer: DestinationDetailsUnimplementedSchema.optional(), + blik: RefundDestinationDetailsBlikSchema.optional(), + br_bank_transfer: RefundDestinationDetailsBrBankTransferSchema.optional(), + card: RefundDestinationDetailsCardSchema.optional(), + cashapp: DestinationDetailsUnimplementedSchema.optional(), + customer_cash_balance: DestinationDetailsUnimplementedSchema.optional(), + eps: DestinationDetailsUnimplementedSchema.optional(), + eu_bank_transfer: RefundDestinationDetailsEuBankTransferSchema.optional(), + gb_bank_transfer: RefundDestinationDetailsGbBankTransferSchema.optional(), + giropay: DestinationDetailsUnimplementedSchema.optional(), + grabpay: DestinationDetailsUnimplementedSchema.optional(), + jp_bank_transfer: RefundDestinationDetailsJpBankTransferSchema.optional(), + klarna: DestinationDetailsUnimplementedSchema.optional(), + multibanco: RefundDestinationDetailsMultibancoSchema.optional(), + mx_bank_transfer: RefundDestinationDetailsMxBankTransferSchema.optional(), + p24: RefundDestinationDetailsP24Schema.optional(), + paynow: DestinationDetailsUnimplementedSchema.optional(), + paypal: DestinationDetailsUnimplementedSchema.optional(), + pix: DestinationDetailsUnimplementedSchema.optional(), + revolut: DestinationDetailsUnimplementedSchema.optional(), + sofort: DestinationDetailsUnimplementedSchema.optional(), + swish: RefundDestinationDetailsSwishSchema.optional(), + th_bank_transfer: RefundDestinationDetailsThBankTransferSchema.optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + us_bank_transfer: RefundDestinationDetailsUsBankTransferSchema.optional(), + wechat_pay: DestinationDetailsUnimplementedSchema.optional(), + zip: DestinationDetailsUnimplementedSchema.optional() + }) + export type RefundDestinationDetails = z.infer< + typeof RefundDestinationDetailsSchema + > + + export const SubscriptionsResourcePaymentMethodOptionsSchema = z.object({ + /** This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. */ + acss_debit: InvoicePaymentMethodOptionsAcssDebitSchema.nullable() + .describe( + 'This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.' + ) + .optional(), + /** This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. */ + bancontact: InvoicePaymentMethodOptionsBancontactSchema.nullable() + .describe( + 'This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.' + ) + .optional(), + /** This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ + card: SubscriptionPaymentMethodOptionsCardSchema.nullable() + .describe( + 'This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.' + ) + .optional(), + /** This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + customer_balance: + InvoicePaymentMethodOptionsCustomerBalanceSchema.nullable() + .describe( + 'This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.' + ) + .optional(), + /** This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + konbini: InvoicePaymentMethodOptionsKonbiniSchema.nullable() + .describe( + 'This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.' + ) + .optional(), + /** This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. */ + sepa_debit: InvoicePaymentMethodOptionsSepaDebitSchema.nullable() + .describe( + 'This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.' + ) + .optional(), + /** This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + us_bank_account: InvoicePaymentMethodOptionsUsBankAccountSchema.nullable() + .describe( + 'This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.' + ) + .optional() + }) + export type SubscriptionsResourcePaymentMethodOptions = z.infer< + typeof SubscriptionsResourcePaymentMethodOptionsSchema + > + + export const InvoicesPaymentMethodOptionsSchema = z.object({ + /** 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: InvoicePaymentMethodOptionsAcssDebitSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. */ + bancontact: InvoicePaymentMethodOptionsBancontactSchema.nullable() + .describe( + 'If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.' + ) + .optional(), + /** If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ + card: InvoicePaymentMethodOptionsCardSchema.nullable() + .describe( + 'If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.' + ) + .optional(), + /** 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: + InvoicePaymentMethodOptionsCustomerBalanceSchema.nullable() + .describe( + 'If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.' + ) + .optional(), + /** If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + konbini: InvoicePaymentMethodOptionsKonbiniSchema.nullable() + .describe( + 'If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.' + ) + .optional(), + /** 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: InvoicePaymentMethodOptionsSepaDebitSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** 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: InvoicePaymentMethodOptionsUsBankAccountSchema.nullable() + .describe( + '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.' + ) + .optional() + }) + export type InvoicesPaymentMethodOptions = z.infer< + typeof InvoicesPaymentMethodOptionsSchema + > + + /** + * 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 PlanSchema = z + .object({ + /** Whether the plan can be used for new purchases. */ + active: z + .boolean() + .describe('Whether the plan can be used for new purchases.'), + /** Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. */ + aggregate_usage: z + .enum(['last_during_period', 'last_ever', 'max', 'sum']) + .nullable() + .describe( + 'Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .string() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .enum(['per_unit', 'tiered']) + .describe( + '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.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. */ + interval: z + .enum(['day', 'month', 'week', 'year']) + .describe( + 'The frequency at which a subscription is billed. One of `day`, `week`, `month` or `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: z + .number() + .int() + .describe( + 'The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The meter tracking the usage of a metered price */ + meter: z + .string() + .max(5000) + .nullable() + .describe('The meter tracking the usage of a metered price') + .optional(), + /** A brief description of the plan, hidden from customers. */ + nickname: z + .string() + .max(5000) + .nullable() + .describe('A brief description of the plan, hidden from customers.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('plan') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The product whose pricing this plan determines. */ + product: z + .union([z.string().max(5000), ProductSchema, DeletedProductSchema]) + .nullable() + .describe('The product whose pricing this plan determines.') + .optional(), + /** Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers: z + .array(PlanTierSchema) + .describe( + 'Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.' + ) + .optional(), + /** 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: z + .enum(['graduated', 'volume']) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ + transform_usage: TransformUsageSchema.nullable() + .describe( + 'Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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).' + ) + .optional(), + /** 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: z + .enum(['licensed', 'metered']) + .describe( + '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`.' + ) + }) + .describe( + '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.\n\nPlans define the base price, currency, and billing cycle for recurring purchases of products.\n[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.\n\nFor example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.\n\nRelated 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 Plan = z.infer + + /** + * 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 const IssuingCardholderSchema = z + .object({ + billing: IssuingCardholderAddressSchema, + /** Additional information about a `company` cardholder. */ + company: IssuingCardholderCompanySchema.nullable() + .describe('Additional information about a `company` cardholder.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The cardholder's email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe("The cardholder's email address.") + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Additional information about an `individual` cardholder. */ + individual: IssuingCardholderIndividualSchema.nullable() + .describe('Additional information about an `individual` cardholder.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The cardholder's name. This will be printed on cards issued to them. */ + name: z + .string() + .max(5000) + .describe( + "The cardholder's name. This will be printed on cards issued to them." + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.cardholder') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** + * 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: z + .array(z.enum(['de', 'en', 'es', 'fr', 'it'])) + .nullable() + .describe( + 'The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.\n 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.' + ) + .optional(), + requirements: IssuingCardholderRequirementsSchema, + /** 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: IssuingCardholderAuthorizationControlsSchema.nullable() + .describe( + "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details." + ) + .optional(), + /** Specifies whether to permit authorizations on this cardholder's cards. */ + status: z + .enum(['active', 'blocked', 'inactive']) + .describe( + "Specifies whether to permit authorizations on this cardholder's cards." + ), + /** One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. */ + type: z + .enum(['company', 'individual']) + .describe( + 'One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.' + ) + }) + .describe( + 'An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)' + ) + export type IssuingCardholder = z.infer + + export const SubscriptionsResourcePaymentSettingsSchema = z.object({ + /** Payment-method-specific configuration to provide to invoices created by the subscription. */ + payment_method_options: + SubscriptionsResourcePaymentMethodOptionsSchema.nullable() + .describe( + 'Payment-method-specific configuration to provide to invoices created by the subscription.' + ) + .optional(), + /** 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: z + .array( + z.enum([ + 'ach_credit_transfer', + 'ach_debit', + 'acss_debit', + 'amazon_pay', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'boleto', + 'card', + 'cashapp', + 'customer_balance', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'jp_credit_transfer', + 'kakao_pay', + 'konbini', + 'kr_card', + 'link', + 'multibanco', + 'naver_pay', + 'p24', + 'payco', + 'paynow', + 'paypal', + 'promptpay', + 'revolut_pay', + 'sepa_credit_transfer', + 'sepa_debit', + 'sofort', + 'swish', + 'us_bank_account', + 'wechat_pay' + ]) + ) + .nullable() + .describe( + '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).' + ) + .optional(), + /** Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. */ + save_default_payment_method: z + .enum(['off', 'on_subscription']) + .nullable() + .describe( + 'Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.' + ) + .optional() + }) + export type SubscriptionsResourcePaymentSettings = z.infer< + typeof SubscriptionsResourcePaymentSettingsSchema + > + + export const InvoicesPaymentSettingsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ + payment_method_options: InvoicesPaymentMethodOptionsSchema.nullable() + .describe( + 'Payment-method-specific configuration to provide to the invoice’s PaymentIntent.' + ) + .optional(), + /** 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: z + .array( + z.enum([ + 'ach_credit_transfer', + 'ach_debit', + 'acss_debit', + 'amazon_pay', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'boleto', + 'card', + 'cashapp', + 'customer_balance', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'jp_credit_transfer', + 'kakao_pay', + 'konbini', + 'kr_card', + 'link', + 'multibanco', + 'naver_pay', + 'p24', + 'payco', + 'paynow', + 'paypal', + 'promptpay', + 'revolut_pay', + 'sepa_credit_transfer', + 'sepa_debit', + 'sofort', + 'swish', + 'us_bank_account', + 'wechat_pay' + ]) + ) + .nullable() + .describe( + '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).' + ) + .optional() + }) + export type InvoicesPaymentSettings = z.infer< + typeof InvoicesPaymentSettingsSchema + > + + /** + * This is an object representing a person associated with a Stripe account. + * + * A platform cannot access 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 const PersonSchema = z + .object({ + /** The account the person is associated with. */ + account: z + .string() + .max(5000) + .describe('The account the person is associated with.'), + additional_tos_acceptances: + PersonAdditionalTosAcceptancesSchema.optional(), + address: AddressSchema.optional(), + address_kana: LegalEntityJapanAddressSchema.nullable().optional(), + address_kanji: LegalEntityJapanAddressSchema.nullable().optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + dob: LegalEntityDobSchema.optional(), + /** The person's email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe("The person's email address.") + .optional(), + /** The person's first name. */ + first_name: z + .string() + .max(5000) + .nullable() + .describe("The person's first name.") + .optional(), + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana: z + .string() + .max(5000) + .nullable() + .describe("The Kana variation of the person's first name (Japan only).") + .optional(), + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji: z + .string() + .max(5000) + .nullable() + .describe( + "The Kanji variation of the person's first name (Japan only)." + ) + .optional(), + /** A list of alternate names or aliases that the person is known by. */ + full_name_aliases: z + .array(z.string().max(5000)) + .describe( + 'A list of alternate names or aliases that the person is known by.' + ) + .optional(), + future_requirements: PersonFutureRequirementsSchema.nullable().optional(), + /** The person's gender. */ + gender: z.string().nullable().describe("The person's gender.").optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .boolean() + .describe( + "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`)." + ) + .optional(), + /** Whether the person's `id_number_secondary` was provided. */ + id_number_secondary_provided: z + .boolean() + .describe("Whether the person's `id_number_secondary` was provided.") + .optional(), + /** The person's last name. */ + last_name: z + .string() + .max(5000) + .nullable() + .describe("The person's last name.") + .optional(), + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana: z + .string() + .max(5000) + .nullable() + .describe("The Kana variation of the person's last name (Japan only).") + .optional(), + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji: z + .string() + .max(5000) + .nullable() + .describe("The Kanji variation of the person's last name (Japan only).") + .optional(), + /** The person's maiden name. */ + maiden_name: z + .string() + .max(5000) + .nullable() + .describe("The person's maiden name.") + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ) + .optional(), + /** The country where the person is a national. */ + nationality: z + .string() + .max(5000) + .nullable() + .describe('The country where the person is a national.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('person') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The person's phone number. */ + phone: z + .string() + .max(5000) + .nullable() + .describe("The person's phone number.") + .optional(), + /** 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: z + .enum(['existing', 'none']) + .describe( + '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.' + ) + .optional(), + registered_address: AddressSchema.optional(), + relationship: PersonRelationshipSchema.optional(), + requirements: PersonRequirementsSchema.nullable().optional(), + /** Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ + ssn_last_4_provided: z + .boolean() + .describe( + "Whether the last four digits of the person's Social Security number have been provided (U.S. only)." + ) + .optional(), + verification: LegalEntityPersonVerificationSchema.optional() + }) + .describe( + 'This is an object representing a person associated with a Stripe account.\n\nA platform cannot access 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.\n\nSee 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 Person = z.infer + + /** A portal configuration describes the functionality and behavior of a portal session. */ + export const BillingPortalConfigurationSchema = z + .object({ + /** Whether the configuration is active and can be used to create portal sessions. */ + active: z + .boolean() + .describe( + 'Whether the configuration is active and can be used to create portal sessions.' + ), + /** ID of the Connect Application that created the configuration. */ + application: z + .union([ + z.string().max(5000), + ApplicationSchema, + DeletedApplicationSchema + ]) + .nullable() + .describe( + 'ID of the Connect Application that created the configuration.' + ) + .optional(), + business_profile: PortalBusinessProfileSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + features: PortalFeaturesSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .boolean() + .describe( + '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.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + login_page: PortalLoginPageSchema, + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing_portal.configuration') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: z + .number() + .int() + .describe( + 'Time at which the object was last updated. Measured in seconds since the Unix epoch.' + ) + }) + .describe( + 'A portal configuration describes the functionality and behavior of a portal session.' + ) + export type BillingPortalConfiguration = z.infer< + typeof BillingPortalConfigurationSchema + > + + export const ConnectEmbeddedAccountSessionCreateComponentsSchema = z.object({ + account_management: ConnectEmbeddedAccountConfigClaimSchema, + account_onboarding: ConnectEmbeddedAccountConfigClaimSchema, + balances: ConnectEmbeddedPayoutsConfigSchema, + documents: ConnectEmbeddedBaseConfigClaimSchema, + financial_account: ConnectEmbeddedFinancialAccountConfigClaimSchema, + financial_account_transactions: + ConnectEmbeddedFinancialAccountTransactionsConfigClaimSchema, + issuing_card: ConnectEmbeddedIssuingCardConfigClaimSchema, + issuing_cards_list: ConnectEmbeddedIssuingCardsListConfigClaimSchema, + notification_banner: ConnectEmbeddedAccountConfigClaimSchema, + payment_details: ConnectEmbeddedPaymentsConfigClaimSchema, + payments: ConnectEmbeddedPaymentsConfigClaimSchema, + payouts: ConnectEmbeddedPayoutsConfigSchema, + payouts_list: ConnectEmbeddedBaseConfigClaimSchema, + tax_registrations: ConnectEmbeddedBaseConfigClaimSchema, + tax_settings: ConnectEmbeddedBaseConfigClaimSchema + }) + export type ConnectEmbeddedAccountSessionCreateComponents = z.infer< + typeof ConnectEmbeddedAccountSessionCreateComponentsSchema + > + + /** + * 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 const TreasuryFinancialAccountSchema = z + .object({ + /** The array of paths to active Features in the Features hash. */ + 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' + ]) + ) + .describe('The array of paths to active Features in the Features hash.') + .optional(), + balance: TreasuryFinancialAccountsResourceBalanceSchema, + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + features: TreasuryFinancialAccountFeaturesSchema.optional(), + /** The set of credentials that resolve to a FinancialAccount. */ + financial_addresses: z + .array(TreasuryFinancialAccountsResourceFinancialAddressSchema) + .describe('The set of credentials that resolve to a FinancialAccount.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + is_default: z.boolean().optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The nickname for the FinancialAccount. */ + nickname: z + .string() + .max(5000) + .nullable() + .describe('The nickname for the FinancialAccount.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.financial_account') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The array of paths to pending Features in the Features hash. */ + pending_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' + ]) + ) + .describe( + 'The array of paths to pending Features in the Features hash.' + ) + .optional(), + /** The set of functionalities that the platform can restrict on the FinancialAccount. */ + platform_restrictions: + TreasuryFinancialAccountsResourcePlatformRestrictionsSchema.nullable() + .describe( + 'The set of functionalities that the platform can restrict on the FinancialAccount.' + ) + .optional(), + /** The array of paths to restricted Features in the Features hash. */ + restricted_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' + ]) + ) + .describe( + 'The array of paths to restricted Features in the Features hash.' + ) + .optional(), + /** Status of this FinancialAccount. */ + status: z + .enum(['closed', 'open']) + .describe('Status of this FinancialAccount.'), + status_details: TreasuryFinancialAccountsResourceStatusDetailsSchema, + /** 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: z + .array(z.string()) + .describe( + '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.' + ) + }) + .describe( + 'Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.\nFinancialAccounts serve as the source and destination of Treasury’s money movement APIs.' + ) + export type TreasuryFinancialAccount = z.infer< + typeof TreasuryFinancialAccountSchema + > + + export const SetupIntentPaymentMethodOptionsSchema = z.object({ + acss_debit: z + .union([ + SetupIntentPaymentMethodOptionsAcssDebitSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + amazon_pay: z + .union([ + SetupIntentPaymentMethodOptionsAmazonPaySchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + bacs_debit: z + .union([ + SetupIntentPaymentMethodOptionsBacsDebitSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + card: z + .union([ + SetupIntentPaymentMethodOptionsCardSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + card_present: z + .union([ + SetupIntentPaymentMethodOptionsCardPresentSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + link: z + .union([ + SetupIntentPaymentMethodOptionsLinkSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + paypal: z + .union([ + SetupIntentPaymentMethodOptionsPaypalSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + sepa_debit: z + .union([ + SetupIntentPaymentMethodOptionsSepaDebitSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + us_bank_account: z + .union([ + SetupIntentPaymentMethodOptionsUsBankAccountSchema, + SetupIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional() + }) + export type SetupIntentPaymentMethodOptions = z.infer< + typeof SetupIntentPaymentMethodOptionsSchema + > + + /** + * 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 const AccountSessionSchema = z + .object({ + /** The ID of the account the AccountSession was created for */ + account: z + .string() + .max(5000) + .describe('The ID of the account the AccountSession was created for'), + /** + * 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: z + .string() + .max(5000) + .describe( + 'The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.\n\nThe 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.\n\nRefer 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.' + ), + components: ConnectEmbeddedAccountSessionCreateComponentsSchema, + /** The timestamp at which this AccountSession will expire. */ + expires_at: z + .number() + .int() + .describe('The timestamp at which this AccountSession will expire.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('account_session') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.\n\nWe recommend that you create an AccountSession each time you need to display an embedded component\nto your user. Do not save AccountSessions to your database as they expire relatively\nquickly, and cannot be used more than once.\n\nRelated guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)' + ) + export type AccountSession = z.infer + + export const PaymentMethodDetailsCardSchema = z.object({ + /** The authorized amount. */ + amount_authorized: z + .number() + .int() + .nullable() + .describe('The authorized amount.') + .optional(), + /** Authorization code on the charge. */ + authorization_code: z + .string() + .max(5000) + .nullable() + .describe('Authorization code on the charge.') + .optional(), + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .nullable() + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ) + .optional(), + /** When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. */ + capture_before: z + .number() + .int() + .describe( + 'When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.' + ) + .optional(), + /** Check results by Card networks on Card address and CVC at time of payment. */ + checks: PaymentMethodDetailsCardChecksSchema.nullable() + .describe( + 'Check results by Card networks on Card address and CVC at time of payment.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + extended_authorization: + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationSchema.optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .nullable() + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ) + .optional(), + incremental_authorization: + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationSchema.optional(), + /** + * Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments: PaymentMethodDetailsCardInstallmentsSchema.nullable() + .describe( + 'Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).' + ) + .optional(), + /** The last four digits of the card. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('The last four digits of the card.') + .optional(), + /** ID of the mandate used to make this payment or created by it. */ + mandate: z + .string() + .max(5000) + .nullable() + .describe('ID of the mandate used to make this payment or created by it.') + .optional(), + multicapture: + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureSchema.optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** If this card has network token credentials, this contains the details of the network token credentials. */ + network_token: PaymentMethodDetailsCardNetworkTokenSchema.nullable() + .describe( + 'If this card has network token credentials, this contains the details of the network token credentials.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + overcapture: + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureSchema.optional(), + /** Status of a card based on the card issuer. */ + regulated_status: z + .enum(['regulated', 'unregulated']) + .nullable() + .describe('Status of a card based on the card issuer.') + .optional(), + /** Populated if this transaction used 3D Secure authentication. */ + three_d_secure: ThreeDSecureDetailsChargeSchema.nullable() + .describe('Populated if this transaction used 3D Secure authentication.') + .optional(), + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet: PaymentMethodDetailsCardWalletSchema.nullable() + .describe( + 'If this Card is part of a card wallet, this contains the details of the card wallet.' + ) + .optional() + }) + export type PaymentMethodDetailsCard = z.infer< + typeof PaymentMethodDetailsCardSchema + > + + /** + * 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 IdentityVerificationReportSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + document: GelatoDocumentReportSchema.optional(), + email: GelatoEmailReportSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + id_number: GelatoIdNumberReportSchema.optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('identity.verification_report') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + options: GelatoVerificationReportOptionsSchema.optional(), + phone: GelatoPhoneReportSchema.optional(), + selfie: GelatoSelfieReportSchema.optional(), + /** Type of report. */ + type: z + .enum(['document', 'id_number', 'verification_flow']) + .describe('Type of report.'), + /** The configuration token of a verification flow from the dashboard. */ + verification_flow: z + .string() + .max(5000) + .describe( + 'The configuration token of a verification flow from the dashboard.' + ) + .optional(), + /** ID of the VerificationSession that created this report. */ + verification_session: z + .string() + .max(5000) + .nullable() + .describe('ID of the VerificationSession that created this report.') + .optional() + }) + .describe( + 'A VerificationReport is the result of an attempt to collect and verify data from a user.\nThe collection of verification checks performed is determined from the `type` and `options`\nparameters used. You can find the result of each verification check performed in the\nappropriate sub-resource: `document`, `id_number`, `selfie`.\n\nEach VerificationReport contains a copy of any data collected by the user as well as\nreference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)\nAPI. To configure and create VerificationReports, use the\n[VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.\n\nRelated guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).' + ) + export type IdentityVerificationReport = z.infer< + typeof IdentityVerificationReportSchema + > + + /** + * `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 SourceSchema = z + .object({ + ach_credit_transfer: SourceTypeAchCreditTransferSchema.optional(), + ach_debit: SourceTypeAchDebitSchema.optional(), + acss_debit: SourceTypeAcssDebitSchema.optional(), + alipay: SourceTypeAlipaySchema.optional(), + /** 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: z + .enum(['always', 'limited', 'unspecified']) + .nullable() + .describe( + '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”.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + au_becs_debit: SourceTypeAuBecsDebitSchema.optional(), + bancontact: SourceTypeBancontactSchema.optional(), + card: SourceTypeCardSchema.optional(), + card_present: SourceTypeCardPresentSchema.optional(), + /** The client secret of the source. Used for client-side retrieval using a publishable key. */ + client_secret: z + .string() + .max(5000) + .describe( + 'The client secret of the source. Used for client-side retrieval using a publishable key.' + ), + code_verification: SourceCodeVerificationFlowSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + eps: SourceTypeEpsSchema.optional(), + /** The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. */ + flow: z + .string() + .max(5000) + .describe( + 'The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.' + ), + giropay: SourceTypeGiropaySchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + ideal: SourceTypeIdealSchema.optional(), + klarna: SourceTypeKlarnaSchema.optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + multibanco: SourceTypeMultibancoSchema.optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('source') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner: SourceOwnerSchema.nullable() + .describe( + 'Information about the owner of the payment instrument that may be used or required by particular source types.' + ) + .optional(), + p24: SourceTypeP24Schema.optional(), + receiver: SourceReceiverFlowSchema.optional(), + redirect: SourceRedirectFlowSchema.optional(), + sepa_debit: SourceTypeSepaDebitSchema.optional(), + sofort: SourceTypeSofortSchema.optional(), + source_order: SourceOrderSchema.optional(), + /** Extra information about a source. This will appear on your customer's statement every time you charge the source. */ + statement_descriptor: z + .string() + .max(5000) + .nullable() + .describe( + "Extra information about a source. This will appear on your customer's statement every time you charge the source." + ) + .optional(), + /** The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. */ + status: z + .string() + .max(5000) + .describe( + 'The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.' + ), + three_d_secure: SourceTypeThreeDSecureSchema.optional(), + /** 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: z + .enum([ + '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' + ]) + .describe( + '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.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + wechat: SourceTypeWechatSchema.optional() + }) + .describe( + "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers)." + ) + export type Source = z.infer + + /** + * 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 BillingPortalSessionSchema = z + .object({ + /** The configuration used by this session, describing the features available. */ + configuration: z + .union([z.string().max(5000), BillingPortalConfigurationSchema]) + .describe( + 'The configuration used by this session, describing the features available.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The ID of the customer for this session. */ + customer: z + .string() + .max(5000) + .describe('The ID of the customer for this session.'), + /** 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: PortalFlowsFlowSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .enum([ + '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' + ]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing_portal.session') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** The URL to redirect customers to when they click on the portal's link to return to your website. */ + return_url: z + .string() + .max(5000) + .nullable() + .describe( + "The URL to redirect customers to when they click on the portal's link to return to your website." + ) + .optional(), + /** The short-lived URL of the session that gives customers access to the customer portal. */ + url: z + .string() + .max(5000) + .describe( + 'The short-lived URL of the session that gives customers access to the customer portal.' + ) + }) + .describe( + "The Billing customer portal is a Stripe-hosted UI for subscription and\nbilling management.\n\nA portal configuration describes the functionality and features that you\nwant to provide to your customers through the portal.\n\nA portal session describes the instantiation of the customer portal for\na particular customer. By visiting the session's URL, the customer\ncan manage their subscriptions and billing details. For security reasons,\nsessions are short-lived and will expire if the customer does not visit the URL.\nCreate sessions on-demand when customers intend to manage their subscriptions\nand billing details.\n\nRelated guide: [Customer management](/customer-management)" + ) + export type BillingPortalSession = z.infer + + /** You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. */ + export const IssuingCardSchema = z + .object({ + /** The brand of the card. */ + brand: z.string().max(5000).describe('The brand of the card.'), + /** The reason why the card was canceled. */ + cancellation_reason: z + .enum(['design_rejected', 'lost', 'stolen']) + .nullable() + .describe('The reason why the card was canceled.') + .optional(), + cardholder: IssuingCardholderSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** The expiration month of the card. */ + exp_month: z.number().int().describe('The expiration month of the card.'), + /** The expiration year of the card. */ + exp_year: z.number().int().describe('The expiration year of the card.'), + /** The financial account this card is attached to. */ + financial_account: z + .string() + .max(5000) + .nullable() + .describe('The financial account this card is attached to.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The last 4 digits of the card number. */ + last4: z + .string() + .max(5000) + .describe('The last 4 digits of the card number.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.card') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The personalization design object belonging to this card. */ + personalization_design: z + .union([z.string().max(5000), IssuingPersonalizationDesignSchema]) + .nullable() + .describe('The personalization design object belonging to this card.') + .optional(), + /** The latest card that replaces this card, if any. */ + replaced_by: z + .union([ + z.string().max(5000), + // TODO: Support recursive types for `IssuingCardSchema`. + z.any() + ]) + .nullable() + .describe('The latest card that replaces this card, if any.') + .optional(), + /** The card this card replaces, if any. */ + replacement_for: z + .union([ + z.string().max(5000), + // TODO: Support recursive types for `IssuingCardSchema`. + z.any() + ]) + .nullable() + .describe('The card this card replaces, if any.') + .optional(), + /** The reason why the previous card needed to be replaced. */ + replacement_reason: z + .enum(['damaged', 'expired', 'lost', 'stolen']) + .nullable() + .describe('The reason why the previous card needed to be replaced.') + .optional(), + /** Where and how the card will be shipped. */ + shipping: IssuingCardShippingSchema.nullable() + .describe('Where and how the card will be shipped.') + .optional(), + spending_controls: IssuingCardAuthorizationControlsSchema, + /** Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. */ + status: z + .enum(['active', 'canceled', 'inactive']) + .describe( + 'Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.' + ), + /** The type of the card. */ + type: z.enum(['physical', 'virtual']).describe('The type of the card.'), + /** Information relating to digital wallets (like Apple Pay and Google Pay). */ + wallets: IssuingCardWalletsSchema.nullable() + .describe( + 'Information relating to digital wallets (like Apple Pay and Google Pay).' + ) + .optional() + }) + .describe( + 'You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.' + ) + export type IssuingCard = z.infer + + /** + * 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 const IdentityVerificationSessionSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** If present, this property tells you the last error encountered when processing the verification. */ + last_error: GelatoSessionLastErrorSchema.nullable() + .describe( + 'If present, this property tells you the last error encountered when processing the verification.' + ) + .optional(), + /** ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) */ + last_verification_report: z + .union([z.string().max(5000), IdentityVerificationReportSchema]) + .nullable() + .describe( + 'ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)' + ) + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('identity.verification_session') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** A set of options for the session’s verification checks. */ + options: GelatoVerificationSessionOptionsSchema.nullable() + .describe('A set of options for the session’s verification checks.') + .optional(), + /** Details provided about the user being verified. These details may be shown to the user. */ + provided_details: GelatoProvidedDetailsSchema.nullable() + .describe( + 'Details provided about the user being verified. These details may be shown to the user.' + ) + .optional(), + /** Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. */ + redaction: VerificationSessionRedactionSchema.nullable() + .describe( + 'Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.' + ) + .optional(), + /** Token referencing a Customer resource. */ + related_customer: z + .string() + .max(5000) + .nullable() + .describe('Token referencing a Customer resource.') + .optional(), + /** Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). */ + status: z + .enum(['canceled', 'processing', 'requires_input', 'verified']) + .describe( + 'Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).' + ), + /** The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. */ + type: z + .enum(['document', 'id_number', 'verification_flow']) + .describe( + 'The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The configuration token of a verification flow from the dashboard. */ + verification_flow: z + .string() + .max(5000) + .describe( + 'The configuration token of a verification flow from the dashboard.' + ) + .optional(), + /** The user’s verified data. */ + verified_outputs: GelatoVerifiedOutputsSchema.nullable() + .describe('The user’s verified data.') + .optional() + }) + .describe( + "A VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what [verification\ncheck](/docs/identity/verification-checks) to perform. Only create one VerificationSession for\neach verification in your system.\n\nA VerificationSession transitions through [multiple\nstatuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user's verified data after\nverification checks are complete.\n\nRelated guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)" + ) + export type IdentityVerificationSession = z.infer< + typeof IdentityVerificationSessionSchema + > + + /** + * 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 const SourceMandateNotificationSchema = z + .object({ + acss_debit: SourceMandateNotificationAcssDebitDataSchema.optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + bacs_debit: SourceMandateNotificationBacsDebitDataSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('source_mandate_notification') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. */ + reason: z + .string() + .max(5000) + .describe( + 'The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.' + ), + sepa_debit: SourceMandateNotificationSepaDebitDataSchema.optional(), + source: SourceSchema, + /** The status of the mandate notification. Valid statuses are `pending` or `submitted`. */ + status: z + .string() + .max(5000) + .describe( + 'The status of the mandate notification. Valid statuses are `pending` or `submitted`.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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`.' + ) + }) + .describe( + 'Source mandate notifications should be created when a notification related to\na source mandate must be sent to the payer. They will trigger a webhook or\ndeliver an email to the customer.' + ) + export type SourceMandateNotification = z.infer< + typeof SourceMandateNotificationSchema + > + + export const PaymentIntentNextActionSchema = z.object({ + alipay_handle_redirect: + PaymentIntentNextActionAlipayHandleRedirectSchema.optional(), + boleto_display_details: PaymentIntentNextActionBoletoSchema.optional(), + card_await_notification: + PaymentIntentNextActionCardAwaitNotificationSchema.optional(), + cashapp_handle_redirect_or_display_qr_code: + PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeSchema.optional(), + display_bank_transfer_instructions: + PaymentIntentNextActionDisplayBankTransferInstructionsSchema.optional(), + konbini_display_details: PaymentIntentNextActionKonbiniSchema.optional(), + multibanco_display_details: + PaymentIntentNextActionDisplayMultibancoDetailsSchema.optional(), + oxxo_display_details: + PaymentIntentNextActionDisplayOxxoDetailsSchema.optional(), + paynow_display_qr_code: + PaymentIntentNextActionPaynowDisplayQrCodeSchema.optional(), + pix_display_qr_code: + PaymentIntentNextActionPixDisplayQrCodeSchema.optional(), + promptpay_display_qr_code: + PaymentIntentNextActionPromptpayDisplayQrCodeSchema.optional(), + redirect_to_url: PaymentIntentNextActionRedirectToUrlSchema.optional(), + swish_handle_redirect_or_display_qr_code: + PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeSchema.optional(), + /** Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ + type: z + .string() + .max(5000) + .describe( + 'Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.' + ), + /** 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: z + .record(z.any()) + .describe( + '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.' + ) + .optional(), + verify_with_microdeposits: + PaymentIntentNextActionVerifyWithMicrodepositsSchema.optional(), + wechat_pay_display_qr_code: + PaymentIntentNextActionWechatPayDisplayQrCodeSchema.optional(), + wechat_pay_redirect_to_android_app: + PaymentIntentNextActionWechatPayRedirectToAndroidAppSchema.optional(), + wechat_pay_redirect_to_ios_app: + PaymentIntentNextActionWechatPayRedirectToIosAppSchema.optional() + }) + export type PaymentIntentNextAction = z.infer< + typeof PaymentIntentNextActionSchema + > + + /** 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 const IssuingTokenSchema = z + .object({ + /** Card associated with this token. */ + card: z + .union([z.string().max(5000), IssuingCardSchema]) + .describe('Card associated with this token.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The hashed ID derived from the device ID from the card network associated with the token. */ + device_fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'The hashed ID derived from the device ID from the card network associated with the token.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The last four digits of the token. */ + last4: z + .string() + .max(5000) + .describe('The last four digits of the token.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The token service provider / card network associated with the token. */ + network: z + .enum(['mastercard', 'visa']) + .describe( + 'The token service provider / card network associated with the token.' + ), + network_data: IssuingNetworkTokenNetworkDataSchema.optional(), + /** Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. */ + network_updated_at: z + .number() + .int() + .describe( + 'Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.token') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The usage state of the token. */ + status: z + .enum(['active', 'deleted', 'requested', 'suspended']) + .describe('The usage state of the token.'), + /** The digital wallet for this token, if one was used. */ + wallet_provider: z + .enum(['apple_pay', 'google_pay', 'samsung_pay']) + .describe('The digital wallet for this token, if one was used.') + .optional() + }) + .describe( + '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 IssuingToken = z.infer + + export const CheckoutSessionPaymentMethodOptionsSchema = z.object({ + acss_debit: CheckoutAcssDebitPaymentMethodOptionsSchema.optional(), + affirm: CheckoutAffirmPaymentMethodOptionsSchema.optional(), + afterpay_clearpay: + CheckoutAfterpayClearpayPaymentMethodOptionsSchema.optional(), + alipay: CheckoutAlipayPaymentMethodOptionsSchema.optional(), + amazon_pay: CheckoutAmazonPayPaymentMethodOptionsSchema.optional(), + au_becs_debit: CheckoutAuBecsDebitPaymentMethodOptionsSchema.optional(), + bacs_debit: CheckoutBacsDebitPaymentMethodOptionsSchema.optional(), + bancontact: CheckoutBancontactPaymentMethodOptionsSchema.optional(), + boleto: CheckoutBoletoPaymentMethodOptionsSchema.optional(), + card: CheckoutCardPaymentMethodOptionsSchema.optional(), + cashapp: CheckoutCashappPaymentMethodOptionsSchema.optional(), + customer_balance: + CheckoutCustomerBalancePaymentMethodOptionsSchema.optional(), + eps: CheckoutEpsPaymentMethodOptionsSchema.optional(), + fpx: CheckoutFpxPaymentMethodOptionsSchema.optional(), + giropay: CheckoutGiropayPaymentMethodOptionsSchema.optional(), + grabpay: CheckoutGrabPayPaymentMethodOptionsSchema.optional(), + ideal: CheckoutIdealPaymentMethodOptionsSchema.optional(), + kakao_pay: CheckoutKakaoPayPaymentMethodOptionsSchema.optional(), + klarna: CheckoutKlarnaPaymentMethodOptionsSchema.optional(), + konbini: CheckoutKonbiniPaymentMethodOptionsSchema.optional(), + kr_card: CheckoutKrCardPaymentMethodOptionsSchema.optional(), + link: CheckoutLinkPaymentMethodOptionsSchema.optional(), + mobilepay: CheckoutMobilepayPaymentMethodOptionsSchema.optional(), + multibanco: CheckoutMultibancoPaymentMethodOptionsSchema.optional(), + naver_pay: CheckoutNaverPayPaymentMethodOptionsSchema.optional(), + oxxo: CheckoutOxxoPaymentMethodOptionsSchema.optional(), + p24: CheckoutP24PaymentMethodOptionsSchema.optional(), + payco: CheckoutPaycoPaymentMethodOptionsSchema.optional(), + paynow: CheckoutPaynowPaymentMethodOptionsSchema.optional(), + paypal: CheckoutPaypalPaymentMethodOptionsSchema.optional(), + pix: CheckoutPixPaymentMethodOptionsSchema.optional(), + revolut_pay: CheckoutRevolutPayPaymentMethodOptionsSchema.optional(), + samsung_pay: CheckoutSamsungPayPaymentMethodOptionsSchema.optional(), + sepa_debit: CheckoutSepaDebitPaymentMethodOptionsSchema.optional(), + sofort: CheckoutSofortPaymentMethodOptionsSchema.optional(), + swish: CheckoutSwishPaymentMethodOptionsSchema.optional(), + us_bank_account: CheckoutUsBankAccountPaymentMethodOptionsSchema.optional() + }) + export type CheckoutSessionPaymentMethodOptions = z.infer< + typeof CheckoutSessionPaymentMethodOptionsSchema + > + + export const PaymentIntentPaymentMethodOptionsSchema = z.object({ + acss_debit: z + .union([ + PaymentIntentPaymentMethodOptionsAcssDebitSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + affirm: z + .union([ + PaymentMethodOptionsAffirmSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + afterpay_clearpay: z + .union([ + PaymentMethodOptionsAfterpayClearpaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + alipay: z + .union([ + PaymentMethodOptionsAlipaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + alma: z + .union([ + PaymentMethodOptionsAlmaSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + amazon_pay: z + .union([ + PaymentMethodOptionsAmazonPaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + au_becs_debit: z + .union([ + PaymentIntentPaymentMethodOptionsAuBecsDebitSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + bacs_debit: z + .union([ + PaymentIntentPaymentMethodOptionsBacsDebitSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + bancontact: z + .union([ + PaymentMethodOptionsBancontactSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + blik: z + .union([ + PaymentIntentPaymentMethodOptionsBlikSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + boleto: z + .union([ + PaymentMethodOptionsBoletoSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + card: z + .union([ + PaymentIntentPaymentMethodOptionsCardSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + card_present: z + .union([ + PaymentMethodOptionsCardPresentSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + cashapp: z + .union([ + PaymentMethodOptionsCashappSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + customer_balance: z + .union([ + PaymentMethodOptionsCustomerBalanceSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + eps: z + .union([ + PaymentIntentPaymentMethodOptionsEpsSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + fpx: z + .union([ + PaymentMethodOptionsFpxSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + giropay: z + .union([ + PaymentMethodOptionsGiropaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + grabpay: z + .union([ + PaymentMethodOptionsGrabpaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + ideal: z + .union([ + PaymentMethodOptionsIdealSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + interac_present: z + .union([ + PaymentMethodOptionsInteracPresentSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + kakao_pay: z + .union([ + PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptionsSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + klarna: z + .union([ + PaymentMethodOptionsKlarnaSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + konbini: z + .union([ + PaymentMethodOptionsKonbiniSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + kr_card: z + .union([ + PaymentMethodOptionsKrCardSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + link: z + .union([ + PaymentIntentPaymentMethodOptionsLinkSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + mobilepay: z + .union([ + PaymentIntentPaymentMethodOptionsMobilepaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + multibanco: z + .union([ + PaymentMethodOptionsMultibancoSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + naver_pay: z + .union([ + PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptionsSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + oxxo: z + .union([ + PaymentMethodOptionsOxxoSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + p24: z + .union([ + PaymentMethodOptionsP24Schema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + pay_by_bank: z + .union([ + PaymentMethodOptionsPayByBankSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + payco: z + .union([ + PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptionsSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + paynow: z + .union([ + PaymentMethodOptionsPaynowSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + paypal: z + .union([ + PaymentMethodOptionsPaypalSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + pix: z + .union([ + PaymentMethodOptionsPixSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + promptpay: z + .union([ + PaymentMethodOptionsPromptpaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + revolut_pay: z + .union([ + PaymentMethodOptionsRevolutPaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + samsung_pay: z + .union([ + PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptionsSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + sepa_debit: z + .union([ + PaymentIntentPaymentMethodOptionsSepaDebitSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + sofort: z + .union([ + PaymentMethodOptionsSofortSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + swish: z + .union([ + PaymentIntentPaymentMethodOptionsSwishSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + twint: z + .union([ + PaymentMethodOptionsTwintSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + us_bank_account: z + .union([ + PaymentIntentPaymentMethodOptionsUsBankAccountSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + wechat_pay: z + .union([ + PaymentMethodOptionsWechatPaySchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional(), + zip: z + .union([ + PaymentMethodOptionsZipSchema, + PaymentIntentTypeSpecificPaymentMethodOptionsClientSchema + ]) + .optional() + }) + export type PaymentIntentPaymentMethodOptions = z.infer< + typeof PaymentIntentPaymentMethodOptionsSchema + > + + /** + * 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 AccountSchema = z + .object({ + /** Business information about the account. */ + business_profile: AccountBusinessProfileSchema.nullable() + .describe('Business information about the account.') + .optional(), + /** The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. */ + business_type: z + .enum(['company', 'government_entity', 'individual', 'non_profit']) + .nullable() + .describe( + 'The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.' + ) + .optional(), + capabilities: AccountCapabilitiesSchema.optional(), + /** Whether the account can process charges. */ + charges_enabled: z + .boolean() + .describe('Whether the account can process charges.') + .optional(), + company: LegalEntityCompanySchema.optional(), + controller: AccountUnificationAccountControllerSchema.optional(), + /** The account's country. */ + country: z + .string() + .max(5000) + .describe("The account's country.") + .optional(), + /** Time at which the account was connected. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the account was connected. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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)." + ) + .optional(), + /** 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: z + .boolean() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .object({ + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: z + .array(z.union([BankAccountSchema, CardSchema])) + .describe( + 'The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.' + ), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe( + '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.' + ) + .optional(), + future_requirements: AccountFutureRequirementsSchema.optional(), + /** The groups associated with the account. */ + groups: AccountGroupMembershipSchema.nullable() + .describe('The groups associated with the account.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + individual: PersonSchema.optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('account') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Whether the funds in this account can be paid out. */ + payouts_enabled: z + .boolean() + .describe('Whether the funds in this account can be paid out.') + .optional(), + requirements: AccountRequirementsSchema.optional(), + /** Options for customizing how the account functions within Stripe. */ + settings: AccountSettingsSchema.nullable() + .describe( + 'Options for customizing how the account functions within Stripe.' + ) + .optional(), + tos_acceptance: AccountTosAcceptanceSchema.optional(), + /** The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. */ + type: z + .enum(['custom', 'express', 'none', 'standard']) + .describe( + 'The Stripe account type. Can be `standard`, `express`, `custom`, or `none`.' + ) + .optional() + }) + .describe( + 'This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection)\nis `application`, which includes Custom accounts, the properties below are always\nreturned.\n\nFor accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection)\nis `stripe`, which includes Standard and Express accounts, some properties are only returned\nuntil you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions)\nto start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts).' + ) + export type Account = z.infer + + /** + * 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 const BankAccountSchema = z + .object({ + /** The ID of the account that the bank account is associated with. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + 'The ID of the account that the bank account is associated with.' + ) + .optional(), + /** The name of the person or business that owns the bank account. */ + account_holder_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The name of the person or business that owns the bank account.' + ) + .optional(), + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type: z + .string() + .max(5000) + .nullable() + .describe( + 'The type of entity that holds the account. This can be either `individual` or `company`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.' + ) + .optional(), + /** 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: z + .array(z.enum(['instant', 'standard'])) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Name of the bank associated with the routing number (e.g., `WELLS FARGO`). */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe( + 'Name of the bank associated with the routing number (e.g., `WELLS FARGO`).' + ) + .optional(), + /** Two-letter ISO code representing the country the bank account is located in. */ + country: z + .string() + .max(5000) + .describe( + 'Two-letter ISO code representing the country the bank account is located in.' + ), + /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: z + .string() + .describe( + 'Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.' + ), + /** The ID of the customer that the bank account is associated with. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + 'The ID of the customer that the bank account is associated with.' + ) + .optional(), + /** Whether this bank account is the default external account for its currency. */ + default_for_currency: z + .boolean() + .nullable() + .describe( + 'Whether this bank account is the default external account for its currency.' + ) + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** 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: ExternalAccountRequirementsSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .describe('The last four digits of the bank account 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('bank_account') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Information about the requirements for the bank account, including what information needs to be collected. */ + requirements: ExternalAccountRequirementsSchema.nullable() + .describe( + 'Information about the requirements for the bank account, including what information needs to be collected.' + ) + .optional(), + /** The routing transit number for the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('The routing transit number for the bank account.') + .optional(), + /** + * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, 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 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` and `verification_failed`. 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: z + .string() + .max(5000) + .describe( + "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, 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 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.\n\nFor external accounts, possible values are `new`, `errored` and `verification_failed`. 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." + ) + }) + .describe( + 'These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](/api#external_accounts) are transfer\ndestinations on `Account` objects for connected accounts.\nThey can be bank accounts or debit cards as well, and are documented in the links above.\n\nRelated guide: [Bank debits and transfers](/payments/bank-debits-transfers)' + ) + export type BankAccount = z.infer + + /** + * 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 CustomerSchema = z + .object({ + /** The customer's address. */ + address: AddressSchema.nullable() + .describe("The customer's address.") + .optional(), + /** The current balance, if any, that's stored on the customer. 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. */ + balance: z + .number() + .int() + .describe( + "The current balance, if any, that's stored on the customer. 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." + ) + .optional(), + /** 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: CashBalanceSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. */ + currency: z + .string() + .max(5000) + .nullable() + .describe( + 'Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.' + ) + .optional(), + /** + * 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: z + .union([ + z.string().max(5000), + BankAccountSchema, + CardSchema, + SourceSchema + ]) + .nullable() + .describe( + 'ID of the default payment source for the customer.\n\nIf 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.' + ) + .optional(), + /** + * 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: z + .boolean() + .nullable() + .describe( + "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`.\n\nIf an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.\n\nIf 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`." + ) + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Describes the current discount active on the customer, if there is one. */ + discount: DiscountSchema.nullable() + .describe( + 'Describes the current discount active on the customer, if there is one.' + ) + .optional(), + /** The customer's email address. */ + email: z + .string() + .max(5000) + .nullable() + .describe("The customer's email address.") + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .record(z.number().int()) + .describe( + "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." + ) + .optional(), + /** The prefix for the customer used to generate unique invoice numbers. */ + invoice_prefix: z + .string() + .max(5000) + .nullable() + .describe( + 'The prefix for the customer used to generate unique invoice numbers.' + ) + .optional(), + invoice_settings: InvoiceSettingCustomerSettingSchema.optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ) + .optional(), + /** The customer's full name or business name. */ + name: z + .string() + .max(5000) + .nullable() + .describe("The customer's full name or business name.") + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('customer') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The customer's phone number. */ + phone: z + .string() + .max(5000) + .nullable() + .describe("The customer's phone number.") + .optional(), + /** The customer's preferred locales (languages), ordered by preference. */ + preferred_locales: z + .array(z.string().max(5000)) + .nullable() + .describe( + "The customer's preferred locales (languages), ordered by preference." + ) + .optional(), + /** Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ + shipping: ShippingSchema.nullable() + .describe( + 'Mailing and shipping address for the customer. Appears on invoices emailed to this customer.' + ) + .optional(), + /** The customer's payment sources, if any. */ + sources: z + .object({ + /** Details about each object. */ + data: z + .array(z.union([BankAccountSchema, CardSchema, SourceSchema])) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe("The customer's payment sources, if any.") + .optional(), + /** The customer's current subscriptions, if any. */ + subscriptions: z + .object({ + /** Details about each object. */ + data: z + .array(SubscriptionSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe("The customer's current subscriptions, if any.") + .optional(), + tax: CustomerTaxSchema.optional(), + /** 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: z + .enum(['exempt', 'none', 'reverse']) + .nullable() + .describe( + '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"**.' + ) + .optional(), + /** The customer's tax IDs. */ + tax_ids: z + .object({ + /** Details about each object. */ + data: z.array(TaxIdSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe("The customer's tax IDs.") + .optional(), + /** ID of the test clock that this customer belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock that this customer belongs to.') + .optional() + }) + .describe( + '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,\nand track payments that belong to the same customer.' + ) + export type Customer = z.infer + + /** + * 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 CardSchema = z + .object({ + /** The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. 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. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + 'The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. 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.' + ) + .optional(), + /** City/District/Suburb/Town/Village. */ + address_city: z + .string() + .max(5000) + .nullable() + .describe('City/District/Suburb/Town/Village.') + .optional(), + /** Billing address country, if provided when creating card. */ + address_country: z + .string() + .max(5000) + .nullable() + .describe('Billing address country, if provided when creating card.') + .optional(), + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1: z + .string() + .max(5000) + .nullable() + .describe('Address line 1 (Street address/PO Box/Company name).') + .optional(), + /** If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2: z + .string() + .max(5000) + .nullable() + .describe('Address line 2 (Apartment/Suite/Unit/Building).') + .optional(), + /** State/County/Province/Region. */ + address_state: z + .string() + .max(5000) + .nullable() + .describe('State/County/Province/Region.') + .optional(), + /** ZIP or postal code. */ + address_zip: z + .string() + .max(5000) + .nullable() + .describe('ZIP or postal code.') + .optional(), + /** If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_zip_check: z + .string() + .max(5000) + .nullable() + .describe( + 'If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.' + ) + .optional(), + /** 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: z + .enum(['always', 'limited', 'unspecified']) + .nullable() + .describe( + '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”.' + ) + .optional(), + /** 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: z + .array(z.enum(['instant', 'standard'])) + .nullable() + .describe( + 'A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.' + ) + .optional(), + /** Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. */ + brand: z + .string() + .max(5000) + .describe( + 'Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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 for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. */ + currency: z + .string() + .nullable() + .describe( + '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 for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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)." + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional(), + /** (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4: z + .string() + .max(5000) + .nullable() + .describe( + '(For tokenized numbers only.) The last four digits of the device account number.' + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Issuer identification number of the card. */ + iin: z + .string() + .max(5000) + .describe('Issuer identification number of the card.') + .optional(), + /** The last four digits of the card. */ + last4: z.string().max(5000).describe('The last four digits of the card.'), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Cardholder name. */ + name: z + .string() + .max(5000) + .nullable() + .describe('Cardholder name.') + .optional(), + networks: TokenCardNetworksSchema.optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('card') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Status of a card based on the card issuer. */ + regulated_status: z + .enum(['regulated', 'unregulated']) + .nullable() + .describe('Status of a card based on the card issuer.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + 'You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)' + ) + export type Card = z.infer + + /** + * 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 DiscountSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + coupon: CouponSchema, + /** The ID of the customer associated with this discount. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe('The ID of the customer associated with this discount.') + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + /** The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. */ + invoice: z + .string() + .max(5000) + .nullable() + .describe( + "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('discount') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The promotion code applied to create this discount. */ + promotion_code: z + .union([z.string().max(5000), PromotionCodeSchema]) + .nullable() + .describe('The promotion code applied to create this discount.') + .optional(), + /** Date that the coupon was applied. */ + start: z.number().int().describe('Date that the coupon was applied.'), + /** The subscription that this coupon is applied to, if it is applied to a particular subscription. */ + subscription: z + .string() + .max(5000) + .nullable() + .describe( + 'The subscription that this coupon is applied to, if it is applied to a particular subscription.' + ) + .optional(), + /** The subscription item that this coupon is applied to, if it is applied to a particular subscription item. */ + subscription_item: z + .string() + .max(5000) + .nullable() + .describe( + 'The subscription item that this coupon is applied to, if it is applied to a particular subscription item.' + ) + .optional() + }) + .describe( + '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).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)' + ) + export type Discount = z.infer + + /** + * A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to + * create multiple codes for a single coupon. + */ + export const PromotionCodeSchema = z + .object({ + /** Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. */ + active: z + .boolean() + .describe( + 'Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + coupon: CouponSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The customer that this promotion code can be used by. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe('The customer that this promotion code can be used by.') + .optional(), + /** Date at which the promotion code can no longer be redeemed. */ + expires_at: z + .number() + .int() + .nullable() + .describe('Date at which the promotion code can no longer be redeemed.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** Maximum number of times this promotion code can be redeemed. */ + max_redemptions: z + .number() + .int() + .nullable() + .describe( + 'Maximum number of times this promotion code can be redeemed.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('promotion_code') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + restrictions: PromotionCodesResourceRestrictionsSchema, + /** Number of times this promotion code has been used. */ + times_redeemed: z + .number() + .int() + .describe('Number of times this promotion code has been used.') + }) + .describe( + 'A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.' + ) + export type PromotionCode = z.infer + + export const InvoiceSettingCustomerSettingSchema = z.object({ + /** Default custom fields to be displayed on invoices for this customer. */ + custom_fields: z + .array(InvoiceSettingCustomFieldSchema) + .nullable() + .describe( + 'Default custom fields to be displayed on invoices for this customer.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** Default footer to be displayed on invoices for this customer. */ + footer: z + .string() + .max(5000) + .nullable() + .describe('Default footer to be displayed on invoices for this customer.') + .optional(), + /** Default options for invoice PDF rendering for this customer. */ + rendering_options: InvoiceSettingCustomerRenderingOptionsSchema.nullable() + .describe('Default options for invoice PDF rendering for this customer.') + .optional() + }) + export type InvoiceSettingCustomerSetting = z.infer< + typeof InvoiceSettingCustomerSettingSchema + > + + /** + * 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 PaymentMethodSchema = z + .object({ + acss_debit: PaymentMethodAcssDebitSchema.optional(), + affirm: PaymentMethodAffirmSchema.optional(), + afterpay_clearpay: PaymentMethodAfterpayClearpaySchema.optional(), + alipay: PaymentFlowsPrivatePaymentMethodsAlipaySchema.optional(), + /** 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: z + .enum(['always', 'limited', 'unspecified']) + .describe( + '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”.' + ) + .optional(), + alma: PaymentMethodAlmaSchema.optional(), + amazon_pay: PaymentMethodAmazonPaySchema.optional(), + au_becs_debit: PaymentMethodAuBecsDebitSchema.optional(), + bacs_debit: PaymentMethodBacsDebitSchema.optional(), + bancontact: PaymentMethodBancontactSchema.optional(), + billing_details: BillingDetailsSchema, + blik: PaymentMethodBlikSchema.optional(), + boleto: PaymentMethodBoletoSchema.optional(), + card: PaymentMethodCardSchema.optional(), + card_present: PaymentMethodCardPresentSchema.optional(), + cashapp: PaymentMethodCashappSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .union([z.string().max(5000), CustomerSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + customer_balance: PaymentMethodCustomerBalanceSchema.optional(), + eps: PaymentMethodEpsSchema.optional(), + fpx: PaymentMethodFpxSchema.optional(), + giropay: PaymentMethodGiropaySchema.optional(), + grabpay: PaymentMethodGrabpaySchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + ideal: PaymentMethodIdealSchema.optional(), + interac_present: PaymentMethodInteracPresentSchema.optional(), + kakao_pay: PaymentMethodKakaoPaySchema.optional(), + klarna: PaymentMethodKlarnaSchema.optional(), + konbini: PaymentMethodKonbiniSchema.optional(), + kr_card: PaymentMethodKrCardSchema.optional(), + link: PaymentMethodLinkSchema.optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + mobilepay: PaymentMethodMobilepaySchema.optional(), + multibanco: PaymentMethodMultibancoSchema.optional(), + naver_pay: PaymentMethodNaverPaySchema.optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('payment_method') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + oxxo: PaymentMethodOxxoSchema.optional(), + p24: PaymentMethodP24Schema.optional(), + pay_by_bank: PaymentMethodPayByBankSchema.optional(), + payco: PaymentMethodPaycoSchema.optional(), + paynow: PaymentMethodPaynowSchema.optional(), + paypal: PaymentMethodPaypalSchema.optional(), + pix: PaymentMethodPixSchema.optional(), + promptpay: PaymentMethodPromptpaySchema.optional(), + radar_options: RadarRadarOptionsSchema.optional(), + revolut_pay: PaymentMethodRevolutPaySchema.optional(), + samsung_pay: PaymentMethodSamsungPaySchema.optional(), + sepa_debit: PaymentMethodSepaDebitSchema.optional(), + sofort: PaymentMethodSofortSchema.optional(), + swish: PaymentMethodSwishSchema.optional(), + twint: PaymentMethodTwintSchema.optional(), + /** 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: z + .enum([ + 'acss_debit', + 'affirm', + 'afterpay_clearpay', + 'alipay', + 'alma', + 'amazon_pay', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'blik', + 'boleto', + 'card', + 'card_present', + 'cashapp', + 'customer_balance', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'interac_present', + 'kakao_pay', + 'klarna', + 'konbini', + 'kr_card', + 'link', + 'mobilepay', + 'multibanco', + 'naver_pay', + 'oxxo', + 'p24', + 'pay_by_bank', + 'payco', + 'paynow', + 'paypal', + 'pix', + 'promptpay', + 'revolut_pay', + 'samsung_pay', + 'sepa_debit', + 'sofort', + 'swish', + 'twint', + 'us_bank_account', + 'wechat_pay', + 'zip' + ]) + .describe( + '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.' + ), + us_bank_account: PaymentMethodUsBankAccountSchema.optional(), + wechat_pay: PaymentMethodWechatPaySchema.optional(), + zip: PaymentMethodZipSchema.optional() + }) + .describe( + "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios)." + ) + export type PaymentMethod = z.infer + + export const PaymentMethodCardSchema = z.object({ + /** Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: z + .string() + .max(5000) + .describe( + 'Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.' + ), + /** Checks on Card address and CVC if provided. */ + checks: PaymentMethodCardChecksSchema.nullable() + .describe('Checks on Card address and CVC if provided.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Two-digit number representing the card's expiration month. */ + exp_month: z + .number() + .int() + .describe("Two-digit number representing the card's expiration month."), + /** Four-digit number representing the card's expiration year. */ + exp_year: z + .number() + .int() + .describe("Four-digit number representing the card's expiration year."), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.\n\n*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.*' + ) + .optional(), + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: z + .string() + .max(5000) + .describe( + 'Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.' + ), + /** Details of the original PaymentMethod that created this object. */ + generated_from: PaymentMethodCardGeneratedCardSchema.nullable() + .describe( + 'Details of the original PaymentMethod that created this object.' + ) + .optional(), + /** The last four digits of the card. */ + last4: z.string().max(5000).describe('The last four digits of the card.'), + /** Contains information about card networks that can be used to process the payment. */ + networks: NetworksSchema.nullable() + .describe( + 'Contains information about card networks that can be used to process the payment.' + ) + .optional(), + /** Status of a card based on the card issuer. */ + regulated_status: z + .enum(['regulated', 'unregulated']) + .nullable() + .describe('Status of a card based on the card issuer.') + .optional(), + /** Contains details on how this Card may be used for 3D Secure authentication. */ + three_d_secure_usage: ThreeDSecureUsageSchema.nullable() + .describe( + 'Contains details on how this Card may be used for 3D Secure authentication.' + ) + .optional(), + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet: PaymentMethodCardWalletSchema.nullable() + .describe( + 'If this Card is part of a card wallet, this contains the details of the card wallet.' + ) + .optional() + }) + export type PaymentMethodCard = z.infer + + export const PaymentMethodCardGeneratedCardSchema = z.object({ + /** The charge that created this object. */ + charge: z + .string() + .max(5000) + .nullable() + .describe('The charge that created this object.') + .optional(), + /** Transaction-specific details of the payment method used in the payment. */ + payment_method_details: + CardGeneratedFromPaymentMethodDetailsSchema.nullable() + .describe( + 'Transaction-specific details of the payment method used in the payment.' + ) + .optional(), + /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */ + setup_attempt: z + .union([z.string().max(5000), SetupAttemptSchema]) + .nullable() + .describe( + 'The ID of the SetupAttempt that generated this PaymentMethod, if any.' + ) + .optional() + }) + export type PaymentMethodCardGeneratedCard = z.infer< + typeof PaymentMethodCardGeneratedCardSchema + > + + /** + * 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 SetupAttemptSchema = z + .object({ + /** 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: z + .union([z.string().max(5000), ApplicationSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** + * 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: z + .boolean() + .describe( + "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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." + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** + * 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: z + .array(z.enum(['inbound', 'outbound'])) + .nullable() + .describe( + 'Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('setup_attempt') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** ID of the payment method used with this SetupAttempt. */ + payment_method: z + .union([z.string().max(5000), PaymentMethodSchema]) + .describe('ID of the payment method used with this SetupAttempt.'), + payment_method_details: SetupAttemptPaymentMethodDetailsSchema, + /** The error encountered during this attempt to confirm the SetupIntent, if any. */ + setup_error: ApiErrorsSchema.nullable() + .describe( + 'The error encountered during this attempt to confirm the SetupIntent, if any.' + ) + .optional(), + /** ID of the SetupIntent that this attempt belongs to. */ + setup_intent: z + .union([z.string().max(5000), SetupIntentSchema]) + .describe('ID of the SetupIntent that this attempt belongs to.'), + /** Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. */ + status: z + .string() + .max(5000) + .describe( + 'Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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`.' + ) + }) + .describe( + 'A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation is successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.' + ) + export type SetupAttempt = z.infer + + export const SetupAttemptPaymentMethodDetailsSchema = z.object({ + acss_debit: SetupAttemptPaymentMethodDetailsAcssDebitSchema.optional(), + amazon_pay: SetupAttemptPaymentMethodDetailsAmazonPaySchema.optional(), + au_becs_debit: SetupAttemptPaymentMethodDetailsAuBecsDebitSchema.optional(), + bacs_debit: SetupAttemptPaymentMethodDetailsBacsDebitSchema.optional(), + bancontact: SetupAttemptPaymentMethodDetailsBancontactSchema.optional(), + boleto: SetupAttemptPaymentMethodDetailsBoletoSchema.optional(), + card: SetupAttemptPaymentMethodDetailsCardSchema.optional(), + card_present: SetupAttemptPaymentMethodDetailsCardPresentSchema.optional(), + cashapp: SetupAttemptPaymentMethodDetailsCashappSchema.optional(), + ideal: SetupAttemptPaymentMethodDetailsIdealSchema.optional(), + kakao_pay: SetupAttemptPaymentMethodDetailsKakaoPaySchema.optional(), + klarna: SetupAttemptPaymentMethodDetailsKlarnaSchema.optional(), + kr_card: SetupAttemptPaymentMethodDetailsKrCardSchema.optional(), + link: SetupAttemptPaymentMethodDetailsLinkSchema.optional(), + paypal: SetupAttemptPaymentMethodDetailsPaypalSchema.optional(), + revolut_pay: SetupAttemptPaymentMethodDetailsRevolutPaySchema.optional(), + sepa_debit: SetupAttemptPaymentMethodDetailsSepaDebitSchema.optional(), + sofort: SetupAttemptPaymentMethodDetailsSofortSchema.optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + us_bank_account: + SetupAttemptPaymentMethodDetailsUsBankAccountSchema.optional() + }) + export type SetupAttemptPaymentMethodDetails = z.infer< + typeof SetupAttemptPaymentMethodDetailsSchema + > + + export const SetupAttemptPaymentMethodDetailsBancontactSchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Bank Identifier Code of the bank associated with the bank account. */ + bic: z + .string() + .max(5000) + .nullable() + .describe( + 'Bank Identifier Code of the bank associated with the bank account.' + ) + .optional(), + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe( + 'The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** Last four characters of the IBAN. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language: z + .enum(['de', 'en', 'fr', 'nl']) + .nullable() + .describe( + 'Preferred language of the Bancontact authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by Bancontact directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional() + }) + export type SetupAttemptPaymentMethodDetailsBancontact = z.infer< + typeof SetupAttemptPaymentMethodDetailsBancontactSchema + > + + /** A Mandate is a record of the permission that your customer gives you to debit their payment method. */ + export const MandateSchema = z + .object({ + customer_acceptance: CustomerAcceptanceSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + multi_use: MandateMultiUseSchema.optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('mandate') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The account (if any) that the mandate is intended for. */ + on_behalf_of: z + .string() + .max(5000) + .describe('The account (if any) that the mandate is intended for.') + .optional(), + /** ID of the payment method associated with this mandate. */ + payment_method: z + .union([z.string().max(5000), PaymentMethodSchema]) + .describe('ID of the payment method associated with this mandate.'), + payment_method_details: MandatePaymentMethodDetailsSchema, + single_use: MandateSingleUseSchema.optional(), + /** The mandate status indicates whether or not you can use it to initiate a payment. */ + status: z + .enum(['active', 'inactive', 'pending']) + .describe( + 'The mandate status indicates whether or not you can use it to initiate a payment.' + ), + /** The type of the mandate. */ + type: z + .enum(['multi_use', 'single_use']) + .describe('The type of the mandate.') + }) + .describe( + 'A Mandate is a record of the permission that your customer gives you to debit their payment method.' + ) + export type Mandate = z.infer + + export const SetupAttemptPaymentMethodDetailsCardPresentSchema = z.object({ + /** The ID of the Card PaymentMethod which was generated by this SetupAttempt. */ + generated_card: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the Card PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** Details about payments collected offline. */ + offline: PaymentMethodDetailsCardPresentOfflineSchema.nullable() + .describe('Details about payments collected offline.') + .optional() + }) + export type SetupAttemptPaymentMethodDetailsCardPresent = z.infer< + typeof SetupAttemptPaymentMethodDetailsCardPresentSchema + > + + export const SetupAttemptPaymentMethodDetailsIdealSchema = z.object({ + /** The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. */ + bank: z + .enum([ + 'abn_amro', + 'asn_bank', + 'bunq', + 'handelsbanken', + 'ing', + 'knab', + 'moneyou', + 'n26', + 'nn', + 'rabobank', + 'regiobank', + 'revolut', + 'sns_bank', + 'triodos_bank', + 'van_lanschot', + 'yoursafe' + ]) + .nullable() + .describe( + "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`." + ) + .optional(), + /** The Bank Identifier Code of the customer's bank. */ + bic: z + .enum([ + 'ABNANL2A', + 'ASNBNL21', + 'BITSNL2A', + 'BUNQNL2A', + 'FVLBNL22', + 'HANDNL2A', + 'INGBNL2A', + 'KNABNL2H', + 'MOYONL21', + 'NNBANL2G', + 'NTSBDEB1', + 'RABONL2U', + 'RBRBNL21', + 'REVOIE23', + 'REVOLT21', + 'SNSBNL2A', + 'TRIONL2U' + ]) + .nullable() + .describe("The Bank Identifier Code of the customer's bank.") + .optional(), + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe( + 'The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** Last four characters of the IBAN. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by iDEAL directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional() + }) + export type SetupAttemptPaymentMethodDetailsIdeal = z.infer< + typeof SetupAttemptPaymentMethodDetailsIdealSchema + > + + export const SetupAttemptPaymentMethodDetailsSofortSchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Bank Identifier Code of the bank associated with the bank account. */ + bic: z + .string() + .max(5000) + .nullable() + .describe( + 'Bank Identifier Code of the bank associated with the bank account.' + ) + .optional(), + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe( + 'The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.' + ) + .optional(), + /** Last four characters of the IBAN. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** + * Preferred language of the Sofort authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language: z + .enum(['de', 'en', 'fr', 'nl']) + .nullable() + .describe( + 'Preferred language of the Sofort authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by Sofort directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional() + }) + export type SetupAttemptPaymentMethodDetailsSofort = z.infer< + typeof SetupAttemptPaymentMethodDetailsSofortSchema + > + + export const ApiErrorsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** For card errors, the ID of the failed charge. */ + charge: z + .string() + .max(5000) + .describe('For card errors, the ID of the failed charge.') + .optional(), + /** For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. */ + code: z + .string() + .max(5000) + .describe( + 'For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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." + ) + .optional(), + /** A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. */ + doc_url: z + .string() + .max(5000) + .describe( + 'A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.' + ) + .optional(), + /** A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */ + message: z + .string() + .max(40_000) + .describe( + 'A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. */ + network_decline_code: z + .string() + .max(5000) + .describe( + 'For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + payment_intent: PaymentIntentSchema.optional(), + payment_method: PaymentMethodSchema.optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** A URL to the request log entry in your dashboard. */ + request_log_url: z + .string() + .max(5000) + .describe('A URL to the request log entry in your dashboard.') + .optional(), + setup_intent: SetupIntentSchema.optional(), + /** The [source object](https://stripe.com/docs/api/sources/object) for errors returned on a request involving a source. */ + source: z + .union([BankAccountSchema, CardSchema, SourceSchema]) + .describe( + 'The [source object](https://stripe.com/docs/api/sources/object) for errors returned on a request involving a source.' + ) + .optional(), + /** The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` */ + type: z + .enum([ + 'api_error', + 'card_error', + 'idempotency_error', + 'invalid_request_error' + ]) + .describe( + 'The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`' + ) + }) + export type ApiErrors = z.infer + + /** + * 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 PaymentIntentSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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 that can be captured from this PaymentIntent. */ + amount_capturable: z + .number() + .int() + .describe('Amount that can be captured from this PaymentIntent.') + .optional(), + amount_details: z + .union([ + PaymentFlowsAmountDetailsSchema, + PaymentFlowsAmountDetailsClientSchema + ]) + .optional(), + /** Amount that this PaymentIntent collects. */ + amount_received: z + .number() + .int() + .describe('Amount that this PaymentIntent collects.') + .optional(), + /** ID of the Connect application that created the PaymentIntent. */ + application: z + .union([z.string().max(5000), ApplicationSchema]) + .nullable() + .describe( + 'ID of the Connect application that created the PaymentIntent.' + ) + .optional(), + /** 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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount: z + .number() + .int() + .nullable() + .describe( + "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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)." + ) + .optional(), + /** Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) */ + automatic_payment_methods: + PaymentFlowsAutomaticPaymentMethodsPaymentIntentSchema.nullable() + .describe( + 'Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)' + ) + .optional(), + /** Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** 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`, or `automatic`). */ + cancellation_reason: z + .enum([ + 'abandoned', + 'automatic', + 'duplicate', + 'failed_invoice', + 'fraudulent', + 'requested_by_customer', + 'void_invoice' + ]) + .nullable() + .describe( + '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`, or `automatic`).' + ) + .optional(), + /** Controls when the funds will be captured from the customer's account. */ + capture_method: z + .enum(['automatic', 'automatic_async', 'manual']) + .describe( + "Controls when the funds will be captured from the customer's account." + ), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe 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.\n\nRefer 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.' + ) + .optional(), + /** Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. */ + confirmation_method: z + .enum(['automatic', 'manual']) + .describe( + 'Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** + * 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: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf [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." + ) + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** ID of the invoice that created this PaymentIntent, if it exists. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .nullable() + .describe( + 'ID of the invoice that created this PaymentIntent, if it exists.' + ) + .optional(), + /** 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: ApiErrorsSchema.nullable() + .describe( + 'The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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).' + ) + .optional(), + /** 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: PaymentIntentNextActionSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('payment_intent') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** ID of the payment method used in this PaymentIntent. */ + payment_method: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe('ID of the payment method used in this PaymentIntent.') + .optional(), + /** Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. */ + payment_method_configuration_details: + PaymentMethodConfigBizPaymentMethodConfigurationDetailsSchema.nullable() + .describe( + 'Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent.' + ) + .optional(), + /** Payment-method-specific configuration for this PaymentIntent. */ + payment_method_options: PaymentIntentPaymentMethodOptionsSchema.nullable() + .describe( + 'Payment-method-specific configuration for this PaymentIntent.' + ) + .optional(), + /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types: z + .array(z.string().max(5000)) + .describe( + 'The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.' + ), + /** If present, this property tells you about the processing state of the payment. */ + processing: PaymentIntentProcessingSchema.nullable() + .describe( + 'If present, this property tells you about the processing state of the payment.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional(), + /** ID of the review associated with this PaymentIntent, if any. */ + review: z + .union([z.string().max(5000), ReviewSchema]) + .nullable() + .describe( + 'ID of the review associated with this PaymentIntent, if any.' + ) + .optional(), + /** + * 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: z + .enum(['off_session', 'on_session']) + .nullable() + .describe( + "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication)." + ) + .optional(), + /** Shipping information for this PaymentIntent. */ + shipping: ShippingSchema.nullable() + .describe('Shipping information for this PaymentIntent.') + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "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).\n\nSetting 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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .enum([ + 'canceled', + 'processing', + 'requires_action', + 'requires_capture', + 'requires_confirmation', + 'requires_payment_method', + 'succeeded' + ]) + .describe( + '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).' + ), + /** 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: TransferDataSchema.nullable() + .describe( + '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).' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional() + }) + .describe( + 'A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)' + ) + export type PaymentIntent = z.infer + + /** + * 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 InvoiceSchema = z + .object({ + /** The country of the business associated with this invoice, most often the business creating the invoice. */ + account_country: z + .string() + .max(5000) + .nullable() + .describe( + 'The country of the business associated with this invoice, most often the business creating the invoice.' + ) + .optional(), + /** The public name of the business associated with this invoice, most often the business creating the invoice. */ + account_name: z + .string() + .max(5000) + .nullable() + .describe( + 'The public name of the business associated with this invoice, most often the business creating the invoice.' + ) + .optional(), + /** The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ + account_tax_ids: z + .array(z.union([z.string().max(5000), TaxIdSchema, DeletedTaxIdSchema])) + .nullable() + .describe( + 'The account tax IDs associated with the invoice. Only editable when the invoice is a draft.' + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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`." + ), + /** The amount, in cents (or local equivalent), that was paid. */ + amount_paid: z + .number() + .int() + .describe('The amount, in cents (or local equivalent), that was paid.'), + /** The difference between amount_due and amount_paid, in cents (or local equivalent). */ + amount_remaining: z + .number() + .int() + .describe( + 'The difference between amount_due and amount_paid, in cents (or local equivalent).' + ), + /** This is the sum of all the shipping amounts. */ + amount_shipping: z + .number() + .int() + .describe('This is the sum of all the shipping amounts.'), + /** ID of the Connect Application that created the invoice. */ + application: z + .union([ + z.string().max(5000), + ApplicationSchema, + DeletedApplicationSchema + ]) + .nullable() + .describe('ID of the Connect Application that created the invoice.') + .optional(), + /** The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ + application_fee_amount: z + .number() + .int() + .nullable() + .describe( + "The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid." + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** 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: z + .boolean() + .describe( + '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.' + ), + /** 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: z + .boolean() + .describe( + "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." + ) + .optional(), + automatic_tax: AutomaticTaxSchema, + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** + * 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 simulated invoices, per the upcoming invoice endpoint. + */ + billing_reason: z + .enum([ + 'automatic_pending_invoice_item_invoice', + 'manual', + 'quote_accept', + 'subscription', + 'subscription_create', + 'subscription_cycle', + 'subscription_threshold', + 'subscription_update', + 'upcoming' + ]) + .nullable() + .describe( + 'Indicates the reason why the invoice was created.\n\n* `manual`: Unrelated to a subscription, for example, created via the invoice editor.\n* `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.\n* `subscription_create`: A new subscription was created.\n* `subscription_cycle`: A subscription advanced into a new period.\n* `subscription_threshold`: A subscription reached a billing threshold.\n* `subscription_update`: A subscription was updated.\n* `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.' + ) + .optional(), + /** ID of the latest charge generated for this invoice, if any. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe('ID of the latest charge generated for this invoice, if any.') + .optional(), + /** 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: z + .enum(['charge_automatically', 'send_invoice']) + .describe( + '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.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** Custom fields displayed on the invoice. */ + custom_fields: z + .array(InvoiceSettingCustomFieldSchema) + .nullable() + .describe('Custom fields displayed on the invoice.') + .optional(), + /** The ID of the customer who will be billed. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe('The ID of the customer who will be billed.') + .optional(), + /** 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: AddressSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: ShippingSchema.nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .enum(['exempt', 'none', 'reverse']) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .array(InvoicesResourceInvoiceTaxIdSchema) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .union([ + z.string().max(5000), + BankAccountSchema, + CardSchema, + SourceSchema + ]) + .nullable() + .describe( + "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." + ) + .optional(), + /** The tax rates applied to this invoice, if any. */ + default_tax_rates: z + .array(TaxRateSchema) + .describe('The tax rates applied to this invoice, if any.'), + /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard." + ) + .optional(), + /** Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. */ + discount: DiscountSchema.nullable() + .describe( + 'Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.' + ) + .optional(), + /** The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ + discounts: z + .array( + z.union([z.string().max(5000), DiscountSchema, DeletedDiscountSchema]) + ) + .describe( + 'The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.' + ), + /** The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. */ + due_date: z + .number() + .int() + .nullable() + .describe( + 'The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Footer displayed on the invoice. */ + footer: z + .string() + .max(5000) + .nullable() + .describe('Footer displayed on the invoice.') + .optional(), + /** Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + from_invoice: InvoicesResourceFromInvoiceSchema.nullable() + .describe( + 'Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. */ + id: z + .string() + .max(5000) + .describe( + 'Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.' + ) + .optional(), + /** The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. */ + invoice_pdf: z + .string() + .max(5000) + .nullable() + .describe( + 'The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.' + ) + .optional(), + issuer: ConnectAccountReferenceSchema, + /** The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ + last_finalization_error: ApiErrorsSchema.nullable() + .describe( + 'The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.' + ) + .optional(), + /** The ID of the most recent non-draft revision of this invoice */ + latest_revision: z + .union([ + z.string().max(5000), + // TODO: Support recursive types for `InvoiceSchema`. + z.any() + ]) + .nullable() + .describe( + 'The ID of the most recent non-draft revision of this invoice' + ) + .optional(), + /** 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: z + .object({ + /** Details about each object. */ + data: z.array(LineItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe( + '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.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. */ + next_payment_attempt: z + .number() + .int() + .nullable() + .describe( + 'The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('invoice') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. */ + paid: z + .boolean() + .describe( + "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance." + ), + /** Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. */ + paid_out_of_band: z + .boolean() + .describe( + "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe." + ), + /** The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .nullable() + .describe( + 'The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.' + ) + .optional(), + payment_settings: InvoicesPaymentSettingsSchema, + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** Total amount of all post-payment credit notes issued for this invoice. */ + post_payment_credit_notes_amount: z + .number() + .int() + .describe( + 'Total amount of all post-payment credit notes issued for this invoice.' + ), + /** Total amount of all pre-payment credit notes issued for this invoice. */ + pre_payment_credit_notes_amount: z + .number() + .int() + .describe( + 'Total amount of all pre-payment credit notes issued for this invoice.' + ), + /** The quote this invoice was generated from. */ + quote: z + .union([z.string().max(5000), QuoteSchema]) + .nullable() + .describe('The quote this invoice was generated from.') + .optional(), + /** This is the transaction number that appears on email receipts sent for this invoice. */ + receipt_number: z + .string() + .max(5000) + .nullable() + .describe( + 'This is the transaction number that appears on email receipts sent for this invoice.' + ) + .optional(), + /** The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. */ + rendering: InvoicesResourceInvoiceRenderingSchema.nullable() + .describe( + 'The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.' + ) + .optional(), + /** The details of the cost of shipping, including the ShippingRate applied on the invoice. */ + shipping_cost: InvoicesResourceShippingCostSchema.nullable() + .describe( + 'The details of the cost of shipping, including the ShippingRate applied on the invoice.' + ) + .optional(), + /** 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: ShippingSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** Extra information about an invoice for the customer's credit card statement. */ + statement_descriptor: z + .string() + .max(5000) + .nullable() + .describe( + "Extra information about an invoice for the customer's credit card statement." + ) + .optional(), + /** 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: z + .enum(['draft', 'open', 'paid', 'uncollectible', 'void']) + .nullable() + .describe( + 'The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)' + ) + .optional(), + status_transitions: InvoicesResourceStatusTransitionsSchema, + /** The subscription that this invoice was prepared for, if any. */ + subscription: z + .union([z.string().max(5000), SubscriptionSchema]) + .nullable() + .describe( + 'The subscription that this invoice was prepared for, if any.' + ) + .optional(), + /** Details about the subscription that created this invoice. */ + subscription_details: SubscriptionDetailsDataSchema.nullable() + .describe('Details about the subscription that created this invoice.') + .optional(), + /** Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ + subscription_proration_date: z + .number() + .int() + .describe( + 'Only set for upcoming invoices that preview prorations. The time used to calculate prorations.' + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + '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' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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' + ) + .optional(), + /** The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ + tax: z + .number() + .int() + .nullable() + .describe( + 'The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.' + ) + .optional(), + /** ID of the test clock this invoice belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock this invoice belongs to.') + .optional(), + threshold_reason: InvoiceThresholdReasonSchema.optional(), + /** Total after discounts and taxes. */ + total: z.number().int().describe('Total after discounts and taxes.'), + /** The aggregate amounts calculated per discount across all line items. */ + total_discount_amounts: z + .array(DiscountsResourceDiscountAmountSchema) + .nullable() + .describe( + 'The aggregate amounts calculated per discount across all line items.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.' + ) + .optional(), + /** 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: z + .array(InvoicesResourcePretaxCreditAmountSchema) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The aggregate amounts calculated per tax rate for all line items. */ + total_tax_amounts: z + .array(InvoiceTaxAmountSchema) + .describe( + 'The aggregate amounts calculated per tax rate for all line items.' + ), + /** The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ + transfer_data: InvoiceTransferDataSchema.nullable() + .describe( + 'The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)" + ) + export type Invoice = z.infer + + /** + * 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 TaxIdSchema = z + .object({ + /** Two-letter ISO code representing the country of the tax ID. */ + country: z + .string() + .max(5000) + .nullable() + .describe('Two-letter ISO code representing the country of the tax ID.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** ID of the customer. */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .nullable() + .describe('ID of the customer.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('tax_id') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The account or customer the tax ID belongs to. */ + owner: TaxIDsOwnerSchema.nullable() + .describe('The account or customer the tax ID belongs to.') + .optional(), + /** Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `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`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `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`, `kh_tin`, `kr_brn`, `kz_bin`, `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: z + .enum([ + 'ad_nrt', + 'ae_trn', + 'al_tin', + 'am_tin', + 'ao_tin', + 'ar_cuit', + 'au_abn', + 'au_arn', + 'ba_tin', + 'bb_tin', + 'bg_uic', + 'bh_vat', + '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', + 'cn_tin', + 'co_nit', + 'cr_tin', + 'de_stn', + 'do_rcn', + 'ec_ruc', + 'eg_tin', + 'es_cif', + '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', + 'kh_tin', + 'kr_brn', + 'kz_bin', + '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' + ]) + .describe( + 'Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `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`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `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`, `kh_tin`, `kr_brn`, `kz_bin`, `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`' + ), + /** Value of the tax ID. */ + value: z.string().max(5000).describe('Value of the tax ID.'), + /** Tax ID verification information. */ + verification: TaxIdVerificationSchema.nullable() + .describe('Tax ID verification information.') + .optional() + }) + .describe( + 'You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account.\nCustomer and account tax IDs get displayed on related invoices and credit notes.\n\nRelated 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 TaxId = z.infer + + export const TaxIDsOwnerSchema = z.object({ + /** The account being referenced when `type` is `account`. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .describe('The account being referenced when `type` is `account`.') + .optional(), + /** The Connect Application being referenced when `type` is `application`. */ + application: z + .union([z.string().max(5000), ApplicationSchema]) + .describe( + 'The Connect Application being referenced when `type` is `application`.' + ) + .optional(), + /** The customer being referenced when `type` is `customer`. */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .describe('The customer being referenced when `type` is `customer`.') + .optional(), + /** Type of owner referenced. */ + type: z + .enum(['account', 'application', 'customer', 'self']) + .describe('Type of owner referenced.') + }) + export type TaxIDsOwner = z.infer + + export const AutomaticTaxSchema = z.object({ + /** If Stripe disabled automatic tax, this enum describes why. */ + disabled_reason: z + .enum([ + 'finalization_requires_location_inputs', + 'finalization_system_error' + ]) + .nullable() + .describe('If Stripe disabled automatic tax, this enum describes why.') + .optional(), + /** 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: z + .boolean() + .describe( + '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.' + ), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional(), + /** The status of the most recent automated tax calculation for this invoice. */ + status: z + .enum(['complete', 'failed', 'requires_location_inputs']) + .nullable() + .describe( + 'The status of the most recent automated tax calculation for this invoice.' + ) + .optional() + }) + export type AutomaticTax = z.infer + + export const ConnectAccountReferenceSchema = z.object({ + /** The connected account being referenced when `type` is `account`. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'The connected account being referenced when `type` is `account`.' + ) + .optional(), + /** Type of the account referenced. */ + type: z + .enum(['account', 'self']) + .describe('Type of the account referenced.') + }) + export type ConnectAccountReference = z.infer< + typeof ConnectAccountReferenceSchema + > + + /** + * 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 transferring + * money to a different Stripe account through Connect also creates Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. + */ + export const ChargeSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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 in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). */ + amount_captured: z + .number() + .int() + .describe( + 'Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).' + ), + /** 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: z + .number() + .int() + .describe( + 'Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).' + ), + /** ID of the Connect application that created the charge. */ + application: z + .union([z.string().max(5000), ApplicationSchema]) + .nullable() + .describe('ID of the Connect application that created the charge.') + .optional(), + /** 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: z + .union([z.string().max(5000), ApplicationFeeSchema]) + .nullable() + .describe( + 'The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).' + ) + .optional(), + billing_details: BillingDetailsSchema, + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. */ + captured: z + .boolean() + .describe( + 'If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** ID of the customer this charge is for if one exists. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe('ID of the customer this charge is for if one exists.') + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(40_000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Whether the charge has been disputed. */ + disputed: z.boolean().describe('Whether the charge has been disputed.'), + /** ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + failure_balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).' + ) + .optional(), + /** Message to user further explaining reason for charge failure if available. */ + failure_message: z + .string() + .max(5000) + .nullable() + .describe( + 'Message to user further explaining reason for charge failure if available.' + ) + .optional(), + /** Information on fraud assessments for the charge. */ + fraud_details: ChargeFraudDetailsSchema.nullable() + .describe('Information on fraud assessments for the charge.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** ID of the invoice this charge is for if one exists. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .nullable() + .describe('ID of the invoice this charge is for if one exists.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('charge') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ + outcome: ChargeOutcomeSchema.nullable() + .describe( + 'Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.' + ) + .optional(), + /** `true` if the charge succeeded, or was successfully authorized for later capture. */ + paid: z + .boolean() + .describe( + '`true` if the charge succeeded, or was successfully authorized for later capture.' + ), + /** ID of the PaymentIntent associated with this charge, if one exists. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .nullable() + .describe( + 'ID of the PaymentIntent associated with this charge, if one exists.' + ) + .optional(), + /** ID of the payment method used in this charge. */ + payment_method: z + .string() + .max(5000) + .nullable() + .describe('ID of the payment method used in this charge.') + .optional(), + /** Details about the payment method at the time of the transaction. */ + payment_method_details: PaymentMethodDetailsSchema.nullable() + .describe( + 'Details about the payment method at the time of the transaction.' + ) + .optional(), + radar_options: RadarRadarOptionsSchema.optional(), + /** This is the email address that the receipt for this charge was sent to. */ + receipt_email: z + .string() + .max(5000) + .nullable() + .describe( + 'This is the email address that the receipt for this charge was sent to.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. */ + refunded: z + .boolean() + .describe( + 'Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.' + ), + /** A list of refunds that have been applied to the charge. */ + refunds: z + .object({ + /** Details about each object. */ + data: z.array(RefundSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .nullable() + .describe('A list of refunds that have been applied to the charge.') + .optional(), + /** ID of the review associated with this charge if one exists. */ + review: z + .union([z.string().max(5000), ReviewSchema]) + .nullable() + .describe('ID of the review associated with this charge if one exists.') + .optional(), + /** Shipping information for the charge. */ + shipping: ShippingSchema.nullable() + .describe('Shipping information for the charge.') + .optional(), + /** 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: z + .union([z.string().max(5000), TransferSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "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).\n\nFor 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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** The status of the payment is either `succeeded`, `pending`, or `failed`. */ + status: z + .enum(['failed', 'pending', 'succeeded']) + .describe( + 'The status of the payment is either `succeeded`, `pending`, or `failed`.' + ), + /** ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ + transfer: z + .union([z.string().max(5000), TransferSchema]) + .describe( + 'ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).' + ) + .optional(), + /** 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: ChargeTransferDataSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + 'The `Charge` object represents a single attempt to move money into your Stripe account.\nPaymentIntent confirmation is the most common way to create Charges, but transferring\nmoney to a different Stripe account through Connect also creates Charges.\nSome legacy payment flows create Charges directly, which is not recommended for new integrations.' + ) + export type Charge = z.infer + + export const ApplicationFeeSchema = z.object({ + /** ID of the Stripe account this fee was taken from. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .describe('ID of the Stripe account this fee was taken from.'), + /** Amount earned, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe('Amount earned, in cents (or local equivalent).'), + /** 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: z + .number() + .int() + .describe( + 'Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)' + ), + /** ID of the Connect application that earned the fee. */ + application: z + .union([z.string().max(5000), ApplicationSchema]) + .describe('ID of the Connect application that earned the fee.'), + /** Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).' + ) + .optional(), + /** ID of the charge that the application fee was taken from. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .describe('ID of the charge that the application fee was taken from.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. */ + fee_source: PlatformEarningFeeSourceSchema.nullable() + .describe( + 'Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('application_fee') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ + originating_transaction: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe( + 'ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.' + ) + .optional(), + /** Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ + refunded: z + .boolean() + .describe( + 'Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.' + ), + /** A list of refunds that have been applied to the fee. */ + refunds: z + .object({ + /** Details about each object. */ + data: z.array(FeeRefundSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('A list of refunds that have been applied to the fee.') + }) + export type ApplicationFee = z.infer + + /** + * 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 BalanceTransactionSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The date that the transaction's net funds become available in the Stripe balance. */ + available_on: z + .number() + .int() + .describe( + "The date that the transaction's net funds become available in the Stripe balance." + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** 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: z + .number() + .nullable() + .describe( + "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`." + ) + .optional(), + /** Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. */ + fee: z + .number() + .int() + .describe( + 'Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.' + ), + /** Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. */ + fee_details: z + .array(FeeSchema) + .describe( + 'Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .number() + .int() + .describe( + '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`' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('balance_transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .string() + .max(5000) + .describe( + 'Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.' + ), + /** This transaction relates to the Stripe object. */ + source: z + .union([ + z.string().max(5000), + ApplicationFeeSchema, + ChargeSchema, + ConnectCollectionTransferSchema, + CustomerCashBalanceTransactionSchema, + DisputeSchema, + FeeRefundSchema, + IssuingAuthorizationSchema, + IssuingDisputeSchema, + IssuingTransactionSchema, + PayoutSchema, + RefundSchema, + ReserveTransactionSchema, + TaxDeductedAtSourceSchema, + TopupSchema, + TransferSchema, + TransferReversalSchema + ]) + .nullable() + .describe('This transaction relates to the Stripe object.') + .optional(), + /** The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. */ + status: z + .string() + .max(5000) + .describe( + "The transaction's net funds status in the Stripe balance, which are either `available` or `pending`." + ), + /** 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`, `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: z + .enum([ + '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', + 'tax_fee', + 'topup', + 'topup_reversal', + 'transfer', + 'transfer_cancel', + 'transfer_failure', + 'transfer_refund' + ]) + .describe( + '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`, `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.' + ) + }) + .describe( + 'Balance transactions represent funds moving through your Stripe account.\nStripe creates them for every type of transaction that enters or leaves your Stripe account balance.\n\nRelated guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)' + ) + export type BalanceTransaction = z.infer + + export const ConnectCollectionTransferSchema = z.object({ + /** Amount transferred, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe('Amount transferred, in cents (or local equivalent).'), + /** 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: z + .string() + .describe( + '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).' + ), + /** ID of the account that funds are being collected for. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .describe('ID of the account that funds are being collected for.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('connect_collection_transfer') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + export type ConnectCollectionTransfer = z.infer< + typeof ConnectCollectionTransferSchema + > + + /** + * 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 CustomerCashBalanceTransactionSchema = z + .object({ + adjusted_for_overdraft: + CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftSchema.optional(), + applied_to_payment: + CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** The customer whose available cash balance changed as a result of this transaction. */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .describe( + 'The customer whose available cash balance changed as a result of this transaction.' + ), + /** 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: z + .number() + .int() + .describe( + '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).' + ), + funded: + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('customer_cash_balance_transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + refunded_from_payment: + CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionSchema.optional(), + transferred_to_balance: + CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceSchema.optional(), + /** 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: z + .enum([ + 'adjusted_for_overdraft', + 'applied_to_payment', + 'funded', + 'funding_reversed', + 'refunded_from_payment', + 'return_canceled', + 'return_initiated', + 'transferred_to_balance', + 'unapplied_from_payment' + ]) + .describe( + '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.' + ), + unapplied_from_payment: + CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionSchema.optional() + }) + .describe( + 'Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.' + ) + export type CustomerCashBalanceTransaction = z.infer< + typeof CustomerCashBalanceTransactionSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftSchema = + z.object({ + /** The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .describe( + 'The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.' + ), + /** 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: z + .union([z.string().max(5000), CustomerCashBalanceTransactionSchema]) + .describe( + 'The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.' + ) + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionSchema = + z.object({ + /** The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .describe( + 'The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.' + ) + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionSchema = + z.object({ + /** The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + refund: z + .union([z.string().max(5000), RefundSchema]) + .describe( + "The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance." + ) + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionSchema + > + + /** + * 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 RefundSchema = z + .object({ + /** Amount, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe('Amount, in cents (or local equivalent).'), + /** Balance transaction that describes the impact on your account balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'Balance transaction that describes the impact on your account balance.' + ) + .optional(), + /** ID of the charge that's refunded. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe("ID of the charge that's refunded.") + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). */ + description: z + .string() + .max(5000) + .describe( + 'An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).' + ) + .optional(), + destination_details: RefundDestinationDetailsSchema.optional(), + /** After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ + failure_balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .describe( + 'After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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`.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. */ + instructions_email: z + .string() + .max(5000) + .describe( + 'For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + next_action: RefundNextActionSchema.optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('refund') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the PaymentIntent that's refunded. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .nullable() + .describe("ID of the PaymentIntent that's refunded.") + .optional(), + /** Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ + reason: z + .enum([ + 'duplicate', + 'expired_uncaptured_charge', + 'fraudulent', + 'requested_by_customer' + ]) + .nullable() + .describe( + 'Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).' + ) + .optional(), + /** This is the transaction number that appears on email receipts sent for this refund. */ + receipt_number: z + .string() + .max(5000) + .nullable() + .describe( + 'This is the transaction number that appears on email receipts sent for this refund.' + ) + .optional(), + /** The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. */ + source_transfer_reversal: z + .union([z.string().max(5000), TransferReversalSchema]) + .nullable() + .describe( + "The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), TransferReversalSchema]) + .nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + "Refund objects allow you to refund a previously created charge that isn't\nrefunded yet. Funds are refunded to the credit or debit card that's\ninitially charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds)" + ) + export type Refund = z.infer + + /** + * [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 TransferReversalSchema = z + .object({ + /** Amount, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe('Amount, in cents (or local equivalent).'), + /** Balance transaction that describes the impact on your account balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'Balance transaction that describes the impact on your account balance.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** Linked payment refund for the transfer reversal. */ + destination_payment_refund: z + .union([z.string().max(5000), RefundSchema]) + .nullable() + .describe('Linked payment refund for the transfer reversal.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('transfer_reversal') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the refund responsible for the transfer reversal. */ + source_refund: z + .union([z.string().max(5000), RefundSchema]) + .nullable() + .describe('ID of the refund responsible for the transfer reversal.') + .optional(), + /** ID of the transfer that was reversed. */ + transfer: z + .union([z.string().max(5000), TransferSchema]) + .describe('ID of the transfer that was reversed.') + }) + .describe( + "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers)" + ) + export type TransferReversal = z.infer + + /** + * 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 const TransferSchema = z + .object({ + /** Amount in cents (or local equivalent) to be transferred. */ + amount: z + .number() + .int() + .describe('Amount in cents (or local equivalent) to be transferred.'), + /** 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: z + .number() + .int() + .describe( + 'Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).' + ), + /** Balance transaction that describes the impact of this transfer on your account balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'Balance transaction that describes the impact of this transfer on your account balance.' + ) + .optional(), + /** Time that this record of the transfer was first created. */ + created: z + .number() + .int() + .describe('Time that this record of the transfer was first created.'), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** ID of the Stripe account the transfer was sent to. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe('ID of the Stripe account the transfer was sent to.') + .optional(), + /** 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: z + .union([z.string().max(5000), ChargeSchema]) + .describe( + 'If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('transfer') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** A list of reversals that have been applied to the transfer. */ + reversals: z + .object({ + /** Details about each object. */ + data: z + .array(TransferReversalSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe( + 'A list of reversals that have been applied to the transfer.' + ), + /** Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ + reversed: z + .boolean() + .describe( + 'Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.' + ), + /** ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. */ + source_transaction: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe( + 'ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.' + ) + .optional(), + /** The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ + source_type: z + .string() + .max(5000) + .describe( + 'The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + 'A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers)' + ) + export type Transfer = z.infer + + export const CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceSchema = + z.object({ + /** The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .describe( + 'The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.' + ) + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceSchema + > + + export const CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionSchema = + z.object({ + /** The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .describe( + 'The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.' + ) + }) + export type CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction = + z.infer< + typeof CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionSchema + > + + /** + * 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 DisputeSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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).' + ), + /** 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: z + .array(BalanceTransactionSchema) + .describe( + 'List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.' + ), + /** ID of the charge that's disputed. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .describe("ID of the charge that's disputed."), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** List of eligibility types that are included in `enhanced_evidence`. */ + enhanced_eligibility_types: z + .array(z.literal('visa_compelling_evidence_3')) + .describe( + 'List of eligibility types that are included in `enhanced_evidence`.' + ), + evidence: DisputeEvidenceSchema, + evidence_details: DisputeEvidenceDetailsSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .boolean() + .describe( + "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." + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('dispute') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the PaymentIntent that's disputed. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .nullable() + .describe("ID of the PaymentIntent that's disputed.") + .optional(), + payment_method_details: DisputePaymentMethodDetailsSchema.optional(), + /** 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`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). */ + reason: z + .string() + .max(5000) + .describe( + '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`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).' + ), + /** Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. */ + status: z + .enum([ + 'lost', + 'needs_response', + 'under_review', + 'warning_closed', + 'warning_needs_response', + 'warning_under_review', + 'won' + ]) + .describe( + 'Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.' + ) + }) + .describe( + 'A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you have the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate.\n\nRelated guide: [Disputes and fraud](https://stripe.com/docs/disputes)' + ) + export type Dispute = z.infer + + /** + * `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 FeeRefundSchema = z + .object({ + /** Amount, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe('Amount, in cents (or local equivalent).'), + /** Balance transaction that describes the impact on your account balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'Balance transaction that describes the impact on your account balance.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** ID of the application fee that was refunded. */ + fee: z + .union([z.string().max(5000), ApplicationFeeSchema]) + .describe('ID of the application fee that was refunded.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('fee_refund') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + '`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee)' + ) + export type FeeRefund = z.infer + + /** + * 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 const IssuingAuthorizationSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** 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: IssuingAuthorizationAmountDetailsSchema.nullable() + .describe( + 'Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + .optional(), + /** Whether the authorization has been approved. */ + approved: z + .boolean() + .describe('Whether the authorization has been approved.'), + /** How the card details were provided. */ + authorization_method: z + .enum(['chip', 'contactless', 'keyed_in', 'online', 'swipe']) + .describe('How the card details were provided.'), + /** List of balance transactions associated with this authorization. */ + balance_transactions: z + .array(BalanceTransactionSchema) + .describe( + 'List of balance transactions associated with this authorization.' + ), + card: IssuingCardSchema, + /** The cardholder to whom this authorization belongs. */ + cardholder: z + .union([z.string().max(5000), IssuingCardholderSchema]) + .nullable() + .describe('The cardholder to whom this authorization belongs.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** Fleet-specific information for authorizations using Fleet cards. */ + fleet: IssuingAuthorizationFleetDataSchema.nullable() + .describe( + 'Fleet-specific information for authorizations using Fleet cards.' + ) + .optional(), + /** Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. */ + fraud_challenges: z + .array(IssuingAuthorizationFraudChallengeSchema) + .nullable() + .describe( + 'Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.' + ) + .optional(), + /** 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: IssuingAuthorizationFuelDataSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** 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: z + .string() + .describe( + '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_data: IssuingAuthorizationMerchantDataSchema, + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** Details about the authorization, such as identifiers, set by the card network. */ + network_data: IssuingAuthorizationNetworkDataSchema.nullable() + .describe( + 'Details about the authorization, such as identifiers, set by the card network.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.authorization') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ + pending_request: IssuingAuthorizationPendingRequestSchema.nullable() + .describe( + 'The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.' + ) + .optional(), + /** 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: z + .array(IssuingAuthorizationRequestSchema) + .describe( + '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.' + ), + /** The current status of the authorization in its lifecycle. */ + status: z + .enum(['closed', 'pending', 'reversed']) + .describe('The current status of the authorization in its lifecycle.'), + /** [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: z + .union([z.string().max(5000), IssuingTokenSchema]) + .nullable() + .describe( + '[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.' + ) + .optional(), + /** List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ + transactions: z + .array(IssuingTransactionSchema) + .describe( + 'List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.' + ), + /** [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: IssuingAuthorizationTreasurySchema.nullable() + .describe( + '[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).' + ) + .optional(), + verification_data: IssuingAuthorizationVerificationDataSchema, + /** 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: z + .boolean() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + 'When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)' + ) + export type IssuingAuthorization = z.infer + + /** + * 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 const IssuingTransactionSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + '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).' + ), + /** 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: IssuingTransactionAmountDetailsSchema.nullable() + .describe( + 'Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).' + ) + .optional(), + /** The `Authorization` object that led to this transaction. */ + authorization: z + .union([z.string().max(5000), IssuingAuthorizationSchema]) + .nullable() + .describe('The `Authorization` object that led to this transaction.') + .optional(), + /** ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.' + ) + .optional(), + /** The card used to make this transaction. */ + card: z + .union([z.string().max(5000), IssuingCardSchema]) + .describe('The card used to make this transaction.'), + /** The cardholder to whom this transaction belongs. */ + cardholder: z + .union([z.string().max(5000), IssuingCardholderSchema]) + .nullable() + .describe('The cardholder to whom this transaction belongs.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** If you've disputed the transaction, the ID of the dispute. */ + dispute: z + .union([z.string().max(5000), IssuingDisputeSchema]) + .nullable() + .describe("If you've disputed the transaction, the ID of the dispute.") + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The currency with which the merchant is taking payment. */ + merchant_currency: z + .string() + .describe('The currency with which the merchant is taking payment.'), + merchant_data: IssuingAuthorizationMerchantDataSchema, + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** Details about the transaction, such as processing dates, set by the card network. */ + network_data: IssuingTransactionNetworkDataSchema.nullable() + .describe( + 'Details about the transaction, such as processing dates, set by the card network.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Additional purchase information that is optionally provided by the merchant. */ + purchase_details: IssuingTransactionPurchaseDetailsSchema.nullable() + .describe( + 'Additional purchase information that is optionally provided by the merchant.' + ) + .optional(), + /** [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: z + .union([z.string().max(5000), IssuingTokenSchema]) + .nullable() + .describe( + '[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.' + ) + .optional(), + /** [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: IssuingTransactionTreasurySchema.nullable() + .describe( + '[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts' + ) + .optional(), + /** The nature of the transaction. */ + type: z + .enum(['capture', 'refund']) + .describe('The nature of the transaction.'), + /** The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ + wallet: z + .enum(['apple_pay', 'google_pay', 'samsung_pay']) + .nullable() + .describe( + 'The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.' + ) + .optional() + }) + .describe( + 'Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions)' + ) + export type IssuingTransaction = z.infer + + /** + * 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 IssuingDisputeSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + "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)." + ), + /** List of balance transactions associated with the dispute. */ + balance_transactions: z + .array(BalanceTransactionSchema) + .nullable() + .describe('List of balance transactions associated with the dispute.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The currency the `transaction` was made in. */ + currency: z + .string() + .describe('The currency the `transaction` was made in.'), + evidence: IssuingDisputeEvidenceSchema, + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .enum([ + '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' + ]) + .describe( + '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.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('issuing.dispute') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Current status of the dispute. */ + status: z + .enum(['expired', 'lost', 'submitted', 'unsubmitted', 'won']) + .describe('Current status of the dispute.'), + /** The transaction being disputed. */ + transaction: z + .union([z.string().max(5000), IssuingTransactionSchema]) + .describe('The transaction being disputed.'), + /** [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: IssuingDisputeTreasurySchema.nullable() + .describe( + '[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts' + ) + .optional() + }) + .describe( + '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.\n\nRelated guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)' + ) + export type IssuingDispute = z.infer + + /** + * 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 PayoutSchema = z + .object({ + /** The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. */ + amount: z + .number() + .int() + .describe( + 'The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.' + ), + /** 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: z + .union([z.string().max(5000), ApplicationFeeSchema]) + .nullable() + .describe( + 'The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + 'Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.' + ), + /** 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: z + .boolean() + .describe( + "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)." + ), + /** ID of the balance transaction that describes the impact of this payout on your account balance. */ + balance_transaction: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + 'ID of the balance transaction that describes the impact of this payout on your account balance.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** ID of the bank account or card the payout is sent to. */ + destination: z + .union([ + z.string().max(5000), + BankAccountSchema, + CardSchema, + DeletedBankAccountSchema, + DeletedCardSchema + ]) + .nullable() + .describe('ID of the bank account or card the payout is sent to.') + .optional(), + /** 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: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional(), + /** Message that provides the reason for a payout failure, if available. */ + failure_message: z + .string() + .max(5000) + .nullable() + .describe( + 'Message that provides the reason for a payout failure, if available.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('payout') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** If the payout reverses another, this is the ID of the original payout. */ + original_payout: z + .union([ + z.string().max(5000), + // TODO: Support recursive types for `PayoutSchema`. + z.any() + ]) + .nullable() + .describe( + 'If the payout reverses another, this is the ID of the original payout.' + ) + .optional(), + /** 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: z + .enum(['completed', 'in_progress', 'not_applicable']) + .describe( + '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.' + ), + /** If the payout reverses, this is the ID of the payout that reverses this payout. */ + reversed_by: z + .union([ + z.string().max(5000), + // TODO: Support recursive types for `PayoutSchema`. + z.any() + ]) + .nullable() + .describe( + 'If the payout reverses, this is the ID of the payout that reverses this payout.' + ) + .optional(), + /** The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. */ + source_type: z + .string() + .max(5000) + .describe( + 'The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`.' + ), + /** Extra information about a payout that displays on the user's bank statement. */ + statement_descriptor: z + .string() + .max(5000) + .nullable() + .describe( + "Extra information about a payout that displays on the user's bank statement." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + "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`." + ), + /** 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: PayoutsTraceIdSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Can be `bank_account` or `card`. */ + type: z + .enum(['bank_account', 'card']) + .describe('Can be `bank_account` or `card`.') + }) + .describe( + 'A `Payout` object is created when you receive funds from Stripe, or when you\ninitiate a payout to either a bank account or debit card of a [connected\nStripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,\nand list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving payouts](https://stripe.com/docs/payouts)' + ) + export type Payout = z.infer + + /** + * 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 TopupSchema = z + .object({ + /** Amount transferred. */ + amount: z.number().int().describe('Amount transferred.'), + /** 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: z + .union([z.string().max(5000), BalanceTransactionSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional(), + /** Message to user further explaining reason for top-up failure if available. */ + failure_message: z + .string() + .max(5000) + .nullable() + .describe( + 'Message to user further explaining reason for top-up failure if available.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('topup') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The source field is deprecated. It might not always be present in the API response. */ + source: SourceSchema.nullable() + .describe( + 'The source field is deprecated. It might not always be present in the API response.' + ) + .optional(), + /** Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ + statement_descriptor: z + .string() + .max(5000) + .nullable() + .describe( + "Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter." + ) + .optional(), + /** The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. */ + status: z + .enum(['canceled', 'failed', 'pending', 'reversed', 'succeeded']) + .describe( + 'The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.' + ), + /** A string that identifies this top-up as part of a group. */ + transfer_group: z + .string() + .max(5000) + .nullable() + .describe('A string that identifies this top-up as part of a group.') + .optional() + }) + .describe( + 'To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups)' + ) + export type Topup = z.infer + + export const PaymentMethodDetailsSchema = z.object({ + ach_credit_transfer: PaymentMethodDetailsAchCreditTransferSchema.optional(), + ach_debit: PaymentMethodDetailsAchDebitSchema.optional(), + acss_debit: PaymentMethodDetailsAcssDebitSchema.optional(), + affirm: PaymentMethodDetailsAffirmSchema.optional(), + afterpay_clearpay: PaymentMethodDetailsAfterpayClearpaySchema.optional(), + alipay: PaymentFlowsPrivatePaymentMethodsAlipayDetailsSchema.optional(), + alma: PaymentMethodDetailsAlmaSchema.optional(), + amazon_pay: PaymentMethodDetailsAmazonPaySchema.optional(), + au_becs_debit: PaymentMethodDetailsAuBecsDebitSchema.optional(), + bacs_debit: PaymentMethodDetailsBacsDebitSchema.optional(), + bancontact: PaymentMethodDetailsBancontactSchema.optional(), + blik: PaymentMethodDetailsBlikSchema.optional(), + boleto: PaymentMethodDetailsBoletoSchema.optional(), + card: PaymentMethodDetailsCardSchema.optional(), + card_present: PaymentMethodDetailsCardPresentSchema.optional(), + cashapp: PaymentMethodDetailsCashappSchema.optional(), + customer_balance: PaymentMethodDetailsCustomerBalanceSchema.optional(), + eps: PaymentMethodDetailsEpsSchema.optional(), + fpx: PaymentMethodDetailsFpxSchema.optional(), + giropay: PaymentMethodDetailsGiropaySchema.optional(), + grabpay: PaymentMethodDetailsGrabpaySchema.optional(), + ideal: PaymentMethodDetailsIdealSchema.optional(), + interac_present: PaymentMethodDetailsInteracPresentSchema.optional(), + kakao_pay: PaymentMethodDetailsKakaoPaySchema.optional(), + klarna: PaymentMethodDetailsKlarnaSchema.optional(), + konbini: PaymentMethodDetailsKonbiniSchema.optional(), + kr_card: PaymentMethodDetailsKrCardSchema.optional(), + link: PaymentMethodDetailsLinkSchema.optional(), + mobilepay: PaymentMethodDetailsMobilepaySchema.optional(), + multibanco: PaymentMethodDetailsMultibancoSchema.optional(), + naver_pay: PaymentMethodDetailsNaverPaySchema.optional(), + oxxo: PaymentMethodDetailsOxxoSchema.optional(), + p24: PaymentMethodDetailsP24Schema.optional(), + pay_by_bank: PaymentMethodDetailsPayByBankSchema.optional(), + payco: PaymentMethodDetailsPaycoSchema.optional(), + paynow: PaymentMethodDetailsPaynowSchema.optional(), + paypal: PaymentMethodDetailsPaypalSchema.optional(), + pix: PaymentMethodDetailsPixSchema.optional(), + promptpay: PaymentMethodDetailsPromptpaySchema.optional(), + revolut_pay: PaymentMethodDetailsRevolutPaySchema.optional(), + samsung_pay: PaymentMethodDetailsSamsungPaySchema.optional(), + sepa_debit: PaymentMethodDetailsSepaDebitSchema.optional(), + sofort: PaymentMethodDetailsSofortSchema.optional(), + stripe_account: PaymentMethodDetailsStripeAccountSchema.optional(), + swish: PaymentMethodDetailsSwishSchema.optional(), + twint: PaymentMethodDetailsTwintSchema.optional(), + /** + * 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: z + .string() + .max(5000) + .describe( + '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.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.' + ), + us_bank_account: PaymentMethodDetailsUsBankAccountSchema.optional(), + wechat: PaymentMethodDetailsWechatSchema.optional(), + wechat_pay: PaymentMethodDetailsWechatPaySchema.optional(), + zip: PaymentMethodDetailsZipSchema.optional() + }) + export type PaymentMethodDetails = z.infer + + export const PaymentMethodDetailsBancontactSchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Bank Identifier Code of the bank associated with the bank account. */ + bic: z + .string() + .max(5000) + .nullable() + .describe( + 'Bank Identifier Code of the bank associated with the bank account.' + ) + .optional(), + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.' + ) + .optional(), + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe( + 'The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.' + ) + .optional(), + /** Last four characters of the IBAN. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language: z + .enum(['de', 'en', 'fr', 'nl']) + .nullable() + .describe( + 'Preferred language of the Bancontact authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by Bancontact directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional() + }) + export type PaymentMethodDetailsBancontact = z.infer< + typeof PaymentMethodDetailsBancontactSchema + > + + export const PaymentMethodDetailsIdealSchema = z.object({ + /** The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. */ + bank: z + .enum([ + 'abn_amro', + 'asn_bank', + 'bunq', + 'handelsbanken', + 'ing', + 'knab', + 'moneyou', + 'n26', + 'nn', + 'rabobank', + 'regiobank', + 'revolut', + 'sns_bank', + 'triodos_bank', + 'van_lanschot', + 'yoursafe' + ]) + .nullable() + .describe( + "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`." + ) + .optional(), + /** The Bank Identifier Code of the customer's bank. */ + bic: z + .enum([ + 'ABNANL2A', + 'ASNBNL21', + 'BITSNL2A', + 'BUNQNL2A', + 'FVLBNL22', + 'HANDNL2A', + 'INGBNL2A', + 'KNABNL2H', + 'MOYONL21', + 'NNBANL2G', + 'NTSBDEB1', + 'RABONL2U', + 'RBRBNL21', + 'REVOIE23', + 'REVOLT21', + 'SNSBNL2A', + 'TRIONL2U' + ]) + .nullable() + .describe("The Bank Identifier Code of the customer's bank.") + .optional(), + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.' + ) + .optional(), + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe( + 'The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.' + ) + .optional(), + /** Last four characters of the IBAN. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by iDEAL directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional() + }) + export type PaymentMethodDetailsIdeal = z.infer< + typeof PaymentMethodDetailsIdealSchema + > + + export const PaymentMethodDetailsSofortSchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Bank Identifier Code of the bank associated with the bank account. */ + bic: z + .string() + .max(5000) + .nullable() + .describe( + 'Bank Identifier Code of the bank associated with the bank account.' + ) + .optional(), + /** Two-letter ISO code representing the country the bank account is located in. */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the country the bank account is located in.' + ) + .optional(), + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + 'The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.' + ) + .optional(), + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe( + 'The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.' + ) + .optional(), + /** Last four characters of the IBAN. */ + iban_last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional(), + /** + * 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: z + .enum(['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']) + .nullable() + .describe( + 'Preferred language of the SOFORT authorization page that the customer is redirected to.\nCan be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + "Owner's verified full name. Values are verified or provided by SOFORT directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated." + ) + .optional() + }) + export type PaymentMethodDetailsSofort = z.infer< + typeof PaymentMethodDetailsSofortSchema + > + + export const PaymentMethodDetailsUsBankAccountSchema = z.object({ + /** Account holder type: individual or company. */ + account_holder_type: z + .enum(['company', 'individual']) + .nullable() + .describe('Account holder type: individual or company.') + .optional(), + /** Account type: checkings or savings. Defaults to checking if omitted. */ + account_type: z + .enum(['checking', 'savings']) + .nullable() + .describe( + 'Account type: checkings or savings. Defaults to checking if omitted.' + ) + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .union([z.string().max(5000), MandateSchema]) + .describe('ID of the mandate used to make this payment.') + .optional(), + /** Reference number to locate ACH payments with customer's bank. */ + payment_reference: z + .string() + .max(5000) + .nullable() + .describe("Reference number to locate ACH payments with customer's bank.") + .optional(), + /** Routing number of the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('Routing number of the bank account.') + .optional() + }) + export type PaymentMethodDetailsUsBankAccount = z.infer< + typeof PaymentMethodDetailsUsBankAccountSchema + > + + /** + * 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 const ReviewSchema = z + .object({ + /** The ZIP or postal code of the card used, if applicable. */ + billing_zip: z + .string() + .max(5000) + .nullable() + .describe('The ZIP or postal code of the card used, if applicable.') + .optional(), + /** The charge associated with this review. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe('The charge associated with this review.') + .optional(), + /** The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. */ + closed_reason: z + .enum([ + 'approved', + 'disputed', + 'redacted', + 'refunded', + 'refunded_as_fraud' + ]) + .nullable() + .describe( + 'The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The IP address where the payment originated. */ + ip_address: z + .string() + .max(5000) + .nullable() + .describe('The IP address where the payment originated.') + .optional(), + /** 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: RadarReviewResourceLocationSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('review') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** If `true`, the review needs action. */ + open: z.boolean().describe('If `true`, the review needs action.'), + /** The reason the review was opened. One of `rule` or `manual`. */ + opened_reason: z + .enum(['manual', 'rule']) + .describe( + 'The reason the review was opened. One of `rule` or `manual`.' + ), + /** The PaymentIntent ID associated with this review, if one exists. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .describe( + 'The PaymentIntent ID associated with this review, if one exists.' + ) + .optional(), + /** The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. */ + reason: z + .string() + .max(5000) + .describe( + 'The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.' + ), + /** Information related to the browsing session of the user who initiated the payment. */ + session: RadarReviewResourceSessionSchema.nullable() + .describe( + 'Information related to the browsing session of the user who initiated the payment.' + ) + .optional() + }) + .describe( + 'Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).' + ) + export type Review = z.infer + + export const ChargeTransferDataSchema = z.object({ + /** The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ + amount: z + .number() + .int() + .nullable() + .describe( + 'The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.' + ) + .optional(), + /** ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.' + ) + }) + export type ChargeTransferData = z.infer + + export const DeletedDiscountSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + coupon: CouponSchema, + /** The ID of the customer associated with this discount. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe('The ID of the customer associated with this discount.') + .optional(), + /** Always true for a deleted object */ + deleted: z.literal(true).describe('Always true for a deleted object'), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ), + /** The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. */ + invoice: z + .string() + .max(5000) + .nullable() + .describe( + "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('discount') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The promotion code applied to create this discount. */ + promotion_code: z + .union([z.string().max(5000), PromotionCodeSchema]) + .nullable() + .describe('The promotion code applied to create this discount.') + .optional(), + /** Date that the coupon was applied. */ + start: z.number().int().describe('Date that the coupon was applied.'), + /** The subscription that this coupon is applied to, if it is applied to a particular subscription. */ + subscription: z + .string() + .max(5000) + .nullable() + .describe( + 'The subscription that this coupon is applied to, if it is applied to a particular subscription.' + ) + .optional(), + /** The subscription item that this coupon is applied to, if it is applied to a particular subscription item. */ + subscription_item: z + .string() + .max(5000) + .nullable() + .describe( + 'The subscription item that this coupon is applied to, if it is applied to a particular subscription item.' + ) + .optional() + }) + export type DeletedDiscount = z.infer + + export const InvoicesResourceFromInvoiceSchema = z.object({ + /** The relation between this invoice and the cloned invoice */ + action: z + .string() + .max(5000) + .describe('The relation between this invoice and the cloned invoice'), + /** The invoice that was cloned. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .describe('The invoice that was cloned.') + }) + export type InvoicesResourceFromInvoice = z.infer< + typeof InvoicesResourceFromInvoiceSchema + > + + /** + * 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 const LineItemSchema = z + .object({ + /** The amount, in cents (or local equivalent). */ + amount: z + .number() + .int() + .describe('The amount, in cents (or local equivalent).'), + /** The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. */ + amount_excluding_tax: z + .number() + .int() + .nullable() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.' + ) + .optional(), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** The amount of discount calculated per discount for this line item. */ + discount_amounts: z + .array(DiscountsResourceDiscountAmountSchema) + .nullable() + .describe( + 'The amount of discount calculated per discount for this line item.' + ) + .optional(), + /** If true, discounts will apply to this line item. Always false for prorations. */ + discountable: z + .boolean() + .describe( + 'If true, discounts will apply to this line item. Always false for prorations.' + ), + /** The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ + discounts: z + .array(z.union([z.string().max(5000), DiscountSchema])) + .describe( + 'The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The ID of the invoice that contains this line item. */ + invoice: z + .string() + .max(5000) + .nullable() + .describe('The ID of the invoice that contains this line item.') + .optional(), + /** The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ + invoice_item: z + .union([z.string().max(5000), InvoiceitemSchema]) + .describe( + 'The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.' + ) + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('line_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + period: InvoiceLineItemPeriodSchema, + /** Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. */ + pretax_credit_amounts: z + .array(InvoicesResourcePretaxCreditAmountSchema) + .nullable() + .describe( + 'Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.' + ) + .optional(), + /** The price of the line item. */ + price: PriceSchema.nullable() + .describe('The price of the line item.') + .optional(), + /** Whether this is a proration. */ + proration: z.boolean().describe('Whether this is a proration.'), + /** Additional details for proration line items */ + proration_details: + InvoicesResourceLineItemsProrationDetailsSchema.nullable() + .describe('Additional details for proration line items') + .optional(), + /** The quantity of the subscription, if the line item is a subscription or a proration. */ + quantity: z + .number() + .int() + .nullable() + .describe( + 'The quantity of the subscription, if the line item is a subscription or a proration.' + ) + .optional(), + /** The subscription that the invoice item pertains to, if any. */ + subscription: z + .union([z.string().max(5000), SubscriptionSchema]) + .nullable() + .describe('The subscription that the invoice item pertains to, if any.') + .optional(), + /** The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. */ + subscription_item: z + .union([z.string().max(5000), SubscriptionItemSchema]) + .describe( + 'The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.' + ) + .optional(), + /** The amount of tax calculated per tax rate for this line item */ + tax_amounts: z + .array(InvoiceTaxAmountSchema) + .describe( + 'The amount of tax calculated per tax rate for this line item' + ), + /** The tax rates which apply to the line item. */ + tax_rates: z + .array(TaxRateSchema) + .describe('The tax rates which apply to the line item.'), + /** A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. */ + type: z + .enum(['invoiceitem', 'subscription']) + .describe( + 'A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.' + ), + /** The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. */ + unit_amount_excluding_tax: z + .string() + .nullable() + .describe( + 'The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.' + ) + .optional() + }) + .describe( + '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.\n\nEach 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 LineItem = z.infer + + export const DiscountsResourceDiscountAmountSchema = z.object({ + /** The amount, in cents (or local equivalent), of the discount. */ + amount: z + .number() + .int() + .describe('The amount, in cents (or local equivalent), of the discount.'), + /** The discount that was applied to get this discount amount. */ + discount: z + .union([z.string().max(5000), DiscountSchema, DeletedDiscountSchema]) + .describe('The discount that was applied to get this discount amount.') + }) + export type DiscountsResourceDiscountAmount = z.infer< + typeof DiscountsResourceDiscountAmountSchema + > + + /** + * Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an + * invoice by creating or updating it with an `invoice` field, at which point it will be 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 InvoiceitemSchema = z + .object({ + /** Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. */ + amount: z + .number() + .int() + .describe( + 'Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** The ID of the customer who will be billed when this invoice item is billed. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .describe( + 'The ID of the customer who will be billed when this invoice item is billed.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + date: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** If true, discounts will apply to this invoice item. Always false for prorations. */ + discountable: z + .boolean() + .describe( + 'If true, discounts will apply to this invoice item. Always false for prorations.' + ), + /** The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ + discounts: z + .array(z.union([z.string().max(5000), DiscountSchema])) + .nullable() + .describe( + 'The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The ID of the invoice this invoice item belongs to. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .nullable() + .describe('The ID of the invoice this invoice item belongs to.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('invoiceitem') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + period: InvoiceLineItemPeriodSchema, + /** The price of the invoice item. */ + price: PriceSchema.nullable() + .describe('The price of the invoice item.') + .optional(), + /** Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ + proration: z + .boolean() + .describe( + 'Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.' + ), + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The subscription that this invoice item has been created for, if any. */ + subscription: z + .union([z.string().max(5000), SubscriptionSchema]) + .nullable() + .describe( + 'The subscription that this invoice item has been created for, if any.' + ) + .optional(), + /** The subscription item that this invoice item has been created for, if any. */ + subscription_item: z + .string() + .max(5000) + .describe( + 'The subscription item that this invoice item has been created for, if any.' + ) + .optional(), + /** 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: z + .array(TaxRateSchema) + .nullable() + .describe( + '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.' + ) + .optional(), + /** ID of the test clock this invoice item belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock this invoice item belongs to.') + .optional(), + /** Unit amount (in the `currency` specified) of the invoice item. */ + unit_amount: z + .number() + .int() + .nullable() + .describe( + 'Unit amount (in the `currency` specified) of the invoice item.' + ) + .optional(), + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal: z + .string() + .nullable() + .describe( + 'Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.' + ) + .optional() + }) + .describe( + 'Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an\ninvoice by creating or updating it with an `invoice` field, at which point it will be included as\n[an invoice line item](https://stripe.com/docs/api/invoices/line_item) within\n[invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).\n\nInvoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined\nwith a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge\nor credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges\n(to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.\n\nRelated 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 Invoiceitem = z.infer + + /** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + */ + export const SubscriptionSchema = z + .object({ + /** ID of the Connect Application that created the subscription. */ + application: z + .union([ + z.string().max(5000), + ApplicationSchema, + DeletedApplicationSchema + ]) + .nullable() + .describe( + 'ID of the Connect Application that created the subscription.' + ) + .optional(), + /** 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: z + .number() + .nullable() + .describe( + "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." + ) + .optional(), + automatic_tax: SubscriptionAutomaticTaxSchema, + /** 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: z + .number() + .int() + .describe( + '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.' + ), + /** The fixed values used to calculate the `billing_cycle_anchor`. */ + billing_cycle_anchor_config: + SubscriptionsResourceBillingCycleAnchorConfigSchema.nullable() + .describe( + 'The fixed values used to calculate the `billing_cycle_anchor`.' + ) + .optional(), + /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds: SubscriptionBillingThresholdsSchema.nullable() + .describe( + 'Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period' + ) + .optional(), + /** A date in the future at which the subscription will automatically get canceled */ + cancel_at: z + .number() + .int() + .nullable() + .describe( + 'A date in the future at which the subscription will automatically get canceled' + ) + .optional(), + /** 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: z + .boolean() + .describe( + 'Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** Details about why this subscription was cancelled */ + cancellation_details: CancellationDetailsSchema.nullable() + .describe('Details about why this subscription was cancelled') + .optional(), + /** 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: z + .enum(['charge_automatically', 'send_invoice']) + .describe( + '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`.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. */ + current_period_end: z + .number() + .int() + .describe( + 'End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.' + ), + /** Start of the current period that the subscription has been invoiced for. */ + current_period_start: z + .number() + .int() + .describe( + 'Start of the current period that the subscription has been invoiced for.' + ), + /** ID of the customer who owns the subscription. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .describe('ID of the customer who owns the subscription.'), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + "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)." + ) + .optional(), + /** 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: z + .union([ + z.string().max(5000), + BankAccountSchema, + CardSchema, + SourceSchema + ]) + .nullable() + .describe( + "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)." + ) + .optional(), + /** 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: z + .array(TaxRateSchema) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .string() + .max(500) + .nullable() + .describe( + "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." + ) + .optional(), + /** Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. */ + discount: DiscountSchema.nullable() + .describe( + 'Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.' + ) + .optional(), + /** The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. */ + discounts: z + .array(z.union([z.string().max(5000), DiscountSchema])) + .describe( + 'The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.' + ), + /** If the subscription has ended, the date the subscription ended. */ + ended_at: z + .number() + .int() + .nullable() + .describe( + 'If the subscription has ended, the date the subscription ended.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + invoice_settings: SubscriptionsResourceSubscriptionInvoiceSettingsSchema, + /** List of subscription items, each with an attached price. */ + items: z + .object({ + /** Details about each object. */ + data: z + .array(SubscriptionItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('List of subscription items, each with an attached price.'), + /** The most recent invoice this subscription has generated. */ + latest_invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .nullable() + .describe('The most recent invoice this subscription has generated.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + 'Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('subscription') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. */ + on_behalf_of: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + 'The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.' + ) + .optional(), + /** 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: SubscriptionsResourcePauseCollectionSchema.nullable() + .describe( + '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).' + ) + .optional(), + /** Payment settings passed on to invoices created by the subscription. */ + payment_settings: SubscriptionsResourcePaymentSettingsSchema.nullable() + .describe( + 'Payment settings passed on to invoices created by the subscription.' + ) + .optional(), + /** 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: + SubscriptionPendingInvoiceItemIntervalSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), SetupIntentSchema]) + .nullable() + .describe( + "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)." + ) + .optional(), + /** 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: SubscriptionsResourcePendingUpdateSchema.nullable() + .describe( + '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.' + ) + .optional(), + /** The schedule attached to the subscription */ + schedule: z + .union([z.string().max(5000), SubscriptionScheduleSchema]) + .nullable() + .describe('The schedule attached to the subscription') + .optional(), + /** Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ + start_date: z + .number() + .int() + .describe( + 'Date when the subscription was first created. The date might differ from the `created` date due to backdating.' + ), + /** + * 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: z + .enum([ + 'active', + 'canceled', + 'incomplete', + 'incomplete_expired', + 'past_due', + 'paused', + 'trialing', + 'unpaid' + ]) + .describe( + "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. \n\nFor `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. \n\nA subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. \n\nA 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. \n\nIf 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). \n\nIf 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." + ), + /** ID of the test clock this subscription belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock this subscription belongs to.') + .optional(), + /** 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: SubscriptionTransferDataSchema.nullable() + .describe( + "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." + ) + .optional(), + /** If the subscription has a trial, the end of that trial. */ + trial_end: z + .number() + .int() + .nullable() + .describe('If the subscription has a trial, the end of that trial.') + .optional(), + /** Settings related to subscription trials. */ + trial_settings: SubscriptionsTrialsResourceTrialSettingsSchema.nullable() + .describe('Settings related to subscription trials.') + .optional(), + /** If the subscription has a trial, the beginning of that trial. */ + trial_start: z + .number() + .int() + .nullable() + .describe( + 'If the subscription has a trial, the beginning of that trial.' + ) + .optional() + }) + .describe( + 'Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)' + ) + export type Subscription = z.infer + + export const SubscriptionAutomaticTaxSchema = z.object({ + /** If Stripe disabled automatic tax, this enum describes why. */ + disabled_reason: z + .literal('requires_location_inputs') + .nullable() + .describe('If Stripe disabled automatic tax, this enum describes why.') + .optional(), + /** Whether Stripe automatically computes tax on this subscription. */ + enabled: z + .boolean() + .describe( + 'Whether Stripe automatically computes tax on this subscription.' + ), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type SubscriptionAutomaticTax = z.infer< + typeof SubscriptionAutomaticTaxSchema + > + + export const SubscriptionsResourceSubscriptionInvoiceSettingsSchema = + z.object({ + /** The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. */ + account_tax_ids: z + .array(z.union([z.string().max(5000), TaxIdSchema, DeletedTaxIdSchema])) + .nullable() + .describe( + 'The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.' + ) + .optional(), + issuer: ConnectAccountReferenceSchema + }) + export type SubscriptionsResourceSubscriptionInvoiceSettings = z.infer< + typeof SubscriptionsResourceSubscriptionInvoiceSettingsSchema + > + + /** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ + export const SubscriptionItemSchema = z + .object({ + /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ + billing_thresholds: SubscriptionItemBillingThresholdsSchema.nullable() + .describe( + 'Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. */ + discounts: z + .array(z.union([z.string().max(5000), DiscountSchema])) + .describe( + 'The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('subscription_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + price: PriceSchema, + /** The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. */ + quantity: z + .number() + .int() + .describe( + 'The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.' + ) + .optional(), + /** The `subscription` this `subscription_item` belongs to. */ + subscription: z + .string() + .max(5000) + .describe('The `subscription` this `subscription_item` belongs to.'), + /** 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: z + .array(TaxRateSchema) + .nullable() + .describe( + '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`.' + ) + .optional() + }) + .describe( + 'Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.' + ) + export type SubscriptionItem = z.infer + + /** + * 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 const SetupIntentSchema = z + .object({ + /** ID of the Connect application that created the SetupIntent. */ + application: z + .union([z.string().max(5000), ApplicationSchema]) + .nullable() + .describe('ID of the Connect application that created the SetupIntent.') + .optional(), + /** + * 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: z + .boolean() + .describe( + "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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." + ) + .optional(), + /** Settings for dynamic payment methods compatible with this Setup Intent */ + automatic_payment_methods: + PaymentFlowsAutomaticPaymentMethodsSetupIntentSchema.nullable() + .describe( + 'Settings for dynamic payment methods compatible with this Setup Intent' + ) + .optional(), + /** Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. */ + cancellation_reason: z + .enum(['abandoned', 'duplicate', 'requested_by_customer']) + .nullable() + .describe( + 'Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.\n\nThe 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.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** + * 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: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf 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." + ) + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** + * 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: z + .array(z.enum(['inbound', 'outbound'])) + .nullable() + .describe( + 'Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `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.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The error encountered in the previous SetupIntent confirmation. */ + last_setup_error: ApiErrorsSchema.nullable() + .describe( + 'The error encountered in the previous SetupIntent confirmation.' + ) + .optional(), + /** The most recent SetupAttempt for this SetupIntent. */ + latest_attempt: z + .union([z.string().max(5000), SetupAttemptSchema]) + .nullable() + .describe('The most recent SetupAttempt for this SetupIntent.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** ID of the multi use Mandate generated by the SetupIntent. */ + mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe('ID of the multi use Mandate generated by the SetupIntent.') + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ + next_action: SetupIntentNextActionSchema.nullable() + .describe( + 'If present, this property tells you what actions you need to take in order for your customer to continue payment setup.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('setup_intent') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The account (if any) for which the setup is intended. */ + on_behalf_of: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe('The account (if any) for which the setup is intended.') + .optional(), + /** 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: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. */ + payment_method_configuration_details: + PaymentMethodConfigBizPaymentMethodConfigurationDetailsSchema.nullable() + .describe( + 'Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent.' + ) + .optional(), + /** Payment method-specific configuration for this SetupIntent. */ + payment_method_options: SetupIntentPaymentMethodOptionsSchema.nullable() + .describe('Payment method-specific configuration for this SetupIntent.') + .optional(), + /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ + payment_method_types: z + .array(z.string().max(5000)) + .describe( + 'The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.' + ), + /** ID of the single_use Mandate generated by the SetupIntent. */ + single_use_mandate: z + .union([z.string().max(5000), MandateSchema]) + .nullable() + .describe('ID of the single_use Mandate generated by the SetupIntent.') + .optional(), + /** [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: z + .enum([ + 'canceled', + 'processing', + 'requires_action', + 'requires_confirmation', + 'requires_payment_method', + 'succeeded' + ]) + .describe( + '[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`.' + ), + /** + * 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: z + .string() + .max(5000) + .describe( + 'Indicates how the payment method is intended to be used in the future.\n\nUse `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`.' + ) + }) + .describe( + "A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.\nFor example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent when you're ready to collect your customer's payment credentials.\nDon't maintain long-lived, unconfirmed SetupIntents because they might not be valid.\nThe SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides\nyou through the setup process.\n\nSuccessful SetupIntents result in payment credentials that are optimized for future payments.\nFor example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through\n[Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection\nto streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).\nIf you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),\nit automatically attaches the resulting payment method to that Customer after successful setup.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you can reduce friction for your customers, even as regulations change over time.\n\nRelated guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)" + ) + export type SetupIntent = z.infer + + /** + * Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ + export const SubscriptionsResourcePendingUpdateSchema = z + .object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The point after which the changes reflected by this update will be discarded and no longer applied. */ + expires_at: z + .number() + .int() + .describe( + 'The point after which the changes reflected by this update will be discarded and no longer applied.' + ), + /** List of subscription items, each with an attached plan, that will be set if the update is applied. */ + subscription_items: z + .array(SubscriptionItemSchema) + .nullable() + .describe( + 'List of subscription items, each with an attached plan, that will be set if the update is applied.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .boolean() + .nullable() + .describe( + "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." + ) + .optional() + }) + .describe( + 'Pending Updates store the changes pending from a previous update that will be applied\nto the Subscription upon successful payment.' + ) + export type SubscriptionsResourcePendingUpdate = z.infer< + typeof SubscriptionsResourcePendingUpdateSchema + > + + /** + * 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 const SubscriptionScheduleSchema = z + .object({ + /** ID of the Connect Application that created the schedule. */ + application: z + .union([ + z.string().max(5000), + ApplicationSchema, + DeletedApplicationSchema + ]) + .nullable() + .describe('ID of the Connect Application that created the schedule.') + .optional(), + /** Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. */ + canceled_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. */ + completed_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ + current_phase: SubscriptionScheduleCurrentPhaseSchema.nullable() + .describe( + 'Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.' + ) + .optional(), + /** ID of the customer who owns the subscription schedule. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .describe('ID of the customer who owns the subscription schedule.'), + default_settings: SubscriptionSchedulesResourceDefaultSettingsSchema, + /** 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: z + .enum(['cancel', 'none', 'release', 'renew']) + .describe( + '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.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('subscription_schedule') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Configuration for the subscription schedule's phases. */ + phases: z + .array(SubscriptionSchedulePhaseConfigurationSchema) + .describe("Configuration for the subscription schedule's phases."), + /** Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. */ + released_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.' + ) + .optional(), + /** ID of the subscription once managed by the subscription schedule (if it is released). */ + released_subscription: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the subscription once managed by the subscription schedule (if it is released).' + ) + .optional(), + /** 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: z + .enum(['active', 'canceled', 'completed', 'not_started', 'released']) + .describe( + '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).' + ), + /** ID of the subscription managed by the subscription schedule. */ + subscription: z + .union([z.string().max(5000), SubscriptionSchema]) + .nullable() + .describe( + 'ID of the subscription managed by the subscription schedule.' + ) + .optional(), + /** ID of the test clock this subscription schedule belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock this subscription schedule belongs to.') + .optional() + }) + .describe( + 'A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)' + ) + export type SubscriptionSchedule = z.infer + + export const SubscriptionSchedulesResourceDefaultSettingsSchema = z.object({ + /** 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: z + .number() + .nullable() + .describe( + "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." + ) + .optional(), + automatic_tax: + SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxSchema.optional(), + /** 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: z + .enum(['automatic', 'phase_start']) + .describe( + '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).' + ), + /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds: SubscriptionBillingThresholdsSchema.nullable() + .describe( + 'Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period' + ) + .optional(), + /** 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: z + .enum(['charge_automatically', 'send_invoice']) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + invoice_settings: InvoiceSettingSubscriptionScheduleSettingSchema, + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: SubscriptionTransferDataSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type SubscriptionSchedulesResourceDefaultSettings = z.infer< + typeof SubscriptionSchedulesResourceDefaultSettingsSchema + > + + export const SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxSchema = + z.object({ + /** If Stripe disabled automatic tax, this enum describes why. */ + disabled_reason: z + .literal('requires_location_inputs') + .nullable() + .describe('If Stripe disabled automatic tax, this enum describes why.') + .optional(), + /** Whether Stripe automatically computes tax on invoices created during this phase. */ + enabled: z + .boolean() + .describe( + 'Whether Stripe automatically computes tax on invoices created during this phase.' + ), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type SubscriptionSchedulesResourceDefaultSettingsAutomaticTax = + z.infer< + typeof SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxSchema + > + + export const InvoiceSettingSubscriptionScheduleSettingSchema = z.object({ + /** The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. */ + account_tax_ids: z + .array(z.union([z.string().max(5000), TaxIdSchema, DeletedTaxIdSchema])) + .nullable() + .describe( + 'The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + issuer: ConnectAccountReferenceSchema + }) + export type InvoiceSettingSubscriptionScheduleSetting = z.infer< + typeof InvoiceSettingSubscriptionScheduleSettingSchema + > + + export const SubscriptionTransferDataSchema = z.object({ + /** 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: z + .number() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The account where funds from the payment will be transferred to upon payment success. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'The account where funds from the payment will be transferred to upon payment success.' + ) + }) + export type SubscriptionTransferData = z.infer< + typeof SubscriptionTransferDataSchema + > + + /** A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ + export const SubscriptionSchedulePhaseConfigurationSchema = z + .object({ + /** A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ + add_invoice_items: z + .array(SubscriptionScheduleAddInvoiceItemSchema) + .describe( + 'A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.' + ), + /** 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: z + .number() + .nullable() + .describe( + "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." + ) + .optional(), + automatic_tax: SchedulesPhaseAutomaticTaxSchema.optional(), + /** 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: z + .enum(['automatic', 'phase_start']) + .nullable() + .describe( + '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).' + ) + .optional(), + /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds: SubscriptionBillingThresholdsSchema.nullable() + .describe( + 'Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period' + ) + .optional(), + /** 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: z + .enum(['charge_automatically', 'send_invoice']) + .nullable() + .describe( + '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`.' + ) + .optional(), + /** ID of the coupon to use during this phase of the subscription schedule. */ + coupon: z + .union([z.string().max(5000), CouponSchema, DeletedCouponSchema]) + .nullable() + .describe( + 'ID of the coupon to use during this phase of the subscription schedule.' + ) + .optional(), + /** 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: z + .string() + .describe( + '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).' + ), + /** 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: z + .union([z.string().max(5000), PaymentMethodSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** The default tax rates to apply to the subscription during this phase of the subscription schedule. */ + default_tax_rates: z + .array(TaxRateSchema) + .nullable() + .describe( + 'The default tax rates to apply to the subscription during this phase of the subscription schedule.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. */ + discounts: z + .array(DiscountsResourceStackableDiscountSchema) + .describe( + 'The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.' + ), + /** The end of this phase of the subscription schedule. */ + end_date: z + .number() + .int() + .describe('The end of this phase of the subscription schedule.'), + /** The invoice settings applicable during this phase. */ + invoice_settings: + InvoiceSettingSubscriptionSchedulePhaseSettingSchema.nullable() + .describe('The invoice settings applicable during this phase.') + .optional(), + /** Subscription items to configure the subscription to during this phase of the subscription schedule. */ + items: z + .array(SubscriptionScheduleConfigurationItemSchema) + .describe( + 'Subscription items to configure the subscription to during this phase of the subscription schedule.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + "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`." + ) + .optional(), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. */ + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .describe( + 'If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.' + ), + /** The start of this phase of the subscription schedule. */ + start_date: z + .number() + .int() + .describe('The start of this phase of the subscription schedule.'), + /** 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: SubscriptionTransferDataSchema.nullable() + .describe( + "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." + ) + .optional(), + /** When the trial ends within the phase. */ + trial_end: z + .number() + .int() + .nullable() + .describe('When the trial ends within the phase.') + .optional() + }) + .describe( + 'A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.' + ) + export type SubscriptionSchedulePhaseConfiguration = z.infer< + typeof SubscriptionSchedulePhaseConfigurationSchema + > + + /** An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. */ + export const SubscriptionScheduleAddInvoiceItemSchema = z + .object({ + /** The stackable discounts that will be applied to the item. */ + discounts: z + .array(DiscountsResourceStackableDiscountSchema) + .describe('The stackable discounts that will be applied to the item.'), + /** ID of the price used to generate the invoice item. */ + price: z + .union([z.string().max(5000), PriceSchema, DeletedPriceSchema]) + .describe('ID of the price used to generate the invoice item.'), + /** The quantity of the invoice item. */ + quantity: z + .number() + .int() + .nullable() + .describe('The quantity of the invoice item.') + .optional(), + /** The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. */ + tax_rates: z + .array(TaxRateSchema) + .nullable() + .describe( + 'The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.' + ) + .optional() + }) + .describe( + 'An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.' + ) + export type SubscriptionScheduleAddInvoiceItem = z.infer< + typeof SubscriptionScheduleAddInvoiceItemSchema + > + + export const DiscountsResourceStackableDiscountSchema = z.object({ + /** ID of the coupon to create a new discount for. */ + coupon: z + .union([z.string().max(5000), CouponSchema]) + .nullable() + .describe('ID of the coupon to create a new discount for.') + .optional(), + /** ID of an existing discount on the object (or one of its ancestors) to reuse. */ + discount: z + .union([z.string().max(5000), DiscountSchema]) + .nullable() + .describe( + 'ID of an existing discount on the object (or one of its ancestors) to reuse.' + ) + .optional(), + /** ID of the promotion code to create a new discount for. */ + promotion_code: z + .union([z.string().max(5000), PromotionCodeSchema]) + .nullable() + .describe('ID of the promotion code to create a new discount for.') + .optional() + }) + export type DiscountsResourceStackableDiscount = z.infer< + typeof DiscountsResourceStackableDiscountSchema + > + + export const SchedulesPhaseAutomaticTaxSchema = z.object({ + /** If Stripe disabled automatic tax, this enum describes why. */ + disabled_reason: z + .literal('requires_location_inputs') + .nullable() + .describe('If Stripe disabled automatic tax, this enum describes why.') + .optional(), + /** Whether Stripe automatically computes tax on invoices created during this phase. */ + enabled: z + .boolean() + .describe( + 'Whether Stripe automatically computes tax on invoices created during this phase.' + ), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type SchedulesPhaseAutomaticTax = z.infer< + typeof SchedulesPhaseAutomaticTaxSchema + > + + export const InvoiceSettingSubscriptionSchedulePhaseSettingSchema = z.object({ + /** 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: z + .array(z.union([z.string().max(5000), TaxIdSchema, DeletedTaxIdSchema])) + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + /** The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. */ + issuer: ConnectAccountReferenceSchema.nullable() + .describe( + 'The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.' + ) + .optional() + }) + export type InvoiceSettingSubscriptionSchedulePhaseSetting = z.infer< + typeof InvoiceSettingSubscriptionSchedulePhaseSettingSchema + > + + /** A phase item describes the price and quantity of a phase. */ + export const SubscriptionScheduleConfigurationItemSchema = z + .object({ + /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ + billing_thresholds: SubscriptionItemBillingThresholdsSchema.nullable() + .describe( + 'Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period' + ) + .optional(), + /** The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. */ + discounts: z + .array(DiscountsResourceStackableDiscountSchema) + .describe( + 'The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + "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." + ) + .optional(), + /** ID of the price to which the customer should be subscribed. */ + price: z + .union([z.string().max(5000), PriceSchema, DeletedPriceSchema]) + .describe( + 'ID of the price to which the customer should be subscribed.' + ), + /** Quantity of the plan to which the customer should be subscribed. */ + quantity: z + .number() + .int() + .describe( + 'Quantity of the plan to which the customer should be subscribed.' + ) + .optional(), + /** 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: z + .array(TaxRateSchema) + .nullable() + .describe( + '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`.' + ) + .optional() + }) + .describe('A phase item describes the price and quantity of a phase.') + export type SubscriptionScheduleConfigurationItem = z.infer< + typeof SubscriptionScheduleConfigurationItemSchema + > + + export const InvoicesResourcePretaxCreditAmountSchema = z.object({ + /** The amount, in cents (or local equivalent), of the pretax credit amount. */ + amount: z + .number() + .int() + .describe( + 'The amount, in cents (or local equivalent), of the pretax credit amount.' + ), + /** The credit balance transaction that was applied to get this pretax credit amount. */ + credit_balance_transaction: z + .union([z.string().max(5000), BillingCreditBalanceTransactionSchema]) + .nullable() + .describe( + 'The credit balance transaction that was applied to get this pretax credit amount.' + ) + .optional(), + /** The discount that was applied to get this pretax credit amount. */ + discount: z + .union([z.string().max(5000), DiscountSchema, DeletedDiscountSchema]) + .describe( + 'The discount that was applied to get this pretax credit amount.' + ) + .optional(), + /** Type of the pretax credit amount referenced. */ + type: z + .enum(['credit_balance_transaction', 'discount']) + .describe('Type of the pretax credit amount referenced.') + }) + export type InvoicesResourcePretaxCreditAmount = z.infer< + typeof InvoicesResourcePretaxCreditAmountSchema + > + + /** A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. */ + export const BillingCreditBalanceTransactionSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Credit details for this credit balance transaction. Only present if type is `credit`. */ + credit: BillingCreditGrantsResourceBalanceCreditSchema.nullable() + .describe( + 'Credit details for this credit balance transaction. Only present if type is `credit`.' + ) + .optional(), + /** The credit grant associated with this credit balance transaction. */ + credit_grant: z + .union([z.string().max(5000), BillingCreditGrantSchema]) + .describe( + 'The credit grant associated with this credit balance transaction.' + ), + /** Debit details for this credit balance transaction. Only present if type is `debit`. */ + debit: BillingCreditGrantsResourceBalanceDebitSchema.nullable() + .describe( + 'Debit details for this credit balance transaction. Only present if type is `debit`.' + ) + .optional(), + /** The effective time of this credit balance transaction. */ + effective_at: z + .number() + .int() + .describe('The effective time of this credit balance transaction.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.credit_balance_transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the test clock this credit balance transaction belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe( + 'ID of the test clock this credit balance transaction belongs to.' + ) + .optional(), + /** The type of credit balance transaction (credit or debit). */ + type: z + .enum(['credit', 'debit']) + .nullable() + .describe('The type of credit balance transaction (credit or debit).') + .optional() + }) + .describe( + 'A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant.' + ) + export type BillingCreditBalanceTransaction = z.infer< + typeof BillingCreditBalanceTransactionSchema + > + + export const BillingCreditGrantsResourceBalanceCreditSchema = z.object({ + amount: BillingCreditGrantsResourceAmountSchema, + /** 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: + BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedSchema.nullable() + .describe( + 'Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.' + ) + .optional(), + /** The type of credit transaction. */ + type: z + .enum(['credits_application_invoice_voided', 'credits_granted']) + .describe('The type of credit transaction.') + }) + export type BillingCreditGrantsResourceBalanceCredit = z.infer< + typeof BillingCreditGrantsResourceBalanceCreditSchema + > + + export const BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedSchema = + z.object({ + /** The invoice to which the reinstated billing credits were originally applied. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .describe( + 'The invoice to which the reinstated billing credits were originally applied.' + ), + /** The invoice line item to which the reinstated billing credits were originally applied. */ + invoice_line_item: z + .string() + .max(5000) + .describe( + 'The invoice line item to which the reinstated billing credits were originally applied.' + ) + }) + export type BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoided = + z.infer< + typeof BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoidedSchema + > + + /** + * 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 BillingCreditGrantSchema = z + .object({ + amount: BillingCreditGrantsResourceAmountSchema, + applicability_config: + BillingCreditGrantsResourceApplicabilityConfigSchema, + /** The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. */ + category: z + .enum(['paid', 'promotional']) + .describe( + "The category of this credit grant. This is for tracking purposes and isn't displayed to the customer." + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** ID of the customer receiving the billing credits. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .describe('ID of the customer receiving the billing credits.'), + /** The time when the billing credits become effective-when they're eligible for use. */ + effective_at: z + .number() + .int() + .nullable() + .describe( + "The time when the billing credits become effective-when they're eligible for use." + ) + .optional(), + /** The time when the billing credits expire. If not present, the billing credits don't expire. */ + expires_at: z + .number() + .int() + .nullable() + .describe( + "The time when the billing credits expire. If not present, the billing credits don't expire." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** A descriptive name shown in dashboard. */ + name: z + .string() + .max(5000) + .nullable() + .describe('A descriptive name shown in dashboard.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.credit_grant') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. */ + priority: z + .number() + .int() + .nullable() + .describe( + 'The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.' + ) + .optional(), + /** ID of the test clock this credit grant belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock this credit grant belongs to.') + .optional(), + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: z + .number() + .int() + .describe( + 'Time at which the object was last updated. Measured in seconds since the Unix epoch.' + ), + /** The time when this credit grant was voided. If not present, the credit grant hasn't been voided. */ + voided_at: z + .number() + .int() + .nullable() + .describe( + "The time when this credit grant was voided. If not present, the credit grant hasn't been voided." + ) + .optional() + }) + .describe( + 'A credit grant is an API resource that documents the allocation of some billing credits to a customer.\n\nRelated guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)' + ) + export type BillingCreditGrant = z.infer + + export const BillingCreditGrantsResourceBalanceDebitSchema = z.object({ + amount: BillingCreditGrantsResourceAmountSchema, + /** Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. */ + credits_applied: + BillingCreditGrantsResourceBalanceCreditsAppliedSchema.nullable() + .describe( + 'Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.' + ) + .optional(), + /** The type of debit transaction. */ + type: z + .enum(['credits_applied', 'credits_expired', 'credits_voided']) + .describe('The type of debit transaction.') + }) + export type BillingCreditGrantsResourceBalanceDebit = z.infer< + typeof BillingCreditGrantsResourceBalanceDebitSchema + > + + export const BillingCreditGrantsResourceBalanceCreditsAppliedSchema = + z.object({ + /** The invoice to which the billing credits were applied. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .describe('The invoice to which the billing credits were applied.'), + /** The invoice line item to which the billing credits were applied. */ + invoice_line_item: z + .string() + .max(5000) + .describe( + 'The invoice line item to which the billing credits were applied.' + ) + }) + export type BillingCreditGrantsResourceBalanceCreditsApplied = z.infer< + typeof BillingCreditGrantsResourceBalanceCreditsAppliedSchema + > + + /** + * 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 QuoteSchema = z + .object({ + /** Total before any discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe('Total before any discounts or taxes are applied.'), + /** Total after discounts and taxes are applied. */ + amount_total: z + .number() + .int() + .describe('Total after discounts and taxes are applied.'), + /** ID of the Connect Application that created the quote. */ + application: z + .union([ + z.string().max(5000), + ApplicationSchema, + DeletedApplicationSchema + ]) + .nullable() + .describe('ID of the Connect Application that created the quote.') + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + "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." + ) + .optional(), + /** 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: z + .number() + .nullable() + .describe( + "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." + ) + .optional(), + automatic_tax: QuotesResourceAutomaticTaxSchema, + /** 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: z + .enum(['charge_automatically', 'send_invoice']) + .describe( + '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`.' + ), + computed: QuotesResourceComputedSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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).' + ) + .optional(), + /** The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + 'The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.' + ) + .optional(), + /** The tax rates applied to this quote. */ + default_tax_rates: z + .array(z.union([z.string().max(5000), TaxRateSchema])) + .describe('The tax rates applied to this quote.') + .optional(), + /** A description that will be displayed on the quote PDF. */ + description: z + .string() + .max(5000) + .nullable() + .describe('A description that will be displayed on the quote PDF.') + .optional(), + /** The discounts applied to this quote. */ + discounts: z + .array(z.union([z.string().max(5000), DiscountSchema])) + .describe('The discounts applied to this quote.'), + /** The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. */ + expires_at: z + .number() + .int() + .describe( + 'The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.' + ), + /** A footer that will be displayed on the quote PDF. */ + footer: z + .string() + .max(5000) + .nullable() + .describe('A footer that will be displayed on the quote PDF.') + .optional(), + /** Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. */ + from_quote: QuotesResourceFromQuoteSchema.nullable() + .describe( + 'Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.' + ) + .optional(), + /** A header that will be displayed on the quote PDF. */ + header: z + .string() + .max(5000) + .nullable() + .describe('A header that will be displayed on the quote PDF.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The invoice that was created from this quote. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema, DeletedInvoiceSchema]) + .nullable() + .describe('The invoice that was created from this quote.') + .optional(), + invoice_settings: InvoiceSettingQuoteSettingSchema, + /** A list of items the customer is being quoted for. */ + line_items: z + .object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('A list of items the customer is being quoted for.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('quote') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The status of the quote. */ + status: z + .enum(['accepted', 'canceled', 'draft', 'open']) + .describe('The status of the quote.'), + status_transitions: QuotesResourceStatusTransitionsSchema, + /** The subscription that was created or updated from this quote. */ + subscription: z + .union([z.string().max(5000), SubscriptionSchema]) + .nullable() + .describe( + 'The subscription that was created or updated from this quote.' + ) + .optional(), + subscription_data: QuotesResourceSubscriptionDataSubscriptionDataSchema, + /** The subscription schedule that was created or updated from this quote. */ + subscription_schedule: z + .union([z.string().max(5000), SubscriptionScheduleSchema]) + .nullable() + .describe( + 'The subscription schedule that was created or updated from this quote.' + ) + .optional(), + /** ID of the test clock this quote belongs to. */ + test_clock: z + .union([z.string().max(5000), TestHelpersTestClockSchema]) + .nullable() + .describe('ID of the test clock this quote belongs to.') + .optional(), + total_details: QuotesResourceTotalDetailsSchema, + /** 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: QuotesResourceTransferDataSchema.nullable() + .describe( + '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.' + ) + .optional() + }) + .describe( + "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule." + ) + export type Quote = z.infer + + export const QuotesResourceAutomaticTaxSchema = z.object({ + /** Automatically calculate taxes */ + enabled: z.boolean().describe('Automatically calculate taxes'), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional(), + /** The status of the most recent automated tax calculation for this quote. */ + status: z + .enum(['complete', 'failed', 'requires_location_inputs']) + .nullable() + .describe( + 'The status of the most recent automated tax calculation for this quote.' + ) + .optional() + }) + export type QuotesResourceAutomaticTax = z.infer< + typeof QuotesResourceAutomaticTaxSchema + > + + export const QuotesResourceComputedSchema = z.object({ + /** 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: QuotesResourceRecurringSchema.nullable() + .describe( + '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.' + ) + .optional(), + upfront: QuotesResourceUpfrontSchema + }) + export type QuotesResourceComputed = z.infer< + typeof QuotesResourceComputedSchema + > + + export const QuotesResourceRecurringSchema = z.object({ + /** Total before any discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe('Total before any discounts or taxes are applied.'), + /** Total after discounts and taxes are applied. */ + amount_total: z + .number() + .int() + .describe('Total after discounts and taxes are applied.'), + /** The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. */ + interval: z + .enum(['day', 'month', 'week', 'year']) + .describe( + 'The frequency at which a subscription is billed. One of `day`, `week`, `month` or `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: z + .number() + .int() + .describe( + 'The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.' + ), + total_details: QuotesResourceTotalDetailsSchema + }) + export type QuotesResourceRecurring = z.infer< + typeof QuotesResourceRecurringSchema + > + + export const QuotesResourceTotalDetailsSchema = z.object({ + /** This is the sum of all the discounts. */ + amount_discount: z + .number() + .int() + .describe('This is the sum of all the discounts.'), + /** This is the sum of all the shipping amounts. */ + amount_shipping: z + .number() + .int() + .nullable() + .describe('This is the sum of all the shipping amounts.') + .optional(), + /** This is the sum of all the tax amounts. */ + amount_tax: z + .number() + .int() + .describe('This is the sum of all the tax amounts.'), + breakdown: QuotesResourceTotalDetailsResourceBreakdownSchema.optional() + }) + export type QuotesResourceTotalDetails = z.infer< + typeof QuotesResourceTotalDetailsSchema + > + + export const QuotesResourceTotalDetailsResourceBreakdownSchema = z.object({ + /** The aggregated discounts. */ + discounts: z + .array(LineItemsDiscountAmountSchema) + .describe('The aggregated discounts.'), + /** The aggregated tax amounts by rate. */ + taxes: z + .array(LineItemsTaxAmountSchema) + .describe('The aggregated tax amounts by rate.') + }) + export type QuotesResourceTotalDetailsResourceBreakdown = z.infer< + typeof QuotesResourceTotalDetailsResourceBreakdownSchema + > + + export const LineItemsDiscountAmountSchema = z.object({ + /** The amount discounted. */ + amount: z.number().int().describe('The amount discounted.'), + discount: DiscountSchema + }) + export type LineItemsDiscountAmount = z.infer< + typeof LineItemsDiscountAmountSchema + > + + export const QuotesResourceUpfrontSchema = z.object({ + /** Total before any discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe('Total before any discounts or taxes are applied.'), + /** Total after discounts and taxes are applied. */ + amount_total: z + .number() + .int() + .describe('Total after discounts and taxes are applied.'), + /** 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: z + .object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe( + '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.' + ) + .optional(), + total_details: QuotesResourceTotalDetailsSchema + }) + export type QuotesResourceUpfront = z.infer< + typeof QuotesResourceUpfrontSchema + > + + /** A line item. */ + export const ItemSchema = z + .object({ + /** Total discount amount applied. If no discounts were applied, defaults to 0. */ + amount_discount: z + .number() + .int() + .describe( + 'Total discount amount applied. If no discounts were applied, defaults to 0.' + ), + /** Total before any discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .describe('Total before any discounts or taxes are applied.'), + /** Total tax amount applied. If no tax was applied, defaults to 0. */ + amount_tax: z + .number() + .int() + .describe( + 'Total tax amount applied. If no tax was applied, defaults to 0.' + ), + /** Total after discounts and taxes. */ + amount_total: z + .number() + .int() + .describe('Total after discounts and taxes.'), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.' + ) + .optional(), + /** The discounts applied to the line item. */ + discounts: z + .array(LineItemsDiscountAmountSchema) + .describe('The discounts applied to the line item.') + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The price used to generate the line item. */ + price: PriceSchema.nullable() + .describe('The price used to generate the line item.') + .optional(), + /** The quantity of products being purchased. */ + quantity: z + .number() + .int() + .nullable() + .describe('The quantity of products being purchased.') + .optional(), + /** The taxes applied to the line item. */ + taxes: z + .array(LineItemsTaxAmountSchema) + .describe('The taxes applied to the line item.') + .optional() + }) + .describe('A line item.') + export type Item = z.infer + + export const QuotesResourceFromQuoteSchema = z.object({ + /** Whether this quote is a revision of a different quote. */ + is_revision: z + .boolean() + .describe('Whether this quote is a revision of a different quote.'), + /** The quote that was cloned. */ + quote: z + .union([z.string().max(5000), QuoteSchema]) + .describe('The quote that was cloned.') + }) + export type QuotesResourceFromQuote = z.infer< + typeof QuotesResourceFromQuoteSchema + > + + export const InvoiceSettingQuoteSettingSchema = z.object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + '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`.' + ) + .optional(), + issuer: ConnectAccountReferenceSchema + }) + export type InvoiceSettingQuoteSetting = z.infer< + typeof InvoiceSettingQuoteSettingSchema + > + + export const QuotesResourceTransferDataSchema = z.object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** 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: z + .number() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The account where funds from the payment will be transferred to upon payment success. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'The account where funds from the payment will be transferred to upon payment success.' + ) + }) + export type QuotesResourceTransferData = z.infer< + typeof QuotesResourceTransferDataSchema + > + + export const InvoiceTransferDataSchema = z.object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The account where funds from the payment will be transferred to upon payment success. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'The account where funds from the payment will be transferred to upon payment success.' + ) + }) + export type InvoiceTransferData = z.infer + + export const TransferDataSchema = z.object({ + /** + * 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: z + .number() + .int() + .describe( + '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.\n 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\n representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00).' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .describe( + '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.' + ) + }) + export type TransferData = z.infer + + export const PaymentMethodSepaDebitSchema = z.object({ + /** Bank code of bank associated with the bank account. */ + bank_code: z + .string() + .max(5000) + .nullable() + .describe('Bank code of bank associated with the bank account.') + .optional(), + /** Branch code of bank associated with the bank account. */ + branch_code: z + .string() + .max(5000) + .nullable() + .describe('Branch code of bank associated with the bank account.') + .optional(), + /** Two-letter ISO code representing the country the bank account is located in. */ + country: z + .string() + .max(5000) + .nullable() + .describe( + 'Two-letter ISO code representing the country the bank account is located in.' + ) + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Information about the object that generated this PaymentMethod. */ + generated_from: SepaDebitGeneratedFromSchema.nullable() + .describe( + 'Information about the object that generated this PaymentMethod.' + ) + .optional(), + /** Last four characters of the IBAN. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four characters of the IBAN.') + .optional() + }) + export type PaymentMethodSepaDebit = z.infer< + typeof PaymentMethodSepaDebitSchema + > + + export const SepaDebitGeneratedFromSchema = z.object({ + /** The ID of the Charge that generated this PaymentMethod, if any. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .nullable() + .describe( + 'The ID of the Charge that generated this PaymentMethod, if any.' + ) + .optional(), + /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */ + setup_attempt: z + .union([z.string().max(5000), SetupAttemptSchema]) + .nullable() + .describe( + 'The ID of the SetupAttempt that generated this PaymentMethod, if any.' + ) + .optional() + }) + export type SepaDebitGeneratedFrom = z.infer< + typeof SepaDebitGeneratedFromSchema + > + + export const AccountSettingsSchema = z.object({ + bacs_debit_payments: AccountBacsDebitPaymentsSettingsSchema.optional(), + branding: AccountBrandingSettingsSchema, + card_issuing: AccountCardIssuingSettingsSchema.optional(), + card_payments: AccountCardPaymentsSettingsSchema, + dashboard: AccountDashboardSettingsSchema, + invoices: AccountInvoicesSettingsSchema.optional(), + payments: AccountPaymentsSettingsSchema, + payouts: AccountPayoutSettingsSchema.optional(), + sepa_debit_payments: AccountSepaDebitPaymentsSettingsSchema.optional(), + treasury: AccountTreasurySettingsSchema.optional() + }) + export type AccountSettings = z.infer + + export const AccountInvoicesSettingsSchema = z.object({ + /** 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: z + .array(z.union([z.string().max(5000), TaxIdSchema])) + .nullable() + .describe( + 'The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.' + ) + .optional() + }) + export type AccountInvoicesSettings = z.infer< + typeof AccountInvoicesSettingsSchema + > + + export const ExternalAccountSchema = z.union([BankAccountSchema, CardSchema]) + export type ExternalAccount = z.infer + + export const ThresholdsResourceUsageAlertFilterSchema = z.object({ + /** Limit the scope of the alert to this customer ID */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .nullable() + .describe('Limit the scope of the alert to this customer ID') + .optional(), + type: z.literal('customer') + }) + export type ThresholdsResourceUsageAlertFilter = z.infer< + typeof ThresholdsResourceUsageAlertFilterSchema + > + + export const PaymentPagesCheckoutSessionAutomaticTaxSchema = z.object({ + /** Indicates whether automatic tax is enabled for the session */ + enabled: z + .boolean() + .describe('Indicates whether automatic tax is enabled for the session'), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional(), + /** The status of the most recent automated tax calculation for this session. */ + status: z + .enum(['complete', 'failed', 'requires_location_inputs']) + .nullable() + .describe( + 'The status of the most recent automated tax calculation for this session.' + ) + .optional() + }) + export type PaymentPagesCheckoutSessionAutomaticTax = z.infer< + typeof PaymentPagesCheckoutSessionAutomaticTaxSchema + > + + export const PaymentPagesCheckoutSessionDiscountSchema = z.object({ + /** Coupon attached to the Checkout Session. */ + coupon: z + .union([z.string().max(5000), CouponSchema]) + .nullable() + .describe('Coupon attached to the Checkout Session.') + .optional(), + /** Promotion code attached to the Checkout Session. */ + promotion_code: z + .union([z.string().max(5000), PromotionCodeSchema]) + .nullable() + .describe('Promotion code attached to the Checkout Session.') + .optional() + }) + export type PaymentPagesCheckoutSessionDiscount = z.infer< + typeof PaymentPagesCheckoutSessionDiscountSchema + > + + export const PaymentLinksResourceAutomaticTaxSchema = z.object({ + /** If `true`, tax will be calculated automatically using the customer's location. */ + enabled: z + .boolean() + .describe( + "If `true`, tax will be calculated automatically using the customer's location." + ), + /** 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: ConnectAccountReferenceSchema.nullable() + .describe( + "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." + ) + .optional() + }) + export type PaymentLinksResourceAutomaticTax = z.infer< + typeof PaymentLinksResourceAutomaticTaxSchema + > + + export const PaymentLinksResourceSubscriptionDataInvoiceSettingsSchema = + z.object({ issuer: ConnectAccountReferenceSchema }) + export type PaymentLinksResourceSubscriptionDataInvoiceSettings = z.infer< + typeof PaymentLinksResourceSubscriptionDataInvoiceSettingsSchema + > + + export const PaymentLinksResourceTransferDataSchema = z.object({ + /** 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: z + .number() + .int() + .nullable() + .describe( + '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.' + ) + .optional(), + /** The connected account receiving the transfer. */ + destination: z + .union([z.string().max(5000), AccountSchema]) + .describe('The connected account receiving the transfer.') + }) + export type PaymentLinksResourceTransferData = z.infer< + typeof PaymentLinksResourceTransferDataSchema + > + + export const PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownSchema = + z.object({ + /** The aggregated discounts. */ + discounts: z + .array(LineItemsDiscountAmountSchema) + .describe('The aggregated discounts.'), + /** The aggregated tax amounts by rate. */ + taxes: z + .array(LineItemsTaxAmountSchema) + .describe('The aggregated tax amounts by rate.') + }) + export type PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown = + z.infer< + typeof PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownSchema + > + + /** Details of the PaymentMethod collected by Payment Element */ + export const ConfirmationTokensResourcePaymentMethodPreviewSchema = z + .object({ + acss_debit: PaymentMethodAcssDebitSchema.optional(), + affirm: PaymentMethodAffirmSchema.optional(), + afterpay_clearpay: PaymentMethodAfterpayClearpaySchema.optional(), + alipay: PaymentFlowsPrivatePaymentMethodsAlipaySchema.optional(), + /** 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: z + .enum(['always', 'limited', 'unspecified']) + .describe( + '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”.' + ) + .optional(), + alma: PaymentMethodAlmaSchema.optional(), + amazon_pay: PaymentMethodAmazonPaySchema.optional(), + au_becs_debit: PaymentMethodAuBecsDebitSchema.optional(), + bacs_debit: PaymentMethodBacsDebitSchema.optional(), + bancontact: PaymentMethodBancontactSchema.optional(), + billing_details: BillingDetailsSchema, + blik: PaymentMethodBlikSchema.optional(), + boleto: PaymentMethodBoletoSchema.optional(), + card: PaymentMethodCardSchema.optional(), + card_present: PaymentMethodCardPresentSchema.optional(), + cashapp: PaymentMethodCashappSchema.optional(), + /** 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: z + .union([z.string().max(5000), CustomerSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + customer_balance: PaymentMethodCustomerBalanceSchema.optional(), + eps: PaymentMethodEpsSchema.optional(), + fpx: PaymentMethodFpxSchema.optional(), + giropay: PaymentMethodGiropaySchema.optional(), + grabpay: PaymentMethodGrabpaySchema.optional(), + ideal: PaymentMethodIdealSchema.optional(), + interac_present: PaymentMethodInteracPresentSchema.optional(), + kakao_pay: PaymentMethodKakaoPaySchema.optional(), + klarna: PaymentMethodKlarnaSchema.optional(), + konbini: PaymentMethodKonbiniSchema.optional(), + kr_card: PaymentMethodKrCardSchema.optional(), + link: PaymentMethodLinkSchema.optional(), + mobilepay: PaymentMethodMobilepaySchema.optional(), + multibanco: PaymentMethodMultibancoSchema.optional(), + naver_pay: PaymentMethodNaverPaySchema.optional(), + oxxo: PaymentMethodOxxoSchema.optional(), + p24: PaymentMethodP24Schema.optional(), + pay_by_bank: PaymentMethodPayByBankSchema.optional(), + payco: PaymentMethodPaycoSchema.optional(), + paynow: PaymentMethodPaynowSchema.optional(), + paypal: PaymentMethodPaypalSchema.optional(), + pix: PaymentMethodPixSchema.optional(), + promptpay: PaymentMethodPromptpaySchema.optional(), + revolut_pay: PaymentMethodRevolutPaySchema.optional(), + samsung_pay: PaymentMethodSamsungPaySchema.optional(), + sepa_debit: PaymentMethodSepaDebitSchema.optional(), + sofort: PaymentMethodSofortSchema.optional(), + swish: PaymentMethodSwishSchema.optional(), + twint: PaymentMethodTwintSchema.optional(), + /** 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: z + .enum([ + 'acss_debit', + 'affirm', + 'afterpay_clearpay', + 'alipay', + 'alma', + 'amazon_pay', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'blik', + 'boleto', + 'card', + 'card_present', + 'cashapp', + 'customer_balance', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'interac_present', + 'kakao_pay', + 'klarna', + 'konbini', + 'kr_card', + 'link', + 'mobilepay', + 'multibanco', + 'naver_pay', + 'oxxo', + 'p24', + 'pay_by_bank', + 'payco', + 'paynow', + 'paypal', + 'pix', + 'promptpay', + 'revolut_pay', + 'samsung_pay', + 'sepa_debit', + 'sofort', + 'swish', + 'twint', + 'us_bank_account', + 'wechat_pay', + 'zip' + ]) + .describe( + '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.' + ), + us_bank_account: PaymentMethodUsBankAccountSchema.optional(), + wechat_pay: PaymentMethodWechatPaySchema.optional(), + zip: PaymentMethodZipSchema.optional() + }) + .describe('Details of the PaymentMethod collected by Payment Element') + export type ConfirmationTokensResourcePaymentMethodPreview = z.infer< + typeof ConfirmationTokensResourcePaymentMethodPreviewSchema + > + + export const CreditNotesPretaxCreditAmountSchema = z.object({ + /** The amount, in cents (or local equivalent), of the pretax credit amount. */ + amount: z + .number() + .int() + .describe( + 'The amount, in cents (or local equivalent), of the pretax credit amount.' + ), + /** The credit balance transaction that was applied to get this pretax credit amount. */ + credit_balance_transaction: z + .union([z.string().max(5000), BillingCreditBalanceTransactionSchema]) + .describe( + 'The credit balance transaction that was applied to get this pretax credit amount.' + ) + .optional(), + /** The discount that was applied to get this pretax credit amount. */ + discount: z + .union([z.string().max(5000), DiscountSchema, DeletedDiscountSchema]) + .describe( + 'The discount that was applied to get this pretax credit amount.' + ) + .optional(), + /** Type of the pretax credit amount referenced. */ + type: z + .enum(['credit_balance_transaction', 'discount']) + .describe('Type of the pretax credit amount referenced.') + }) + export type CreditNotesPretaxCreditAmount = z.infer< + typeof CreditNotesPretaxCreditAmountSchema + > + + export const PaymentSourceSchema = z.union([ + AccountSchema, + BankAccountSchema, + CardSchema, + SourceSchema + ]) + export type PaymentSource = z.infer + + export const BankConnectionsResourceAccountholderSchema = z.object({ + /** The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.' + ) + .optional(), + /** ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .describe( + 'ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.' + ) + .optional(), + /** Type of account holder that this account belongs to. */ + type: z + .enum(['account', 'customer']) + .describe('Type of account holder that this account belongs to.') + }) + export type BankConnectionsResourceAccountholder = z.infer< + typeof BankConnectionsResourceAccountholderSchema + > + + /** + * 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 RadarEarlyFraudWarningSchema = z + .object({ + /** 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: z + .boolean() + .describe( + '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.' + ), + /** ID of the charge this early fraud warning is for, optionally expanded. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .describe( + 'ID of the charge this early fraud warning is for, optionally expanded.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .max(5000) + .describe( + '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`.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('radar.early_fraud_warning') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the Payment Intent this early fraud warning is for, optionally expanded. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .describe( + 'ID of the Payment Intent this early fraud warning is for, optionally expanded.' + ) + .optional() + }) + .describe( + 'An early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.\n\nRelated guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)' + ) + export type RadarEarlyFraudWarning = z.infer< + typeof RadarEarlyFraudWarningSchema + > + + export const InboundTransfersPaymentMethodDetailsUsBankAccountSchema = + z.object({ + /** Account holder type: individual or company. */ + account_holder_type: z + .enum(['company', 'individual']) + .nullable() + .describe('Account holder type: individual or company.') + .optional(), + /** Account type: checkings or savings. Defaults to checking if omitted. */ + account_type: z + .enum(['checking', 'savings']) + .nullable() + .describe( + 'Account type: checkings or savings. Defaults to checking if omitted.' + ) + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .union([z.string().max(5000), MandateSchema]) + .describe('ID of the mandate used to make this payment.') + .optional(), + /** 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: z + .literal('ach') + .describe( + '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.' + ), + /** Routing number of the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('Routing number of the bank account.') + .optional() + }) + export type InboundTransfersPaymentMethodDetailsUsBankAccount = z.infer< + typeof InboundTransfersPaymentMethodDetailsUsBankAccountSchema + > + + export const OutboundPaymentsPaymentMethodDetailsUsBankAccountSchema = + z.object({ + /** Account holder type: individual or company. */ + account_holder_type: z + .enum(['company', 'individual']) + .nullable() + .describe('Account holder type: individual or company.') + .optional(), + /** Account type: checkings or savings. Defaults to checking if omitted. */ + account_type: z + .enum(['checking', 'savings']) + .nullable() + .describe( + 'Account type: checkings or savings. Defaults to checking if omitted.' + ) + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .union([z.string().max(5000), MandateSchema]) + .describe('ID of the mandate used to make this payment.') + .optional(), + /** 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: z + .enum(['ach', 'us_domestic_wire']) + .describe( + '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.' + ), + /** Routing number of the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('Routing number of the bank account.') + .optional() + }) + export type OutboundPaymentsPaymentMethodDetailsUsBankAccount = z.infer< + typeof OutboundPaymentsPaymentMethodDetailsUsBankAccountSchema + > + + export const OutboundTransfersPaymentMethodDetailsUsBankAccountSchema = + z.object({ + /** Account holder type: individual or company. */ + account_holder_type: z + .enum(['company', 'individual']) + .nullable() + .describe('Account holder type: individual or company.') + .optional(), + /** Account type: checkings or savings. Defaults to checking if omitted. */ + account_type: z + .enum(['checking', 'savings']) + .nullable() + .describe( + 'Account type: checkings or savings. Defaults to checking if omitted.' + ) + .optional(), + /** Name of the bank associated with the bank account. */ + bank_name: z + .string() + .max(5000) + .nullable() + .describe('Name of the bank associated with the bank account.') + .optional(), + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint: z + .string() + .max(5000) + .nullable() + .describe( + 'Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.' + ) + .optional(), + /** Last four digits of the bank account number. */ + last4: z + .string() + .max(5000) + .nullable() + .describe('Last four digits of the bank account number.') + .optional(), + /** ID of the mandate used to make this payment. */ + mandate: z + .union([z.string().max(5000), MandateSchema]) + .describe('ID of the mandate used to make this payment.') + .optional(), + /** 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: z + .enum(['ach', 'us_domestic_wire']) + .describe( + '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.' + ), + /** Routing number of the bank account. */ + routing_number: z + .string() + .max(5000) + .nullable() + .describe('Routing number of the bank account.') + .optional() + }) + export type OutboundTransfersPaymentMethodDetailsUsBankAccount = z.infer< + typeof OutboundTransfersPaymentMethodDetailsUsBankAccountSchema + > + + /** + * 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 TokenSchema = z + .object({ + bank_account: BankAccountSchema.optional(), + card: CardSchema.optional(), + /** IP address of the client that generates the token. */ + client_ip: z + .string() + .max(5000) + .nullable() + .describe('IP address of the client that generates the token.') + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('token') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Type of the token: `account`, `bank_account`, `card`, or `pii`. */ + type: z + .string() + .max(5000) + .describe( + 'Type of the token: `account`, `bank_account`, `card`, or `pii`.' + ), + /** Determines if you have already used this token (you can only use tokens once). */ + used: z + .boolean() + .describe( + 'Determines if you have already used this token (you can only use tokens once).' + ) + }) + .describe( + "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. Use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\non the client-side. This guarantees that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you can't use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. If\nyour integration uses this method, you're responsible for any PCI compliance\nthat it might require, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information isn't sent directly to\nStripe, so we can't determine how it's handled or stored.\n\nYou can't store or use tokens more than once. To store card or bank account\ninformation for later use, create [Customer](https://stripe.com/docs/api#customers)\nobjects or [External accounts](/api#external_accounts).\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization." + ) + export type Token = z.infer + + /** Indicates the billing credit balance for billing credits granted to a customer. */ + export const BillingCreditBalanceSummarySchema = z + .object({ + /** 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: z + .array(CreditBalanceSchema) + .describe( + '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.' + ), + /** The customer the balance is for. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .describe('The customer the balance is for.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.credit_balance_summary') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + 'Indicates the billing credit balance for billing credits granted to a customer.' + ) + export type BillingCreditBalanceSummary = z.infer< + typeof BillingCreditBalanceSummarySchema + > + + export const PaymentPagesCheckoutSessionInvoiceSettingsSchema = z.object({ + /** The account tax IDs associated with the invoice. */ + account_tax_ids: z + .array(z.union([z.string().max(5000), TaxIdSchema, DeletedTaxIdSchema])) + .nullable() + .describe('The account tax IDs associated with the invoice.') + .optional(), + /** Custom fields displayed on the invoice. */ + custom_fields: z + .array(InvoiceSettingCustomFieldSchema) + .nullable() + .describe('Custom fields displayed on the invoice.') + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Footer displayed on the invoice. */ + footer: z + .string() + .max(5000) + .nullable() + .describe('Footer displayed on the invoice.') + .optional(), + /** The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. */ + issuer: ConnectAccountReferenceSchema.nullable() + .describe( + 'The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Options for invoice PDF rendering. */ + rendering_options: InvoiceSettingCheckoutRenderingOptionsSchema.nullable() + .describe('Options for invoice PDF rendering.') + .optional() + }) + export type PaymentPagesCheckoutSessionInvoiceSettings = z.infer< + typeof PaymentPagesCheckoutSessionInvoiceSettingsSchema + > + + export const PaymentLinksResourceInvoiceSettingsSchema = z.object({ + /** The account tax IDs associated with the invoice. */ + account_tax_ids: z + .array(z.union([z.string().max(5000), TaxIdSchema, DeletedTaxIdSchema])) + .nullable() + .describe('The account tax IDs associated with the invoice.') + .optional(), + /** A list of up to 4 custom fields to be displayed on the invoice. */ + custom_fields: z + .array(InvoiceSettingCustomFieldSchema) + .nullable() + .describe( + 'A list of up to 4 custom fields to be displayed on the invoice.' + ) + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Footer to be displayed on the invoice. */ + footer: z + .string() + .max(5000) + .nullable() + .describe('Footer to be displayed on the invoice.') + .optional(), + /** The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. */ + issuer: ConnectAccountReferenceSchema.nullable() + .describe( + 'The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.' + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Options for invoice PDF rendering. */ + rendering_options: InvoiceSettingCheckoutRenderingOptionsSchema.nullable() + .describe('Options for invoice PDF rendering.') + .optional() + }) + export type PaymentLinksResourceInvoiceSettings = z.infer< + typeof PaymentLinksResourceInvoiceSettingsSchema + > + + export const PaymentLinksResourceSubscriptionDataSchema = z.object({ + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + invoice_settings: PaymentLinksResourceSubscriptionDataInvoiceSettingsSchema, + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** Integer representing the number of trial period days before the customer is charged for the first time. */ + trial_period_days: z + .number() + .int() + .nullable() + .describe( + 'Integer representing the number of trial period days before the customer is charged for the first time.' + ) + .optional(), + /** Settings related to subscription trials. */ + trial_settings: SubscriptionsTrialsResourceTrialSettingsSchema.nullable() + .describe('Settings related to subscription trials.') + .optional() + }) + export type PaymentLinksResourceSubscriptionData = z.infer< + typeof PaymentLinksResourceSubscriptionDataSchema + > + + export const PaymentPagesCheckoutSessionTotalDetailsSchema = z.object({ + /** This is the sum of all the discounts. */ + amount_discount: z + .number() + .int() + .describe('This is the sum of all the discounts.'), + /** This is the sum of all the shipping amounts. */ + amount_shipping: z + .number() + .int() + .nullable() + .describe('This is the sum of all the shipping amounts.') + .optional(), + /** This is the sum of all the tax amounts. */ + amount_tax: z + .number() + .int() + .describe('This is the sum of all the tax amounts.'), + breakdown: + PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownSchema.optional() + }) + export type PaymentPagesCheckoutSessionTotalDetails = z.infer< + typeof PaymentPagesCheckoutSessionTotalDetailsSchema + > + + /** Represents a reader action to process a setup intent */ + export const TerminalReaderReaderResourceProcessSetupIntentActionSchema = z + .object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + process_config: + TerminalReaderReaderResourceProcessSetupConfigSchema.optional(), + /** Most recent SetupIntent processed by the reader. */ + setup_intent: z + .union([z.string().max(5000), SetupIntentSchema]) + .describe('Most recent SetupIntent processed by the reader.') + }) + .describe('Represents a reader action to process a setup intent') + export type TerminalReaderReaderResourceProcessSetupIntentAction = z.infer< + typeof TerminalReaderReaderResourceProcessSetupIntentActionSchema + > + + /** Represents a reader action to refund a payment */ + export const TerminalReaderReaderResourceRefundPaymentActionSchema = z + .object({ + /** The amount being refunded. */ + amount: z + .number() + .int() + .describe('The amount being refunded.') + .optional(), + /** Charge that is being refunded. */ + charge: z + .union([z.string().max(5000), ChargeSchema]) + .describe('Charge that is being refunded.') + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ) + .optional(), + /** Payment intent that is being refunded. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .describe('Payment intent that is being refunded.') + .optional(), + /** The reason for the refund. */ + reason: z + .enum(['duplicate', 'fraudulent', 'requested_by_customer']) + .describe('The reason for the refund.') + .optional(), + /** Unique identifier for the refund object. */ + refund: z + .union([z.string().max(5000), RefundSchema]) + .describe('Unique identifier for the refund object.') + .optional(), + /** 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: z + .boolean() + .describe( + '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.' + ) + .optional(), + refund_payment_config: + TerminalReaderReaderResourceRefundPaymentConfigSchema.optional(), + /** 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: z + .boolean() + .describe( + '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.' + ) + .optional() + }) + .describe('Represents a reader action to refund a payment') + export type TerminalReaderReaderResourceRefundPaymentAction = z.infer< + typeof TerminalReaderReaderResourceRefundPaymentActionSchema + > + + /** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + */ + export const CapabilitySchema = z + .object({ + /** The account for which the capability enables functionality. */ + account: z + .union([z.string().max(5000), AccountSchema]) + .describe( + 'The account for which the capability enables functionality.' + ), + future_requirements: AccountCapabilityFutureRequirementsSchema.optional(), + /** The identifier for the capability. */ + id: z.string().max(5000).describe('The identifier for the capability.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('capability') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Whether the capability has been requested. */ + requested: z + .boolean() + .describe('Whether the capability has been requested.'), + /** Time at which the capability was requested. Measured in seconds since the Unix epoch. */ + requested_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which the capability was requested. Measured in seconds since the Unix epoch.' + ) + .optional(), + requirements: AccountCapabilityRequirementsSchema.optional(), + /** The status of the capability. */ + status: z + .enum(['active', 'disabled', 'inactive', 'pending', 'unrequested']) + .describe('The status of the capability.') + }) + .describe( + 'This is an object representing a capability for a Stripe account.\n\nRelated guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)' + ) + export type Capability = z.infer + + export const PaymentPagesCheckoutSessionInvoiceCreationSchema = z.object({ + /** Indicates whether invoice creation is enabled for the Checkout Session. */ + enabled: z + .boolean() + .describe( + 'Indicates whether invoice creation is enabled for the Checkout Session.' + ), + invoice_data: PaymentPagesCheckoutSessionInvoiceSettingsSchema + }) + export type PaymentPagesCheckoutSessionInvoiceCreation = z.infer< + typeof PaymentPagesCheckoutSessionInvoiceCreationSchema + > + + export const PaymentLinksResourceInvoiceCreationSchema = z.object({ + /** Enable creating an invoice on successful payment. */ + enabled: z + .boolean() + .describe('Enable creating an invoice on successful payment.'), + /** Configuration for the invoice. Default invoice values will be used if unspecified. */ + invoice_data: PaymentLinksResourceInvoiceSettingsSchema.nullable() + .describe( + 'Configuration for the invoice. Default invoice values will be used if unspecified.' + ) + .optional() + }) + export type PaymentLinksResourceInvoiceCreation = z.infer< + typeof PaymentLinksResourceInvoiceCreationSchema + > + + /** The credit note line item object */ + export const CreditNoteLineItemSchema = z + .object({ + /** The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ + amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.' + ), + /** The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. */ + amount_excluding_tax: z + .number() + .int() + .nullable() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.' + ) + .optional(), + /** Description of the item being credited. */ + description: z + .string() + .max(5000) + .nullable() + .describe('Description of the item being credited.') + .optional(), + /** The integer amount in cents (or local equivalent) representing the discount being credited for this line item. */ + discount_amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the discount being credited for this line item.' + ), + /** The amount of discount calculated per discount for this line item */ + discount_amounts: z + .array(DiscountsResourceDiscountAmountSchema) + .describe( + 'The amount of discount calculated per discount for this line item' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** ID of the invoice line item being credited */ + invoice_line_item: z + .string() + .max(5000) + .describe('ID of the invoice line item being credited') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('credit_note_line_item') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The pretax credit amounts (ex: discount, credit grants, etc) for this line item. */ + pretax_credit_amounts: z + .array(CreditNotesPretaxCreditAmountSchema) + .describe( + 'The pretax credit amounts (ex: discount, credit grants, etc) for this line item.' + ), + /** The number of units of product being credited. */ + quantity: z + .number() + .int() + .nullable() + .describe('The number of units of product being credited.') + .optional(), + /** The amount of tax calculated per tax rate for this line item */ + tax_amounts: z + .array(CreditNoteTaxAmountSchema) + .describe( + 'The amount of tax calculated per tax rate for this line item' + ), + /** The tax rates which apply to the line item. */ + tax_rates: z + .array(TaxRateSchema) + .describe('The tax rates which apply to the line item.'), + /** 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: z + .enum(['custom_line_item', 'invoice_line_item']) + .describe( + '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.' + ), + /** The cost of each unit of product being credited. */ + unit_amount: z + .number() + .int() + .nullable() + .describe('The cost of each unit of product being credited.') + .optional(), + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal: z + .string() + .nullable() + .describe( + 'Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.' + ) + .optional(), + /** The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. */ + unit_amount_excluding_tax: z + .string() + .nullable() + .describe( + 'The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.' + ) + .optional() + }) + .describe('The credit note line item object') + export type CreditNoteLineItem = z.infer + + /** Represents a reader action to process a payment intent */ + export const TerminalReaderReaderResourceProcessPaymentIntentActionSchema = z + .object({ + /** Most recent PaymentIntent processed by the reader. */ + payment_intent: z + .union([z.string().max(5000), PaymentIntentSchema]) + .describe('Most recent PaymentIntent processed by the reader.'), + process_config: TerminalReaderReaderResourceProcessConfigSchema.optional() + }) + .describe('Represents a reader action to process a payment intent') + export type TerminalReaderReaderResourceProcessPaymentIntentAction = z.infer< + typeof TerminalReaderReaderResourceProcessPaymentIntentActionSchema + > + + export const InboundTransfersSchema = z.object({ + billing_details: TreasurySharedResourceBillingDetailsSchema, + /** The type of the payment method used in the InboundTransfer. */ + type: z + .literal('us_bank_account') + .describe('The type of the payment method used in the InboundTransfer.'), + us_bank_account: + InboundTransfersPaymentMethodDetailsUsBankAccountSchema.optional() + }) + export type InboundTransfers = z.infer + + export const OutboundPaymentsPaymentMethodDetailsSchema = z.object({ + billing_details: TreasurySharedResourceBillingDetailsSchema, + financial_account: + OutboundPaymentsPaymentMethodDetailsFinancialAccountSchema.optional(), + /** The type of the payment method used in the OutboundPayment. */ + type: z + .enum(['financial_account', 'us_bank_account']) + .describe('The type of the payment method used in the OutboundPayment.'), + us_bank_account: + OutboundPaymentsPaymentMethodDetailsUsBankAccountSchema.optional() + }) + export type OutboundPaymentsPaymentMethodDetails = z.infer< + typeof OutboundPaymentsPaymentMethodDetailsSchema + > + + export const OutboundTransfersPaymentMethodDetailsSchema = z.object({ + billing_details: TreasurySharedResourceBillingDetailsSchema, + financial_account: + OutboundTransfersPaymentMethodDetailsFinancialAccountSchema.optional(), + /** The type of the payment method used in the OutboundTransfer. */ + type: z + .enum(['financial_account', 'us_bank_account']) + .describe('The type of the payment method used in the OutboundTransfer.'), + us_bank_account: + OutboundTransfersPaymentMethodDetailsUsBankAccountSchema.optional() + }) + export type OutboundTransfersPaymentMethodDetails = z.infer< + typeof OutboundTransfersPaymentMethodDetailsSchema + > + + /** + * 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 CreditNoteSchema = z + .object({ + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. */ + amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.' + ), + /** This is the sum of all the shipping amounts. */ + amount_shipping: z + .number() + .int() + .describe('This is the sum of all the shipping amounts.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** ID of the customer. */ + customer: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .describe('ID of the customer.'), + /** Customer balance transaction related to this credit note. */ + customer_balance_transaction: z + .union([z.string().max(5000), CustomerBalanceTransactionSchema]) + .nullable() + .describe('Customer balance transaction related to this credit note.') + .optional(), + /** The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. */ + discount_amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.' + ), + /** The aggregate amounts calculated per discount for all line items. */ + discount_amounts: z + .array(DiscountsResourceDiscountAmountSchema) + .describe( + 'The aggregate amounts calculated per discount for all line items.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** ID of the invoice. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .describe('ID of the invoice.'), + /** Line items that make up the credit note */ + lines: z + .object({ + /** Details about each object. */ + data: z + .array(CreditNoteLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('Line items that make up the credit note'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** Customer-facing text that appears on the credit note PDF. */ + memo: z + .string() + .max(5000) + .nullable() + .describe('Customer-facing text that appears on the credit note PDF.') + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. */ + number: z + .string() + .max(5000) + .describe( + 'A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('credit_note') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Amount that was credited outside of Stripe. */ + out_of_band_amount: z + .number() + .int() + .nullable() + .describe('Amount that was credited outside of Stripe.') + .optional(), + /** The link to download the PDF of the credit note. */ + pdf: z + .string() + .max(5000) + .describe('The link to download the PDF of the credit note.'), + /** The pretax credit amounts (ex: discount, credit grants, etc) for all line items. */ + pretax_credit_amounts: z + .array(CreditNotesPretaxCreditAmountSchema) + .describe( + 'The pretax credit amounts (ex: discount, credit grants, etc) for all line items.' + ), + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason: z + .enum([ + 'duplicate', + 'fraudulent', + 'order_change', + 'product_unsatisfactory' + ]) + .nullable() + .describe( + 'Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`' + ) + .optional(), + /** Refund related to this credit note. */ + refund: z + .union([z.string().max(5000), RefundSchema]) + .nullable() + .describe('Refund related to this credit note.') + .optional(), + /** The details of the cost of shipping, including the ShippingRate applied to the invoice. */ + shipping_cost: InvoicesResourceShippingCostSchema.nullable() + .describe( + 'The details of the cost of shipping, including the ShippingRate applied to the invoice.' + ) + .optional(), + /** 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: z + .enum(['issued', 'void']) + .describe( + '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).' + ), + /** The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ + subtotal: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.' + ), + /** 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: z + .number() + .int() + .nullable() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.' + ) + .optional(), + /** The aggregate amounts calculated per tax rate for all line items. */ + tax_amounts: z + .array(CreditNoteTaxAmountSchema) + .describe( + 'The aggregate amounts calculated per tax rate for all line items.' + ), + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. */ + total: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.' + ), + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. */ + total_excluding_tax: z + .number() + .int() + .nullable() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.' + ) + .optional(), + /** 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: z + .enum(['post_payment', 'pre_payment']) + .describe( + '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.' + ), + /** The time that the credit note was voided. */ + voided_at: z + .number() + .int() + .nullable() + .describe('The time that the credit note was voided.') + .optional() + }) + .describe( + "Issue a credit note to adjust an invoice's amount after the invoice is finalized.\n\nRelated guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes)" + ) + export type CreditNote = z.infer + + /** + * 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 CustomerBalanceTransactionSchema = z + .object({ + /** 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: z + .number() + .int() + .describe( + "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`." + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The ID of the credit note (if any) related to the transaction. */ + credit_note: z + .union([z.string().max(5000), CreditNoteSchema]) + .nullable() + .describe( + 'The ID of the credit note (if any) related to the transaction.' + ) + .optional(), + /** 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: z + .string() + .describe( + '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).' + ), + /** The ID of the customer the transaction belongs to. */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .describe('The ID of the customer the transaction belongs to.'), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The ID of the invoice (if any) related to the transaction. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .nullable() + .describe('The ID of the invoice (if any) related to the transaction.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('customer_balance_transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. */ + type: z + .enum([ + 'adjustment', + 'applied_to_invoice', + 'credit_note', + 'initial', + 'invoice_overpaid', + 'invoice_too_large', + 'invoice_too_small', + 'migration', + 'unapplied_from_invoice', + 'unspent_receiver_credit' + ]) + .describe( + 'Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.' + ) + }) + .describe( + "Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value,\nwhich denotes a debit or credit that's automatically applied to their next invoice upon finalization.\nYou may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),\nor by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.\n\nRelated guide: [Customer balance](https://stripe.com/docs/billing/customer/balance)" + ) + export type CustomerBalanceTransaction = z.infer< + typeof CustomerBalanceTransactionSchema + > + + /** + * 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 const CustomerSessionSchema = z + .object({ + /** + * 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: z + .string() + .max(5000) + .describe( + 'The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.\n\nThe 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.' + ), + components: CustomerSessionResourceComponentsSchema.optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** The Customer the Customer Session was created for. */ + customer: z + .union([z.string().max(5000), CustomerSchema]) + .describe('The Customer the Customer Session was created for.'), + /** The timestamp at which this Customer Session will expire. */ + expires_at: z + .number() + .int() + .describe('The timestamp at which this Customer Session will expire.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('customer_session') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ) + }) + .describe( + "A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access\ncontrol over a Customer.\n\nRelated guides: [Customer Session with the Payment Element](/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods),\n[Customer Session with the Pricing Table](/payments/checkout/pricing-table#customer-session),\n[Customer Session with the Buy Button](/payment-links/buy-button#pass-an-existing-customer)." + ) + export type CustomerSession = z.infer + + /** The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. */ + export const ThresholdsResourceUsageThresholdConfigSchema = z + .object({ + /** The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. */ + filters: z + .array(ThresholdsResourceUsageAlertFilterSchema) + .nullable() + .describe( + 'The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.' + ) + .optional(), + /** The value at which this alert will trigger. */ + gte: z + .number() + .int() + .describe('The value at which this alert will trigger.'), + /** The [Billing Meter](/api/billing/meter) ID whose usage is monitored. */ + meter: z + .union([z.string().max(5000), BillingMeterSchema]) + .describe( + 'The [Billing Meter](/api/billing/meter) ID whose usage is monitored.' + ), + /** Defines how the alert will behave. */ + recurrence: z + .literal('one_time') + .describe('Defines how the alert will behave.') + }) + .describe( + 'The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed.' + ) + export type ThresholdsResourceUsageThresholdConfig = z.infer< + typeof ThresholdsResourceUsageThresholdConfigSchema + > + + /** 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 const BillingAlertSchema = z + .object({ + /** Defines the type of the alert. */ + alert_type: z + .literal('usage_threshold') + .describe('Defines the type of the alert.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('billing.alert') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Status of the alert. This can be active, inactive or archived. */ + status: z + .enum(['active', 'archived', 'inactive']) + .nullable() + .describe( + 'Status of the alert. This can be active, inactive or archived.' + ) + .optional(), + /** Title of the alert. */ + title: z.string().max(5000).describe('Title of the alert.'), + /** Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). */ + usage_threshold: ThresholdsResourceUsageThresholdConfigSchema.nullable() + .describe( + 'Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).' + ) + .optional() + }) + .describe( + '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 BillingAlert = z.infer + + /** + * 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 const ConfirmationTokenSchema = z + .object({ + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. */ + expires_at: z + .number() + .int() + .nullable() + .describe( + 'Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** Data used for generating a Mandate. */ + mandate_data: ConfirmationTokensResourceMandateDataSchema.nullable() + .describe('Data used for generating a Mandate.') + .optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('confirmation_token') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. */ + payment_intent: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.' + ) + .optional(), + /** Payment-method-specific configuration for this ConfirmationToken. */ + payment_method_options: + ConfirmationTokensResourcePaymentMethodOptionsSchema.nullable() + .describe( + 'Payment-method-specific configuration for this ConfirmationToken.' + ) + .optional(), + /** 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: + ConfirmationTokensResourcePaymentMethodPreviewSchema.nullable() + .describe( + 'Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.' + ) + .optional(), + /** Return URL used to confirm the Intent. */ + return_url: z + .string() + .max(5000) + .nullable() + .describe('Return URL used to confirm the Intent.') + .optional(), + /** + * 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: z + .enum(['off_session', 'on_session']) + .nullable() + .describe( + "Indicates that you intend to make future payments with this ConfirmationToken's payment method.\n\nThe 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." + ) + .optional(), + /** ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. */ + setup_intent: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.' + ) + .optional(), + /** Shipping information collected on this ConfirmationToken. */ + shipping: ConfirmationTokensResourceShippingSchema.nullable() + .describe('Shipping information collected on this ConfirmationToken.') + .optional(), + /** Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. */ + use_stripe_sdk: z + .boolean() + .describe( + 'Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.' + ) + }) + .describe( + 'ConfirmationTokens help transport client side data collected by Stripe JS over\nto your server for confirming a PaymentIntent or SetupIntent. If the confirmation\nis successful, values present on the ConfirmationToken are written onto the Intent.\n\nTo learn more about how to use ConfirmationToken, visit the related guides:\n- [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server)\n- [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation).' + ) + export type ConfirmationToken = z.infer + + /** A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. */ + export const FinancialConnectionsAccountSchema = z + .object({ + /** The account holder that this account belongs to. */ + account_holder: BankConnectionsResourceAccountholderSchema.nullable() + .describe('The account holder that this account belongs to.') + .optional(), + /** The most recent information about the account's balance. */ + balance: BankConnectionsResourceBalanceSchema.nullable() + .describe("The most recent information about the account's balance.") + .optional(), + /** The state of the most recent attempt to refresh the account balance. */ + balance_refresh: BankConnectionsResourceBalanceRefreshSchema.nullable() + .describe( + 'The state of the most recent attempt to refresh the account balance.' + ) + .optional(), + /** The type of the account. Account category is further divided in `subcategory`. */ + category: z + .enum(['cash', 'credit', 'investment', 'other']) + .describe( + 'The type of the account. Account category is further divided in `subcategory`.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + display_name: z + .string() + .max(5000) + .nullable() + .describe( + 'A human-readable name that has been assigned to this account, either by the account holder or by the institution.' + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The name of the institution that holds this account. */ + institution_name: z + .string() + .max(5000) + .describe('The name of the institution that holds this account.'), + /** The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + last4: z + .string() + .max(5000) + .nullable() + .describe( + 'The last 4 digits of the account number. If present, this will be 4 numeric characters.' + ) + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('financial_connections.account') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The most recent information about the account's owners. */ + ownership: z + .union([ + z.string().max(5000), + FinancialConnectionsAccountOwnershipSchema + ]) + .nullable() + .describe("The most recent information about the account's owners.") + .optional(), + /** The state of the most recent attempt to refresh the account owners. */ + ownership_refresh: + BankConnectionsResourceOwnershipRefreshSchema.nullable() + .describe( + 'The state of the most recent attempt to refresh the account owners.' + ) + .optional(), + /** The list of permissions granted by this account. */ + permissions: z + .array( + z.enum(['balances', 'ownership', 'payment_method', 'transactions']) + ) + .nullable() + .describe('The list of permissions granted by this account.') + .optional(), + /** The status of the link to the account. */ + status: z + .enum(['active', 'disconnected', 'inactive']) + .describe('The status of the link to the account.'), + /** + * 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: z + .enum([ + 'checking', + 'credit_card', + 'line_of_credit', + 'mortgage', + 'other', + 'savings' + ]) + .describe( + 'If `category` is `cash`, one of:\n\n - `checking`\n - `savings`\n - `other`\n\nIf `category` is `credit`, one of:\n\n - `mortgage`\n - `line_of_credit`\n - `credit_card`\n - `other`\n\nIf `category` is `investment` or `other`, this will be `other`.' + ), + /** The list of data refresh subscriptions requested on this account. */ + subscriptions: z + .array(z.literal('transactions')) + .nullable() + .describe( + 'The list of data refresh subscriptions requested on this account.' + ) + .optional(), + /** 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: z + .array(z.enum(['link', 'us_bank_account'])) + .describe( + 'The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.' + ), + /** The state of the most recent attempt to refresh the account transactions. */ + transaction_refresh: + BankConnectionsResourceTransactionRefreshSchema.nullable() + .describe( + 'The state of the most recent attempt to refresh the account transactions.' + ) + .optional() + }) + .describe( + 'A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.' + ) + export type FinancialConnectionsAccount = z.infer< + typeof FinancialConnectionsAccountSchema + > + + /** Represents an action performed by the reader */ + export const TerminalReaderReaderResourceReaderActionSchema = z + .object({ + /** Failure code, only set if status is `failed`. */ + failure_code: z + .string() + .max(5000) + .nullable() + .describe('Failure code, only set if status is `failed`.') + .optional(), + /** Detailed failure message, only set if status is `failed`. */ + failure_message: z + .string() + .max(5000) + .nullable() + .describe('Detailed failure message, only set if status is `failed`.') + .optional(), + process_payment_intent: + TerminalReaderReaderResourceProcessPaymentIntentActionSchema.optional(), + process_setup_intent: + TerminalReaderReaderResourceProcessSetupIntentActionSchema.optional(), + refund_payment: + TerminalReaderReaderResourceRefundPaymentActionSchema.optional(), + set_reader_display: + TerminalReaderReaderResourceSetReaderDisplayActionSchema.optional(), + /** Status of the action performed by the reader. */ + status: z + .enum(['failed', 'in_progress', 'succeeded']) + .describe('Status of the action performed by the reader.'), + /** Type of action performed by the reader. */ + type: z + .enum([ + 'process_payment_intent', + 'process_setup_intent', + 'refund_payment', + 'set_reader_display' + ]) + .describe('Type of action performed by the reader.') + }) + .describe('Represents an action performed by the reader') + export type TerminalReaderReaderResourceReaderAction = z.infer< + typeof TerminalReaderReaderResourceReaderActionSchema + > + + /** 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 FinancialConnectionsSessionSchema = z + .object({ + /** The account holder for whom accounts are collected in this session. */ + account_holder: BankConnectionsResourceAccountholderSchema.nullable() + .describe( + 'The account holder for whom accounts are collected in this session.' + ) + .optional(), + /** The accounts that were collected as part of this Session. */ + accounts: z + .object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsAccountSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/financial_connections/accounts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('The accounts that were collected as part of this Session.'), + /** A value that will be passed to the client to launch the authentication flow. */ + client_secret: z + .string() + .max(5000) + .describe( + 'A value that will be passed to the client to launch the authentication flow.' + ), + filters: + BankConnectionsResourceLinkAccountSessionFiltersSchema.optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('financial_connections.session') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Permissions requested for accounts collected during this session. */ + permissions: z + .array( + z.enum(['balances', 'ownership', 'payment_method', 'transactions']) + ) + .describe( + 'Permissions requested for accounts collected during this session.' + ), + /** Data features requested to be retrieved upon account creation. */ + prefetch: z + .array(z.enum(['balances', 'ownership', 'transactions'])) + .nullable() + .describe( + 'Data features requested to be retrieved upon account creation.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional() + }) + .describe( + '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 FinancialConnectionsSession = z.infer< + typeof FinancialConnectionsSessionSchema + > + + /** + * 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 const TerminalReaderSchema = z + .object({ + /** The most recent action performed by the reader. */ + action: TerminalReaderReaderResourceReaderActionSchema.nullable() + .describe('The most recent action performed by the reader.') + .optional(), + /** The current software version of the reader. */ + device_sw_version: z + .string() + .max(5000) + .nullable() + .describe('The current software version of the reader.') + .optional(), + /** Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. */ + device_type: z + .enum([ + 'bbpos_chipper2x', + 'bbpos_wisepad3', + 'bbpos_wisepos_e', + 'mobile_phone_reader', + 'simulated_wisepos_e', + 'stripe_m2', + 'stripe_s700', + 'verifone_P400' + ]) + .describe( + 'Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`.' + ), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The local IP address of the reader. */ + ip_address: z + .string() + .max(5000) + .nullable() + .describe('The local IP address of the reader.') + .optional(), + /** Custom label given to the reader for easier identification. */ + label: z + .string() + .max(5000) + .describe( + 'Custom label given to the reader for easier identification.' + ), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The location identifier of the reader. */ + location: z + .union([z.string().max(5000), TerminalLocationSchema]) + .nullable() + .describe('The location identifier of the reader.') + .optional(), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('terminal.reader') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Serial number of the reader. */ + serial_number: z + .string() + .max(5000) + .describe('Serial number of the reader.'), + /** The networking status of the reader. We do not recommend using this field in flows that may block taking payments. */ + status: z + .enum(['offline', 'online']) + .nullable() + .describe( + 'The networking status of the reader. We do not recommend using this field in flows that may block taking payments.' + ) + .optional() + }) + .describe( + 'A Reader represents a physical device for accepting payment details.\n\nRelated guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader)' + ) + export type TerminalReader = z.infer + + /** + * 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 PaymentLinkSchema = z + .object({ + /** 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: z + .boolean() + .describe( + "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." + ), + after_completion: PaymentLinksResourceAfterCompletionSchema, + /** Whether user redeemable promotion codes are enabled. */ + allow_promotion_codes: z + .boolean() + .describe('Whether user redeemable promotion codes are enabled.'), + /** The ID of the Connect application that created the Payment Link. */ + application: z + .union([ + z.string().max(5000), + ApplicationSchema, + DeletedApplicationSchema + ]) + .nullable() + .describe( + 'The ID of the Connect application that created the Payment Link.' + ) + .optional(), + /** 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: z + .number() + .int() + .nullable() + .describe( + "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." + ) + .optional(), + /** This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. */ + application_fee_percent: z + .number() + .nullable() + .describe( + "This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account." + ) + .optional(), + automatic_tax: PaymentLinksResourceAutomaticTaxSchema, + /** Configuration for collecting the customer's billing address. Defaults to `auto`. */ + billing_address_collection: z + .enum(['auto', 'required']) + .describe( + "Configuration for collecting the customer's billing address. Defaults to `auto`." + ), + /** When set, provides configuration to gather active consent from customers. */ + consent_collection: PaymentLinksResourceConsentCollectionSchema.nullable() + .describe( + 'When set, provides configuration to gather active consent from customers.' + ) + .optional(), + /** 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: z + .string() + .describe( + '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).' + ), + /** Collect additional information from your customer using custom fields. Up to 3 fields are supported. */ + custom_fields: z + .array(PaymentLinksResourceCustomFieldsSchema) + .describe( + 'Collect additional information from your customer using custom fields. Up to 3 fields are supported.' + ), + custom_text: PaymentLinksResourceCustomTextSchema, + /** Configuration for Customer creation during checkout. */ + customer_creation: z + .enum(['always', 'if_required']) + .describe('Configuration for Customer creation during checkout.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The custom message to be displayed to a customer when a payment link is no longer active. */ + inactive_message: z + .string() + .max(5000) + .nullable() + .describe( + 'The custom message to be displayed to a customer when a payment link is no longer active.' + ) + .optional(), + /** Configuration for creating invoice for payment mode payment links. */ + invoice_creation: PaymentLinksResourceInvoiceCreationSchema.nullable() + .describe( + 'Configuration for creating invoice for payment mode payment links.' + ) + .optional(), + /** The line items representing what is being sold. */ + line_items: z + .object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('The line items representing what is being sold.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('payment_link') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), AccountSchema]) + .nullable() + .describe( + '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.' + ) + .optional(), + /** Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + payment_intent_data: + PaymentLinksResourcePaymentIntentDataSchema.nullable() + .describe( + 'Indicates the parameters to be passed to PaymentIntent creation during checkout.' + ) + .optional(), + /** Configuration for collecting a payment method during checkout. Defaults to `always`. */ + payment_method_collection: z + .enum(['always', 'if_required']) + .describe( + 'Configuration for collecting a payment method during checkout. Defaults to `always`.' + ), + /** 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: z + .array( + z.enum([ + 'affirm', + 'afterpay_clearpay', + 'alipay', + 'alma', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'blik', + 'boleto', + 'card', + 'cashapp', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'klarna', + 'konbini', + 'link', + 'mobilepay', + 'multibanco', + 'oxxo', + 'p24', + 'pay_by_bank', + 'paynow', + 'paypal', + 'pix', + 'promptpay', + 'sepa_debit', + 'sofort', + 'swish', + 'twint', + 'us_bank_account', + 'wechat_pay', + 'zip' + ]) + ) + .nullable() + .describe( + "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)." + ) + .optional(), + phone_number_collection: PaymentLinksResourcePhoneNumberCollectionSchema, + /** Settings that restrict the usage of a payment link. */ + restrictions: PaymentLinksResourceRestrictionsSchema.nullable() + .describe('Settings that restrict the usage of a payment link.') + .optional(), + /** Configuration for collecting the customer's shipping address. */ + shipping_address_collection: + PaymentLinksResourceShippingAddressCollectionSchema.nullable() + .describe( + "Configuration for collecting the customer's shipping address." + ) + .optional(), + /** The shipping rate options applied to the session. */ + shipping_options: z + .array(PaymentLinksResourceShippingOptionSchema) + .describe('The shipping rate options applied to the session.'), + /** Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. */ + submit_type: z + .enum(['auto', 'book', 'donate', 'pay', 'subscribe']) + .describe( + 'Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.' + ), + /** 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: PaymentLinksResourceSubscriptionDataSchema.nullable() + .describe( + '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`.' + ) + .optional(), + tax_id_collection: PaymentLinksResourceTaxIdCollectionSchema, + /** 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: PaymentLinksResourceTransferDataSchema.nullable() + .describe( + 'The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.' + ) + .optional(), + /** The public URL that can be shared with customers. */ + url: z + .string() + .max(5000) + .describe('The public URL that can be shared with customers.') + }) + .describe( + '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.\n\nWhen 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.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payment-links)' + ) + export type PaymentLink = z.infer + + /** + * 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 TreasuryInboundTransferSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Returns `true` if the InboundTransfer is able to be canceled. */ + cancelable: z + .boolean() + .describe( + 'Returns `true` if the InboundTransfer is able to be canceled.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** Details about this InboundTransfer's failure. Only set when status is `failed`. */ + failure_details: + TreasuryInboundTransfersResourceFailureDetailsSchema.nullable() + .describe( + "Details about this InboundTransfer's failure. Only set when status is `failed`." + ) + .optional(), + /** The FinancialAccount that received the funds. */ + financial_account: z + .string() + .max(5000) + .describe('The FinancialAccount that received the funds.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + linked_flows: + TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsSchema, + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.inbound_transfer') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The origin payment method to be debited for an InboundTransfer. */ + origin_payment_method: z + .string() + .max(5000) + .nullable() + .describe( + 'The origin payment method to be debited for an InboundTransfer.' + ) + .optional(), + /** Details about the PaymentMethod for an InboundTransfer. */ + origin_payment_method_details: InboundTransfersSchema.nullable() + .describe('Details about the PaymentMethod for an InboundTransfer.') + .optional(), + /** Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + returned: z + .boolean() + .nullable() + .describe( + 'Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.' + ) + .optional(), + /** Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + statement_descriptor: z + .string() + .max(5000) + .describe( + 'Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.' + ), + /** 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: z + .enum(['canceled', 'failed', 'processing', 'succeeded']) + .describe( + '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_transitions: + TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsSchema, + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .nullable() + .describe('The Transaction associated with this object.') + .optional() + }) + .describe( + '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.\n\nRelated guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)' + ) + export type TreasuryInboundTransfer = z.infer< + typeof TreasuryInboundTransferSchema + > + + /** Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. */ + export const TreasuryTransactionSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + balance_impact: TreasuryTransactionsResourceBalanceImpactSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ), + /** A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. */ + entries: z + .object({ + /** Details about each object. */ + data: z + .array(TreasuryTransactionEntrySchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/treasury/transaction_entries')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .nullable() + .describe( + 'A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.' + ) + .optional(), + /** The FinancialAccount associated with this object. */ + financial_account: z + .string() + .max(5000) + .describe('The FinancialAccount associated with this object.'), + /** ID of the flow that created the Transaction. */ + flow: z + .string() + .max(5000) + .nullable() + .describe('ID of the flow that created the Transaction.') + .optional(), + /** Details of the flow that created the Transaction. */ + flow_details: TreasuryTransactionsResourceFlowDetailsSchema.nullable() + .describe('Details of the flow that created the Transaction.') + .optional(), + /** Type of the flow that created the Transaction. */ + flow_type: z + .enum([ + 'credit_reversal', + 'debit_reversal', + 'inbound_transfer', + 'issuing_authorization', + 'other', + 'outbound_payment', + 'outbound_transfer', + 'received_credit', + 'received_debit' + ]) + .describe('Type of the flow that created the Transaction.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.transaction') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Status of the Transaction. */ + status: z + .enum(['open', 'posted', 'void']) + .describe('Status of the Transaction.'), + status_transitions: + TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsSchema + }) + .describe( + "Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance." + ) + export type TreasuryTransaction = z.infer + + /** TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). */ + export const TreasuryTransactionEntrySchema = z + .object({ + balance_impact: TreasuryTransactionsResourceBalanceImpactSchema, + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** When the TransactionEntry will impact the FinancialAccount's balance. */ + effective_at: z + .number() + .int() + .describe( + "When the TransactionEntry will impact the FinancialAccount's balance." + ), + /** The FinancialAccount associated with this object. */ + financial_account: z + .string() + .max(5000) + .describe('The FinancialAccount associated with this object.'), + /** Token of the flow associated with the TransactionEntry. */ + flow: z + .string() + .max(5000) + .nullable() + .describe('Token of the flow associated with the TransactionEntry.') + .optional(), + /** Details of the flow associated with the TransactionEntry. */ + flow_details: TreasuryTransactionsResourceFlowDetailsSchema.nullable() + .describe('Details of the flow associated with the TransactionEntry.') + .optional(), + /** Type of the flow associated with the TransactionEntry. */ + flow_type: z + .enum([ + 'credit_reversal', + 'debit_reversal', + 'inbound_transfer', + 'issuing_authorization', + 'other', + 'outbound_payment', + 'outbound_transfer', + 'received_credit', + 'received_debit' + ]) + .describe('Type of the flow associated with the TransactionEntry.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.transaction_entry') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .describe('The Transaction associated with this object.'), + /** The specific money movement that generated the TransactionEntry. */ + type: z + .enum([ + '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' + ]) + .describe( + 'The specific money movement that generated the TransactionEntry.' + ) + }) + .describe( + 'TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).' + ) + export type TreasuryTransactionEntry = z.infer< + typeof TreasuryTransactionEntrySchema + > + + export const TreasuryTransactionsResourceFlowDetailsSchema = z.object({ + credit_reversal: TreasuryCreditReversalSchema.optional(), + debit_reversal: TreasuryDebitReversalSchema.optional(), + inbound_transfer: TreasuryInboundTransferSchema.optional(), + issuing_authorization: IssuingAuthorizationSchema.optional(), + outbound_payment: TreasuryOutboundPaymentSchema.optional(), + outbound_transfer: TreasuryOutboundTransferSchema.optional(), + received_credit: TreasuryReceivedCreditSchema.optional(), + received_debit: TreasuryReceivedDebitSchema.optional(), + /** Type of the flow that created the Transaction. Set to the same value as `flow_type`. */ + type: z + .enum([ + 'credit_reversal', + 'debit_reversal', + 'inbound_transfer', + 'issuing_authorization', + 'other', + 'outbound_payment', + 'outbound_transfer', + 'received_credit', + 'received_debit' + ]) + .describe( + 'Type of the flow that created the Transaction. Set to the same value as `flow_type`.' + ) + }) + export type TreasuryTransactionsResourceFlowDetails = z.infer< + typeof TreasuryTransactionsResourceFlowDetailsSchema + > + + /** 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 TreasuryCreditReversalSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** The FinancialAccount to reverse funds from. */ + financial_account: z + .string() + .max(5000) + .describe('The FinancialAccount to reverse funds from.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The rails used to reverse the funds. */ + network: z + .enum(['ach', 'stripe']) + .describe('The rails used to reverse the funds.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.credit_reversal') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The ReceivedCredit being reversed. */ + received_credit: z + .string() + .max(5000) + .describe('The ReceivedCredit being reversed.'), + /** Status of the CreditReversal */ + status: z + .enum(['canceled', 'posted', 'processing']) + .describe('Status of the CreditReversal'), + status_transitions: + TreasuryReceivedCreditsResourceStatusTransitionsSchema, + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .nullable() + .describe('The Transaction associated with this object.') + .optional() + }) + .describe( + '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 TreasuryCreditReversal = z.infer< + typeof TreasuryCreditReversalSchema + > + + /** 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 const TreasuryDebitReversalSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** The FinancialAccount to reverse funds from. */ + financial_account: z + .string() + .max(5000) + .nullable() + .describe('The FinancialAccount to reverse funds from.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Other flows linked to a DebitReversal. */ + linked_flows: + TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsSchema.nullable() + .describe('Other flows linked to a DebitReversal.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** The rails used to reverse the funds. */ + network: z + .enum(['ach', 'card']) + .describe('The rails used to reverse the funds.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.debit_reversal') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The ReceivedDebit being reversed. */ + received_debit: z + .string() + .max(5000) + .describe('The ReceivedDebit being reversed.'), + /** Status of the DebitReversal */ + status: z + .enum(['failed', 'processing', 'succeeded']) + .describe('Status of the DebitReversal'), + status_transitions: TreasuryReceivedDebitsResourceStatusTransitionsSchema, + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .nullable() + .describe('The Transaction associated with this object.') + .optional() + }) + .describe( + '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 TreasuryDebitReversal = z.infer< + typeof TreasuryDebitReversalSchema + > + + /** + * 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 TreasuryOutboundPaymentSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: z + .boolean() + .describe( + 'Returns `true` if the object can be canceled, and `false` otherwise.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + customer: z + .string() + .max(5000) + .nullable() + .describe( + 'ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.' + ) + .optional(), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.' + ) + .optional(), + /** Details about the PaymentMethod for an OutboundPayment. */ + destination_payment_method_details: + OutboundPaymentsPaymentMethodDetailsSchema.nullable() + .describe('Details about the PaymentMethod for an OutboundPayment.') + .optional(), + /** Details about the end user. */ + end_user_details: + TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsSchema.nullable() + .describe('Details about the end user.') + .optional(), + /** The date when funds are expected to arrive in the destination account. */ + expected_arrival_date: z + .number() + .int() + .describe( + 'The date when funds are expected to arrive in the destination account.' + ), + /** The FinancialAccount that funds were pulled from. */ + financial_account: z + .string() + .max(5000) + .describe('The FinancialAccount that funds were pulled from.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.outbound_payment') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Details about a returned OutboundPayment. Only set when the status is `returned`. */ + returned_details: + TreasuryOutboundPaymentsResourceReturnedStatusSchema.nullable() + .describe( + 'Details about a returned OutboundPayment. Only set when the status is `returned`.' + ) + .optional(), + /** The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + statement_descriptor: z + .string() + .max(5000) + .describe( + 'The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).' + ), + /** 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: z + .enum(['canceled', 'failed', 'posted', 'processing', 'returned']) + .describe( + '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_transitions: + TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsSchema, + /** Details about network-specific tracking information if available. */ + tracking_details: + TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsSchema.nullable() + .describe( + 'Details about network-specific tracking information if available.' + ) + .optional(), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .describe('The Transaction associated with this object.') + }) + .describe( + "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).\n\nSimulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.\n\nRelated guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)" + ) + export type TreasuryOutboundPayment = z.infer< + typeof TreasuryOutboundPaymentSchema + > + + export const TreasuryOutboundPaymentsResourceReturnedStatusSchema = z.object({ + /** Reason for the return. */ + code: z + .enum([ + 'account_closed', + 'account_frozen', + 'bank_account_restricted', + 'bank_ownership_changed', + 'declined', + 'incorrect_account_holder_name', + 'invalid_account_number', + 'invalid_currency', + 'no_account', + 'other' + ]) + .describe('Reason for the return.'), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .describe('The Transaction associated with this object.') + }) + export type TreasuryOutboundPaymentsResourceReturnedStatus = z.infer< + typeof TreasuryOutboundPaymentsResourceReturnedStatusSchema + > + + /** + * 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 TreasuryOutboundTransferSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: z + .boolean() + .describe( + 'Returns `true` if the object can be canceled, and `false` otherwise.' + ), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .nullable() + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ) + .optional(), + /** The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + destination_payment_method: z + .string() + .max(5000) + .nullable() + .describe( + 'The PaymentMethod used as the payment instrument for an OutboundTransfer.' + ) + .optional(), + destination_payment_method_details: + OutboundTransfersPaymentMethodDetailsSchema, + /** The date when funds are expected to arrive in the destination account. */ + expected_arrival_date: z + .number() + .int() + .describe( + 'The date when funds are expected to arrive in the destination account.' + ), + /** The FinancialAccount that funds were pulled from. */ + financial_account: z + .string() + .max(5000) + .describe('The FinancialAccount that funds were pulled from.'), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** 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: z + .record(z.string().max(500)) + .describe( + '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.' + ), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.outbound_transfer') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + returned_details: + TreasuryOutboundTransfersResourceReturnedDetailsSchema.nullable() + .describe( + 'Details about a returned OutboundTransfer. Only set when the status is `returned`.' + ) + .optional(), + /** Information about the OutboundTransfer to be sent to the recipient account. */ + statement_descriptor: z + .string() + .max(5000) + .describe( + 'Information about the OutboundTransfer to be sent to the recipient account.' + ), + /** 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: z + .enum(['canceled', 'failed', 'posted', 'processing', 'returned']) + .describe( + '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_transitions: + TreasuryOutboundTransfersResourceStatusTransitionsSchema, + /** Details about network-specific tracking information if available. */ + tracking_details: + TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsSchema.nullable() + .describe( + 'Details about network-specific tracking information if available.' + ) + .optional(), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .describe('The Transaction associated with this object.') + }) + .describe( + "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.\n\nSimulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.\n\nRelated guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)" + ) + export type TreasuryOutboundTransfer = z.infer< + typeof TreasuryOutboundTransferSchema + > + + export const TreasuryOutboundTransfersResourceReturnedDetailsSchema = + z.object({ + /** Reason for the return. */ + code: z + .enum([ + 'account_closed', + 'account_frozen', + 'bank_account_restricted', + 'bank_ownership_changed', + 'declined', + 'incorrect_account_holder_name', + 'invalid_account_number', + 'invalid_currency', + 'no_account', + 'other' + ]) + .describe('Reason for the return.'), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .describe('The Transaction associated with this object.') + }) + export type TreasuryOutboundTransfersResourceReturnedDetails = z.infer< + typeof TreasuryOutboundTransfersResourceReturnedDetailsSchema + > + + /** 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 const TreasuryReceivedCreditSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ), + /** Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. */ + failure_code: z + .enum([ + 'account_closed', + 'account_frozen', + 'international_transaction', + 'other' + ]) + .nullable() + .describe( + 'Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.' + ) + .optional(), + /** The FinancialAccount that received the funds. */ + financial_account: z + .string() + .max(5000) + .nullable() + .describe('The FinancialAccount that received the funds.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + initiating_payment_method_details: + TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsSchema, + linked_flows: TreasuryReceivedCreditsResourceLinkedFlowsSchema, + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The rails used to send the funds. */ + network: z + .enum(['ach', 'card', 'stripe', 'us_domestic_wire']) + .describe('The rails used to send the funds.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.received_credit') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Details describing when a ReceivedCredit may be reversed. */ + reversal_details: + TreasuryReceivedCreditsResourceReversalDetailsSchema.nullable() + .describe('Details describing when a ReceivedCredit may be reversed.') + .optional(), + /** 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: z + .enum(['failed', 'succeeded']) + .describe( + '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.' + ), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .nullable() + .describe('The Transaction associated with this object.') + .optional() + }) + .describe( + '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 TreasuryReceivedCredit = z.infer< + typeof TreasuryReceivedCreditSchema + > + + export const TreasuryReceivedCreditsResourceLinkedFlowsSchema = z.object({ + /** The CreditReversal created as a result of this ReceivedCredit being reversed. */ + credit_reversal: z + .string() + .max(5000) + .nullable() + .describe( + 'The CreditReversal created as a result of this ReceivedCredit being reversed.' + ) + .optional(), + /** Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization: z + .string() + .max(5000) + .nullable() + .describe( + 'Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.' + ) + .optional(), + /** Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + issuing_transaction: z + .string() + .max(5000) + .nullable() + .describe( + 'Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.' + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The expandable object of the source flow. */ + source_flow_details: + TreasuryReceivedCreditsResourceSourceFlowsDetailsSchema.nullable() + .describe('The expandable object of the source flow.') + .optional(), + /** The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + source_flow_type: z + .string() + .max(5000) + .nullable() + .describe( + 'The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).' + ) + .optional() + }) + export type TreasuryReceivedCreditsResourceLinkedFlows = z.infer< + typeof TreasuryReceivedCreditsResourceLinkedFlowsSchema + > + + export const TreasuryReceivedCreditsResourceSourceFlowsDetailsSchema = + z.object({ + credit_reversal: TreasuryCreditReversalSchema.optional(), + outbound_payment: TreasuryOutboundPaymentSchema.optional(), + outbound_transfer: TreasuryOutboundTransferSchema.optional(), + payout: PayoutSchema.optional(), + /** The type of the source flow that originated the ReceivedCredit. */ + type: z + .enum([ + 'credit_reversal', + 'other', + 'outbound_payment', + 'outbound_transfer', + 'payout' + ]) + .describe( + 'The type of the source flow that originated the ReceivedCredit.' + ) + }) + export type TreasuryReceivedCreditsResourceSourceFlowsDetails = z.infer< + typeof TreasuryReceivedCreditsResourceSourceFlowsDetailsSchema + > + + /** ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. */ + export const TreasuryReceivedDebitSchema = z + .object({ + /** Amount (in cents) transferred. */ + amount: z.number().int().describe('Amount (in cents) transferred.'), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .describe( + '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).' + ), + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: z + .string() + .max(5000) + .describe( + 'An arbitrary string attached to the object. Often useful for displaying to users.' + ), + /** Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. */ + failure_code: z + .enum([ + 'account_closed', + 'account_frozen', + 'insufficient_funds', + 'international_transaction', + 'other' + ]) + .nullable() + .describe( + "Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen." + ) + .optional(), + /** The FinancialAccount that funds were pulled from. */ + financial_account: z + .string() + .max(5000) + .nullable() + .describe('The FinancialAccount that funds were pulled from.') + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + "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." + ) + .optional(), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + initiating_payment_method_details: + TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsSchema.optional(), + linked_flows: TreasuryReceivedDebitsResourceLinkedFlowsSchema, + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The network used for the ReceivedDebit. */ + network: z + .enum(['ach', 'card', 'stripe']) + .describe('The network used for the ReceivedDebit.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('treasury.received_debit') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** Details describing when a ReceivedDebit might be reversed. */ + reversal_details: + TreasuryReceivedDebitsResourceReversalDetailsSchema.nullable() + .describe( + 'Details describing when a ReceivedDebit might be reversed.' + ) + .optional(), + /** 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: z + .enum(['failed', 'succeeded']) + .describe( + '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`.' + ), + /** The Transaction associated with this object. */ + transaction: z + .union([z.string().max(5000), TreasuryTransactionSchema]) + .nullable() + .describe('The Transaction associated with this object.') + .optional() + }) + .describe( + 'ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.' + ) + export type TreasuryReceivedDebit = z.infer< + typeof TreasuryReceivedDebitSchema + > + + /** + * 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 const CheckoutSessionSchema = z + .object({ + /** Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). */ + adaptive_pricing: + PaymentPagesCheckoutSessionAdaptivePricingSchema.nullable() + .describe( + 'Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).' + ) + .optional(), + /** When set, provides configuration for actions to take if this Checkout Session expires. */ + after_expiration: + PaymentPagesCheckoutSessionAfterExpirationSchema.nullable() + .describe( + 'When set, provides configuration for actions to take if this Checkout Session expires.' + ) + .optional(), + /** Enables user redeemable promotion codes. */ + allow_promotion_codes: z + .boolean() + .nullable() + .describe('Enables user redeemable promotion codes.') + .optional(), + /** Total of all items before discounts or taxes are applied. */ + amount_subtotal: z + .number() + .int() + .nullable() + .describe('Total of all items before discounts or taxes are applied.') + .optional(), + /** Total of all items after discounts and taxes are applied. */ + amount_total: z + .number() + .int() + .nullable() + .describe('Total of all items after discounts and taxes are applied.') + .optional(), + automatic_tax: PaymentPagesCheckoutSessionAutomaticTaxSchema, + /** Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. */ + billing_address_collection: z + .enum(['auto', 'required']) + .nullable() + .describe( + "Describes whether Checkout should collect the customer's billing address. Defaults to `auto`." + ) + .optional(), + /** 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: z + .string() + .max(5000) + .nullable() + .describe( + '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.' + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.' + ) + .optional(), + /** Client secret to be used when initializing Stripe.js embedded checkout. */ + client_secret: z + .string() + .max(5000) + .nullable() + .describe( + 'Client secret to be used when initializing Stripe.js embedded checkout.' + ) + .optional(), + /** Information about the customer collected within the Checkout Session. */ + collected_information: + PaymentPagesCheckoutSessionCollectedInformationSchema.nullable() + .describe( + 'Information about the customer collected within the Checkout Session.' + ) + .optional(), + /** Results of `consent_collection` for this session. */ + consent: PaymentPagesCheckoutSessionConsentSchema.nullable() + .describe('Results of `consent_collection` for this session.') + .optional(), + /** When set, provides configuration for the Checkout Session to gather active consent from customers. */ + consent_collection: + PaymentPagesCheckoutSessionConsentCollectionSchema.nullable() + .describe( + 'When set, provides configuration for the Checkout Session to gather active consent from customers.' + ) + .optional(), + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: z + .number() + .int() + .describe( + 'Time at which the object was created. Measured in seconds since the Unix epoch.' + ), + /** 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: z + .string() + .nullable() + .describe( + '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).' + ) + .optional(), + /** Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions */ + currency_conversion: + PaymentPagesCheckoutSessionCurrencyConversionSchema.nullable() + .describe( + 'Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions' + ) + .optional(), + /** Collect additional information from your customer using custom fields. Up to 3 fields are supported. */ + custom_fields: z + .array(PaymentPagesCheckoutSessionCustomFieldsSchema) + .describe( + 'Collect additional information from your customer using custom fields. Up to 3 fields are supported.' + ), + custom_text: PaymentPagesCheckoutSessionCustomTextSchema, + /** + * 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: z + .union([z.string().max(5000), CustomerSchema, DeletedCustomerSchema]) + .nullable() + .describe( + 'The ID of the customer for this Session.\nFor Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.' + ) + .optional(), + /** Configure whether a Checkout Session creates a Customer when the Checkout Session completes. */ + customer_creation: z + .enum(['always', 'if_required']) + .nullable() + .describe( + 'Configure whether a Checkout Session creates a Customer when the Checkout Session completes.' + ) + .optional(), + /** 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: + PaymentPagesCheckoutSessionCustomerDetailsSchema.nullable() + .describe( + "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." + ) + .optional(), + /** + * 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: z + .string() + .max(5000) + .nullable() + .describe( + 'If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.' + ) + .optional(), + /** List of coupons and promotion codes attached to the Checkout Session. */ + discounts: z + .array(PaymentPagesCheckoutSessionDiscountSchema) + .nullable() + .describe( + 'List of coupons and promotion codes attached to the Checkout Session.' + ) + .optional(), + /** The timestamp at which the Checkout Session will expire. */ + expires_at: z + .number() + .int() + .describe('The timestamp at which the Checkout Session will expire.'), + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** ID of the invoice created by the Checkout Session, if it exists. */ + invoice: z + .union([z.string().max(5000), InvoiceSchema]) + .nullable() + .describe( + 'ID of the invoice created by the Checkout Session, if it exists.' + ) + .optional(), + /** Details on the state of invoice creation for the Checkout Session. */ + invoice_creation: + PaymentPagesCheckoutSessionInvoiceCreationSchema.nullable() + .describe( + 'Details on the state of invoice creation for the Checkout Session.' + ) + .optional(), + /** The line items purchased by the customer. */ + line_items: z + .object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('The line items purchased by the customer.') + .optional(), + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: z + .boolean() + .describe( + 'Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.' + ), + /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ + locale: z + .enum([ + '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' + ]) + .nullable() + .describe( + "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used." + ) + .optional(), + /** 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: z + .record(z.string().max(500)) + .nullable() + .describe( + '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.' + ) + .optional(), + /** The mode of the Checkout Session. */ + mode: z + .enum(['payment', 'setup', 'subscription']) + .describe('The mode of the Checkout Session.'), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('checkout.session') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** 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: z + .union([z.string().max(5000), PaymentIntentSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** The ID of the Payment Link that created this Session. */ + payment_link: z + .union([z.string().max(5000), PaymentLinkSchema]) + .nullable() + .describe('The ID of the Payment Link that created this Session.') + .optional(), + /** Configure whether a Checkout Session should collect a payment method. Defaults to `always`. */ + payment_method_collection: z + .enum(['always', 'if_required']) + .nullable() + .describe( + 'Configure whether a Checkout Session should collect a payment method. Defaults to `always`.' + ) + .optional(), + /** Information about the payment method configuration used for this Checkout session if using dynamic payment methods. */ + payment_method_configuration_details: + PaymentMethodConfigBizPaymentMethodConfigurationDetailsSchema.nullable() + .describe( + 'Information about the payment method configuration used for this Checkout session if using dynamic payment methods.' + ) + .optional(), + /** Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ + payment_method_options: + CheckoutSessionPaymentMethodOptionsSchema.nullable() + .describe( + 'Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.' + ) + .optional(), + /** + * A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ + payment_method_types: z + .array(z.string().max(5000)) + .describe( + 'A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.' + ), + /** + * 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: z + .enum(['no_payment_required', 'paid', 'unpaid']) + .describe( + "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order." + ), + phone_number_collection: + PaymentPagesCheckoutSessionPhoneNumberCollectionSchema.optional(), + /** The ID of the original expired Checkout Session that triggered the recovery flow. */ + recovered_from: z + .string() + .max(5000) + .nullable() + .describe( + 'The ID of the original expired Checkout Session that triggered the recovery flow.' + ) + .optional(), + /** 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: z + .enum(['always', 'if_required', 'never']) + .describe( + '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`.' + ) + .optional(), + /** Applies to Checkout Sessions with `ui_mode: embedded`. 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: z + .string() + .max(5000) + .describe( + "Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site." + ) + .optional(), + /** Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. */ + saved_payment_method_options: + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsSchema.nullable() + .describe( + 'Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.' + ) + .optional(), + /** 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: z + .union([z.string().max(5000), SetupIntentSchema]) + .nullable() + .describe( + "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." + ) + .optional(), + /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ + shipping_address_collection: + PaymentPagesCheckoutSessionShippingAddressCollectionSchema.nullable() + .describe( + 'When set, provides configuration for Checkout to collect a shipping address from a customer.' + ) + .optional(), + /** The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost: PaymentPagesCheckoutSessionShippingCostSchema.nullable() + .describe( + 'The details of the customer cost of shipping, including the customer chosen ShippingRate.' + ) + .optional(), + /** Shipping information for this Checkout Session. */ + shipping_details: ShippingSchema.nullable() + .describe('Shipping information for this Checkout Session.') + .optional(), + /** The shipping rate options applied to this Session. */ + shipping_options: z + .array(PaymentPagesCheckoutSessionShippingOptionSchema) + .describe('The shipping rate options applied to this Session.'), + /** The status of the Checkout Session, one of `open`, `complete`, or `expired`. */ + status: z + .enum(['complete', 'expired', 'open']) + .nullable() + .describe( + 'The status of the Checkout Session, one of `open`, `complete`, or `expired`.' + ) + .optional(), + /** + * 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: z + .enum(['auto', 'book', 'donate', 'pay', 'subscribe']) + .nullable() + .describe( + 'Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.' + ) + .optional(), + /** The ID of the subscription for Checkout Sessions in `subscription` mode. */ + subscription: z + .union([z.string().max(5000), SubscriptionSchema]) + .nullable() + .describe( + 'The ID of the subscription for Checkout Sessions in `subscription` mode.' + ) + .optional(), + /** + * The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ + success_url: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL the customer will be directed to after the payment or\nsubscription creation is successful.' + ) + .optional(), + tax_id_collection: + PaymentPagesCheckoutSessionTaxIdCollectionSchema.optional(), + /** Tax and discount details for the computed total amount. */ + total_details: PaymentPagesCheckoutSessionTotalDetailsSchema.nullable() + .describe('Tax and discount details for the computed total amount.') + .optional(), + /** The UI mode of the Session. Defaults to `hosted`. */ + ui_mode: z + .enum(['embedded', 'hosted']) + .nullable() + .describe('The UI mode of the Session. Defaults to `hosted`.') + .optional(), + /** + * The URL to the Checkout Session. 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: z + .string() + .max(5000) + .nullable() + .describe( + 'The URL to the Checkout Session. 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.`\nThis value is only present when the session is active.' + ) + .optional() + }) + .describe( + "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)" + ) + export type CheckoutSession = z.infer + + // ----------------------------------------------------------------------------- + // Operation schemas + // ----------------------------------------------------------------------------- + + export const GetAccountParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountParams = z.infer + + export const GetAccountResponseSchema = AccountSchema + export type GetAccountResponse = z.infer + + export const PostAccountLinksParamsSchema = z.object({}) + export type PostAccountLinksParams = z.infer< + typeof PostAccountLinksParamsSchema + > + + export const PostAccountLinksResponseSchema = AccountLinkSchema + export type PostAccountLinksResponse = z.infer< + typeof PostAccountLinksResponseSchema + > + + export const PostAccountSessionsParamsSchema = z.object({}) + export type PostAccountSessionsParams = z.infer< + typeof PostAccountSessionsParamsSchema + > + + export const PostAccountSessionsResponseSchema = AccountSessionSchema + export type PostAccountSessionsResponse = z.infer< + typeof PostAccountSessionsResponseSchema + > + + export const GetAccountsParamsSchema = z.object({ + /** Only return connected accounts that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return connected accounts that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetAccountsParams = z.infer + + export const GetAccountsResponseSchema = z.object({ + data: z.array(AccountSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/accounts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetAccountsResponse = z.infer + + export const PostAccountsParamsSchema = z.object({}) + export type PostAccountsParams = z.infer + + export const PostAccountsResponseSchema = AccountSchema + export type PostAccountsResponse = z.infer + + export const GetAccountsAccountParamsSchema = z.object({ + account: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountParams = z.infer< + typeof GetAccountsAccountParamsSchema + > + + export const GetAccountsAccountResponseSchema = AccountSchema + export type GetAccountsAccountResponse = z.infer< + typeof GetAccountsAccountResponseSchema + > + + export const PostAccountsAccountParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountParams = z.infer< + typeof PostAccountsAccountParamsSchema + > + + export const PostAccountsAccountResponseSchema = AccountSchema + export type PostAccountsAccountResponse = z.infer< + typeof PostAccountsAccountResponseSchema + > + + export const DeleteAccountsAccountParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type DeleteAccountsAccountParams = z.infer< + typeof DeleteAccountsAccountParamsSchema + > + + export const DeleteAccountsAccountResponseSchema = DeletedAccountSchema + export type DeleteAccountsAccountResponse = z.infer< + typeof DeleteAccountsAccountResponseSchema + > + + export const PostAccountsAccountBankAccountsParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountBankAccountsParams = z.infer< + typeof PostAccountsAccountBankAccountsParamsSchema + > + + export const PostAccountsAccountBankAccountsResponseSchema = + ExternalAccountSchema + export type PostAccountsAccountBankAccountsResponse = z.infer< + typeof PostAccountsAccountBankAccountsResponseSchema + > + + export const GetAccountsAccountBankAccountsIdParamsSchema = z.object({ + account: z.string().max(5000), + id: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountBankAccountsIdParams = z.infer< + typeof GetAccountsAccountBankAccountsIdParamsSchema + > + + export const GetAccountsAccountBankAccountsIdResponseSchema = + ExternalAccountSchema + export type GetAccountsAccountBankAccountsIdResponse = z.infer< + typeof GetAccountsAccountBankAccountsIdResponseSchema + > + + export const PostAccountsAccountBankAccountsIdParamsSchema = z.object({ + account: z.string().max(5000), + id: z.string() + }) + export type PostAccountsAccountBankAccountsIdParams = z.infer< + typeof PostAccountsAccountBankAccountsIdParamsSchema + > + + export const PostAccountsAccountBankAccountsIdResponseSchema = + ExternalAccountSchema + export type PostAccountsAccountBankAccountsIdResponse = z.infer< + typeof PostAccountsAccountBankAccountsIdResponseSchema + > + + export const DeleteAccountsAccountBankAccountsIdParamsSchema = z.object({ + account: z.string().max(5000), + id: z.string() + }) + export type DeleteAccountsAccountBankAccountsIdParams = z.infer< + typeof DeleteAccountsAccountBankAccountsIdParamsSchema + > + + export const DeleteAccountsAccountBankAccountsIdResponseSchema = + DeletedExternalAccountSchema + export type DeleteAccountsAccountBankAccountsIdResponse = z.infer< + typeof DeleteAccountsAccountBankAccountsIdResponseSchema + > + + export const GetAccountsAccountCapabilitiesParamsSchema = z.object({ + account: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountCapabilitiesParams = z.infer< + typeof GetAccountsAccountCapabilitiesParamsSchema + > + + export const GetAccountsAccountCapabilitiesResponseSchema = z.object({ + data: z.array(CapabilitySchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetAccountsAccountCapabilitiesResponse = z.infer< + typeof GetAccountsAccountCapabilitiesResponseSchema + > + + export const GetAccountsAccountCapabilitiesCapabilityParamsSchema = z.object({ + account: z.string().max(5000), + capability: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountCapabilitiesCapabilityParams = z.infer< + typeof GetAccountsAccountCapabilitiesCapabilityParamsSchema + > + + export const GetAccountsAccountCapabilitiesCapabilityResponseSchema = + CapabilitySchema + export type GetAccountsAccountCapabilitiesCapabilityResponse = z.infer< + typeof GetAccountsAccountCapabilitiesCapabilityResponseSchema + > + + export const PostAccountsAccountCapabilitiesCapabilityParamsSchema = z.object( + { account: z.string().max(5000), capability: z.string() } + ) + export type PostAccountsAccountCapabilitiesCapabilityParams = z.infer< + typeof PostAccountsAccountCapabilitiesCapabilityParamsSchema + > + + export const PostAccountsAccountCapabilitiesCapabilityResponseSchema = + CapabilitySchema + export type PostAccountsAccountCapabilitiesCapabilityResponse = z.infer< + typeof PostAccountsAccountCapabilitiesCapabilityResponseSchema + > + + export const GetAccountsAccountExternalAccountsParamsSchema = z.object({ + account: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filter external accounts according to a particular object type. */ + object: z + .enum(['bank_account', 'card']) + .describe( + 'Filter external accounts according to a particular object type.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetAccountsAccountExternalAccountsParams = z.infer< + typeof GetAccountsAccountExternalAccountsParamsSchema + > + + export const GetAccountsAccountExternalAccountsResponseSchema = z.object({ + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: z + .array(z.union([BankAccountSchema, CardSchema])) + .describe( + 'The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.' + ), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetAccountsAccountExternalAccountsResponse = z.infer< + typeof GetAccountsAccountExternalAccountsResponseSchema + > + + export const PostAccountsAccountExternalAccountsParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountExternalAccountsParams = z.infer< + typeof PostAccountsAccountExternalAccountsParamsSchema + > + + export const PostAccountsAccountExternalAccountsResponseSchema = + ExternalAccountSchema + export type PostAccountsAccountExternalAccountsResponse = z.infer< + typeof PostAccountsAccountExternalAccountsResponseSchema + > + + export const GetAccountsAccountExternalAccountsIdParamsSchema = z.object({ + account: z.string().max(5000), + id: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountExternalAccountsIdParams = z.infer< + typeof GetAccountsAccountExternalAccountsIdParamsSchema + > + + export const GetAccountsAccountExternalAccountsIdResponseSchema = + ExternalAccountSchema + export type GetAccountsAccountExternalAccountsIdResponse = z.infer< + typeof GetAccountsAccountExternalAccountsIdResponseSchema + > + + export const PostAccountsAccountExternalAccountsIdParamsSchema = z.object({ + account: z.string().max(5000), + id: z.string() + }) + export type PostAccountsAccountExternalAccountsIdParams = z.infer< + typeof PostAccountsAccountExternalAccountsIdParamsSchema + > + + export const PostAccountsAccountExternalAccountsIdResponseSchema = + ExternalAccountSchema + export type PostAccountsAccountExternalAccountsIdResponse = z.infer< + typeof PostAccountsAccountExternalAccountsIdResponseSchema + > + + export const DeleteAccountsAccountExternalAccountsIdParamsSchema = z.object({ + account: z.string().max(5000), + id: z.string() + }) + export type DeleteAccountsAccountExternalAccountsIdParams = z.infer< + typeof DeleteAccountsAccountExternalAccountsIdParamsSchema + > + + export const DeleteAccountsAccountExternalAccountsIdResponseSchema = + DeletedExternalAccountSchema + export type DeleteAccountsAccountExternalAccountsIdResponse = z.infer< + typeof DeleteAccountsAccountExternalAccountsIdResponseSchema + > + + export const PostAccountsAccountLoginLinksParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountLoginLinksParams = z.infer< + typeof PostAccountsAccountLoginLinksParamsSchema + > + + export const PostAccountsAccountLoginLinksResponseSchema = LoginLinkSchema + export type PostAccountsAccountLoginLinksResponse = z.infer< + typeof PostAccountsAccountLoginLinksResponseSchema + > + + export const GetAccountsAccountPeopleParamsSchema = z.object({ + account: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship: z + .object({ + authorizer: z.boolean().optional(), + director: z.boolean().optional(), + executive: z.boolean().optional(), + legal_guardian: z.boolean().optional(), + owner: z.boolean().optional(), + representative: z.boolean().optional() + }) + .describe( + "Filters on the list of people returned based on the person's relationship to the account's company." + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetAccountsAccountPeopleParams = z.infer< + typeof GetAccountsAccountPeopleParamsSchema + > + + export const GetAccountsAccountPeopleResponseSchema = z.object({ + data: z.array(PersonSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetAccountsAccountPeopleResponse = z.infer< + typeof GetAccountsAccountPeopleResponseSchema + > + + export const PostAccountsAccountPeopleParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountPeopleParams = z.infer< + typeof PostAccountsAccountPeopleParamsSchema + > + + export const PostAccountsAccountPeopleResponseSchema = PersonSchema + export type PostAccountsAccountPeopleResponse = z.infer< + typeof PostAccountsAccountPeopleResponseSchema + > + + export const GetAccountsAccountPeoplePersonParamsSchema = z.object({ + account: z.string().max(5000), + person: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountPeoplePersonParams = z.infer< + typeof GetAccountsAccountPeoplePersonParamsSchema + > + + export const GetAccountsAccountPeoplePersonResponseSchema = PersonSchema + export type GetAccountsAccountPeoplePersonResponse = z.infer< + typeof GetAccountsAccountPeoplePersonResponseSchema + > + + export const PostAccountsAccountPeoplePersonParamsSchema = z.object({ + account: z.string().max(5000), + person: z.string().max(5000) + }) + export type PostAccountsAccountPeoplePersonParams = z.infer< + typeof PostAccountsAccountPeoplePersonParamsSchema + > + + export const PostAccountsAccountPeoplePersonResponseSchema = PersonSchema + export type PostAccountsAccountPeoplePersonResponse = z.infer< + typeof PostAccountsAccountPeoplePersonResponseSchema + > + + export const DeleteAccountsAccountPeoplePersonParamsSchema = z.object({ + account: z.string().max(5000), + person: z.string().max(5000) + }) + export type DeleteAccountsAccountPeoplePersonParams = z.infer< + typeof DeleteAccountsAccountPeoplePersonParamsSchema + > + + export const DeleteAccountsAccountPeoplePersonResponseSchema = + DeletedPersonSchema + export type DeleteAccountsAccountPeoplePersonResponse = z.infer< + typeof DeleteAccountsAccountPeoplePersonResponseSchema + > + + export const GetAccountsAccountPersonsParamsSchema = z.object({ + account: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship: z + .object({ + authorizer: z.boolean().optional(), + director: z.boolean().optional(), + executive: z.boolean().optional(), + legal_guardian: z.boolean().optional(), + owner: z.boolean().optional(), + representative: z.boolean().optional() + }) + .describe( + "Filters on the list of people returned based on the person's relationship to the account's company." + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetAccountsAccountPersonsParams = z.infer< + typeof GetAccountsAccountPersonsParamsSchema + > + + export const GetAccountsAccountPersonsResponseSchema = z.object({ + data: z.array(PersonSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetAccountsAccountPersonsResponse = z.infer< + typeof GetAccountsAccountPersonsResponseSchema + > + + export const PostAccountsAccountPersonsParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountPersonsParams = z.infer< + typeof PostAccountsAccountPersonsParamsSchema + > + + export const PostAccountsAccountPersonsResponseSchema = PersonSchema + export type PostAccountsAccountPersonsResponse = z.infer< + typeof PostAccountsAccountPersonsResponseSchema + > + + export const GetAccountsAccountPersonsPersonParamsSchema = z.object({ + account: z.string().max(5000), + person: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetAccountsAccountPersonsPersonParams = z.infer< + typeof GetAccountsAccountPersonsPersonParamsSchema + > + + export const GetAccountsAccountPersonsPersonResponseSchema = PersonSchema + export type GetAccountsAccountPersonsPersonResponse = z.infer< + typeof GetAccountsAccountPersonsPersonResponseSchema + > + + export const PostAccountsAccountPersonsPersonParamsSchema = z.object({ + account: z.string().max(5000), + person: z.string().max(5000) + }) + export type PostAccountsAccountPersonsPersonParams = z.infer< + typeof PostAccountsAccountPersonsPersonParamsSchema + > + + export const PostAccountsAccountPersonsPersonResponseSchema = PersonSchema + export type PostAccountsAccountPersonsPersonResponse = z.infer< + typeof PostAccountsAccountPersonsPersonResponseSchema + > + + export const DeleteAccountsAccountPersonsPersonParamsSchema = z.object({ + account: z.string().max(5000), + person: z.string().max(5000) + }) + export type DeleteAccountsAccountPersonsPersonParams = z.infer< + typeof DeleteAccountsAccountPersonsPersonParamsSchema + > + + export const DeleteAccountsAccountPersonsPersonResponseSchema = + DeletedPersonSchema + export type DeleteAccountsAccountPersonsPersonResponse = z.infer< + typeof DeleteAccountsAccountPersonsPersonResponseSchema + > + + export const PostAccountsAccountRejectParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostAccountsAccountRejectParams = z.infer< + typeof PostAccountsAccountRejectParamsSchema + > + + export const PostAccountsAccountRejectResponseSchema = AccountSchema + export type PostAccountsAccountRejectResponse = z.infer< + typeof PostAccountsAccountRejectResponseSchema + > + + export const GetApplePayDomainsParamsSchema = z.object({ + domain_name: z.string().max(5000).optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetApplePayDomainsParams = z.infer< + typeof GetApplePayDomainsParamsSchema + > + + export const GetApplePayDomainsResponseSchema = z.object({ + data: z.array(ApplePayDomainSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/apple_pay/domains')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetApplePayDomainsResponse = z.infer< + typeof GetApplePayDomainsResponseSchema + > + + export const PostApplePayDomainsParamsSchema = z.object({}) + export type PostApplePayDomainsParams = z.infer< + typeof PostApplePayDomainsParamsSchema + > + + export const PostApplePayDomainsResponseSchema = ApplePayDomainSchema + export type PostApplePayDomainsResponse = z.infer< + typeof PostApplePayDomainsResponseSchema + > + + export const GetApplePayDomainsDomainParamsSchema = z.object({ + domain: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetApplePayDomainsDomainParams = z.infer< + typeof GetApplePayDomainsDomainParamsSchema + > + + export const GetApplePayDomainsDomainResponseSchema = ApplePayDomainSchema + export type GetApplePayDomainsDomainResponse = z.infer< + typeof GetApplePayDomainsDomainResponseSchema + > + + export const DeleteApplePayDomainsDomainParamsSchema = z.object({ + domain: z.string().max(5000) + }) + export type DeleteApplePayDomainsDomainParams = z.infer< + typeof DeleteApplePayDomainsDomainParamsSchema + > + + export const DeleteApplePayDomainsDomainResponseSchema = + DeletedApplePayDomainSchema + export type DeleteApplePayDomainsDomainResponse = z.infer< + typeof DeleteApplePayDomainsDomainResponseSchema + > + + export const GetApplicationFeesParamsSchema = z.object({ + /** Only return application fees for the charge specified by this charge ID. */ + charge: z + .string() + .max(5000) + .describe( + 'Only return application fees for the charge specified by this charge ID.' + ) + .optional(), + /** Only return applications fees that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return applications fees that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetApplicationFeesParams = z.infer< + typeof GetApplicationFeesParamsSchema + > + + export const GetApplicationFeesResponseSchema = z.object({ + data: z.array(ApplicationFeeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/application_fees')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetApplicationFeesResponse = z.infer< + typeof GetApplicationFeesResponseSchema + > + + export const GetApplicationFeesFeeRefundsIdParamsSchema = z.object({ + fee: z.string().max(5000), + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetApplicationFeesFeeRefundsIdParams = z.infer< + typeof GetApplicationFeesFeeRefundsIdParamsSchema + > + + export const GetApplicationFeesFeeRefundsIdResponseSchema = FeeRefundSchema + export type GetApplicationFeesFeeRefundsIdResponse = z.infer< + typeof GetApplicationFeesFeeRefundsIdResponseSchema + > + + export const PostApplicationFeesFeeRefundsIdParamsSchema = z.object({ + fee: z.string().max(5000), + id: z.string().max(5000) + }) + export type PostApplicationFeesFeeRefundsIdParams = z.infer< + typeof PostApplicationFeesFeeRefundsIdParamsSchema + > + + export const PostApplicationFeesFeeRefundsIdResponseSchema = FeeRefundSchema + export type PostApplicationFeesFeeRefundsIdResponse = z.infer< + typeof PostApplicationFeesFeeRefundsIdResponseSchema + > + + export const GetApplicationFeesIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetApplicationFeesIdParams = z.infer< + typeof GetApplicationFeesIdParamsSchema + > + + export const GetApplicationFeesIdResponseSchema = ApplicationFeeSchema + export type GetApplicationFeesIdResponse = z.infer< + typeof GetApplicationFeesIdResponseSchema + > + + export const PostApplicationFeesIdRefundParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostApplicationFeesIdRefundParams = z.infer< + typeof PostApplicationFeesIdRefundParamsSchema + > + + export const PostApplicationFeesIdRefundResponseSchema = ApplicationFeeSchema + export type PostApplicationFeesIdRefundResponse = z.infer< + typeof PostApplicationFeesIdRefundResponseSchema + > + + export const GetApplicationFeesIdRefundsParamsSchema = z.object({ + id: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetApplicationFeesIdRefundsParams = z.infer< + typeof GetApplicationFeesIdRefundsParamsSchema + > + + export const GetApplicationFeesIdRefundsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(FeeRefundSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetApplicationFeesIdRefundsResponse = z.infer< + typeof GetApplicationFeesIdRefundsResponseSchema + > + + export const PostApplicationFeesIdRefundsParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostApplicationFeesIdRefundsParams = z.infer< + typeof PostApplicationFeesIdRefundsParamsSchema + > + + export const PostApplicationFeesIdRefundsResponseSchema = FeeRefundSchema + export type PostApplicationFeesIdRefundsResponse = z.infer< + typeof PostApplicationFeesIdRefundsResponseSchema + > + + export const GetAppsSecretsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: z + .object({ + type: z.enum(['account', 'user']), + user: z.string().max(5000).optional() + }) + .describe( + 'Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.' + ), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetAppsSecretsParams = z.infer + + export const GetAppsSecretsResponseSchema = z.object({ + data: z.array(AppsSecretSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/apps/secrets')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetAppsSecretsResponse = z.infer< + typeof GetAppsSecretsResponseSchema + > + + export const PostAppsSecretsParamsSchema = z.object({}) + export type PostAppsSecretsParams = z.infer< + typeof PostAppsSecretsParamsSchema + > + + export const PostAppsSecretsResponseSchema = AppsSecretSchema + export type PostAppsSecretsResponse = z.infer< + typeof PostAppsSecretsResponseSchema + > + + export const PostAppsSecretsDeleteParamsSchema = z.object({}) + export type PostAppsSecretsDeleteParams = z.infer< + typeof PostAppsSecretsDeleteParamsSchema + > + + export const PostAppsSecretsDeleteResponseSchema = AppsSecretSchema + export type PostAppsSecretsDeleteResponse = z.infer< + typeof PostAppsSecretsDeleteResponseSchema + > + + export const GetAppsSecretsFindParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A name for the secret that's unique within the scope. */ + name: z + .string() + .max(5000) + .describe("A name for the secret that's unique within the scope."), + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: z + .object({ + type: z.enum(['account', 'user']), + user: z.string().max(5000).optional() + }) + .describe( + 'Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.' + ) + }) + export type GetAppsSecretsFindParams = z.infer< + typeof GetAppsSecretsFindParamsSchema + > + + export const GetAppsSecretsFindResponseSchema = AppsSecretSchema + export type GetAppsSecretsFindResponse = z.infer< + typeof GetAppsSecretsFindResponseSchema + > + + export const GetBalanceParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBalanceParams = z.infer + + export const GetBalanceResponseSchema = BalanceSchema + export type GetBalanceResponse = z.infer + + export const GetBalanceHistoryParamsSchema = z.object({ + /** Only return transactions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return transactions that were created during the given date interval.' + ) + .optional(), + /** Only return transactions in a certain currency. 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: z + .string() + .describe( + 'Only return transactions in a certain currency. 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).' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout: z + .string() + .max(5000) + .describe( + 'For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.' + ) + .optional(), + /** Only returns the original transaction. */ + source: z + .string() + .max(5000) + .describe('Only returns the original transaction.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only returns transactions of the given type. One of: `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`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ + type: z + .string() + .max(5000) + .describe( + 'Only returns transactions of the given type. One of: `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`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.' + ) + .optional() + }) + export type GetBalanceHistoryParams = z.infer< + typeof GetBalanceHistoryParamsSchema + > + + export const GetBalanceHistoryResponseSchema = z.object({ + data: z.array(BalanceTransactionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/balance_transactions')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBalanceHistoryResponse = z.infer< + typeof GetBalanceHistoryResponseSchema + > + + export const GetBalanceHistoryIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBalanceHistoryIdParams = z.infer< + typeof GetBalanceHistoryIdParamsSchema + > + + export const GetBalanceHistoryIdResponseSchema = BalanceTransactionSchema + export type GetBalanceHistoryIdResponse = z.infer< + typeof GetBalanceHistoryIdResponseSchema + > + + export const GetBalanceTransactionsParamsSchema = z.object({ + /** Only return transactions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return transactions that were created during the given date interval.' + ) + .optional(), + /** Only return transactions in a certain currency. 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: z + .string() + .describe( + 'Only return transactions in a certain currency. 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).' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout: z + .string() + .max(5000) + .describe( + 'For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.' + ) + .optional(), + /** Only returns the original transaction. */ + source: z + .string() + .max(5000) + .describe('Only returns the original transaction.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only returns transactions of the given type. One of: `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`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ + type: z + .string() + .max(5000) + .describe( + 'Only returns transactions of the given type. One of: `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`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.' + ) + .optional() + }) + export type GetBalanceTransactionsParams = z.infer< + typeof GetBalanceTransactionsParamsSchema + > + + export const GetBalanceTransactionsResponseSchema = z.object({ + data: z.array(BalanceTransactionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/balance_transactions')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBalanceTransactionsResponse = z.infer< + typeof GetBalanceTransactionsResponseSchema + > + + export const GetBalanceTransactionsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBalanceTransactionsIdParams = z.infer< + typeof GetBalanceTransactionsIdParamsSchema + > + + export const GetBalanceTransactionsIdResponseSchema = BalanceTransactionSchema + export type GetBalanceTransactionsIdResponse = z.infer< + typeof GetBalanceTransactionsIdResponseSchema + > + + export const GetBillingAlertsParamsSchema = z.object({ + /** Filter results to only include this type of alert. */ + alert_type: z + .literal('usage_threshold') + .describe('Filter results to only include this type of alert.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filter results to only include alerts with the given meter. */ + meter: z + .string() + .max(5000) + .describe('Filter results to only include alerts with the given meter.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetBillingAlertsParams = z.infer< + typeof GetBillingAlertsParamsSchema + > + + export const GetBillingAlertsResponseSchema = z.object({ + data: z.array(BillingAlertSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/billing/alerts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBillingAlertsResponse = z.infer< + typeof GetBillingAlertsResponseSchema + > + + export const PostBillingAlertsParamsSchema = z.object({}) + export type PostBillingAlertsParams = z.infer< + typeof PostBillingAlertsParamsSchema + > + + export const PostBillingAlertsResponseSchema = BillingAlertSchema + export type PostBillingAlertsResponse = z.infer< + typeof PostBillingAlertsResponseSchema + > + + export const GetBillingAlertsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBillingAlertsIdParams = z.infer< + typeof GetBillingAlertsIdParamsSchema + > + + export const GetBillingAlertsIdResponseSchema = BillingAlertSchema + export type GetBillingAlertsIdResponse = z.infer< + typeof GetBillingAlertsIdResponseSchema + > + + export const PostBillingAlertsIdActivateParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostBillingAlertsIdActivateParams = z.infer< + typeof PostBillingAlertsIdActivateParamsSchema + > + + export const PostBillingAlertsIdActivateResponseSchema = BillingAlertSchema + export type PostBillingAlertsIdActivateResponse = z.infer< + typeof PostBillingAlertsIdActivateResponseSchema + > + + export const PostBillingAlertsIdArchiveParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostBillingAlertsIdArchiveParams = z.infer< + typeof PostBillingAlertsIdArchiveParamsSchema + > + + export const PostBillingAlertsIdArchiveResponseSchema = BillingAlertSchema + export type PostBillingAlertsIdArchiveResponse = z.infer< + typeof PostBillingAlertsIdArchiveResponseSchema + > + + export const PostBillingAlertsIdDeactivateParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostBillingAlertsIdDeactivateParams = z.infer< + typeof PostBillingAlertsIdDeactivateParamsSchema + > + + export const PostBillingAlertsIdDeactivateResponseSchema = BillingAlertSchema + export type PostBillingAlertsIdDeactivateResponse = z.infer< + typeof PostBillingAlertsIdDeactivateResponseSchema + > + + export const GetBillingCreditBalanceSummaryParamsSchema = z.object({ + /** The customer for which to fetch credit balance summary. */ + customer: z + .string() + .max(5000) + .describe('The customer for which to fetch credit balance summary.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** The filter criteria for the credit balance summary. */ + filter: z + .object({ + applicability_scope: z + .object({ + price_type: z.literal('metered').optional(), + prices: z.array(z.object({ id: z.string().max(5000) })).optional() + }) + .optional(), + credit_grant: z.string().max(5000).optional(), + type: z.enum(['applicability_scope', 'credit_grant']) + }) + .describe('The filter criteria for the credit balance summary.') + }) + export type GetBillingCreditBalanceSummaryParams = z.infer< + typeof GetBillingCreditBalanceSummaryParamsSchema + > + + export const GetBillingCreditBalanceSummaryResponseSchema = + BillingCreditBalanceSummarySchema + export type GetBillingCreditBalanceSummaryResponse = z.infer< + typeof GetBillingCreditBalanceSummaryResponseSchema + > + + export const GetBillingCreditBalanceTransactionsParamsSchema = z.object({ + /** The credit grant for which to fetch credit balance transactions. */ + credit_grant: z + .string() + .max(5000) + .describe( + 'The credit grant for which to fetch credit balance transactions.' + ) + .optional(), + /** The customer for which to fetch credit balance transactions. */ + customer: z + .string() + .max(5000) + .describe('The customer for which to fetch credit balance transactions.'), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetBillingCreditBalanceTransactionsParams = z.infer< + typeof GetBillingCreditBalanceTransactionsParamsSchema + > + + export const GetBillingCreditBalanceTransactionsResponseSchema = z.object({ + data: z.array(BillingCreditBalanceTransactionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/billing/credit_grants')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBillingCreditBalanceTransactionsResponse = z.infer< + typeof GetBillingCreditBalanceTransactionsResponseSchema + > + + export const GetBillingCreditBalanceTransactionsIdParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBillingCreditBalanceTransactionsIdParams = z.infer< + typeof GetBillingCreditBalanceTransactionsIdParamsSchema + > + + export const GetBillingCreditBalanceTransactionsIdResponseSchema = + BillingCreditBalanceTransactionSchema + export type GetBillingCreditBalanceTransactionsIdResponse = z.infer< + typeof GetBillingCreditBalanceTransactionsIdResponseSchema + > + + export const GetBillingCreditGrantsParamsSchema = z.object({ + /** Only return credit grants for this customer. */ + customer: z + .string() + .max(5000) + .describe('Only return credit grants for this customer.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetBillingCreditGrantsParams = z.infer< + typeof GetBillingCreditGrantsParamsSchema + > + + export const GetBillingCreditGrantsResponseSchema = z.object({ + data: z.array(BillingCreditGrantSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/billing/credit_grants')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBillingCreditGrantsResponse = z.infer< + typeof GetBillingCreditGrantsResponseSchema + > + + export const PostBillingCreditGrantsParamsSchema = z.object({}) + export type PostBillingCreditGrantsParams = z.infer< + typeof PostBillingCreditGrantsParamsSchema + > + + export const PostBillingCreditGrantsResponseSchema = BillingCreditGrantSchema + export type PostBillingCreditGrantsResponse = z.infer< + typeof PostBillingCreditGrantsResponseSchema + > + + export const GetBillingCreditGrantsIdParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBillingCreditGrantsIdParams = z.infer< + typeof GetBillingCreditGrantsIdParamsSchema + > + + export const GetBillingCreditGrantsIdResponseSchema = BillingCreditGrantSchema + export type GetBillingCreditGrantsIdResponse = z.infer< + typeof GetBillingCreditGrantsIdResponseSchema + > + + export const PostBillingCreditGrantsIdParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.') + }) + export type PostBillingCreditGrantsIdParams = z.infer< + typeof PostBillingCreditGrantsIdParamsSchema + > + + export const PostBillingCreditGrantsIdResponseSchema = + BillingCreditGrantSchema + export type PostBillingCreditGrantsIdResponse = z.infer< + typeof PostBillingCreditGrantsIdResponseSchema + > + + export const PostBillingCreditGrantsIdExpireParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.') + }) + export type PostBillingCreditGrantsIdExpireParams = z.infer< + typeof PostBillingCreditGrantsIdExpireParamsSchema + > + + export const PostBillingCreditGrantsIdExpireResponseSchema = + BillingCreditGrantSchema + export type PostBillingCreditGrantsIdExpireResponse = z.infer< + typeof PostBillingCreditGrantsIdExpireResponseSchema + > + + export const PostBillingCreditGrantsIdVoidParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.') + }) + export type PostBillingCreditGrantsIdVoidParams = z.infer< + typeof PostBillingCreditGrantsIdVoidParamsSchema + > + + export const PostBillingCreditGrantsIdVoidResponseSchema = + BillingCreditGrantSchema + export type PostBillingCreditGrantsIdVoidResponse = z.infer< + typeof PostBillingCreditGrantsIdVoidResponseSchema + > + + export const PostBillingMeterEventAdjustmentsParamsSchema = z.object({}) + export type PostBillingMeterEventAdjustmentsParams = z.infer< + typeof PostBillingMeterEventAdjustmentsParamsSchema + > + + export const PostBillingMeterEventAdjustmentsResponseSchema = + BillingMeterEventAdjustmentSchema + export type PostBillingMeterEventAdjustmentsResponse = z.infer< + typeof PostBillingMeterEventAdjustmentsResponseSchema + > + + export const PostBillingMeterEventsParamsSchema = z.object({}) + export type PostBillingMeterEventsParams = z.infer< + typeof PostBillingMeterEventsParamsSchema + > + + export const PostBillingMeterEventsResponseSchema = BillingMeterEventSchema + export type PostBillingMeterEventsResponse = z.infer< + typeof PostBillingMeterEventsResponseSchema + > + + export const GetBillingMetersParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Filter results to only include meters with the given status. */ + status: z + .enum(['active', 'inactive']) + .describe('Filter results to only include meters with the given status.') + .optional() + }) + export type GetBillingMetersParams = z.infer< + typeof GetBillingMetersParamsSchema + > + + export const GetBillingMetersResponseSchema = z.object({ + data: z.array(BillingMeterSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/billing/meters')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBillingMetersResponse = z.infer< + typeof GetBillingMetersResponseSchema + > + + export const PostBillingMetersParamsSchema = z.object({}) + export type PostBillingMetersParams = z.infer< + typeof PostBillingMetersParamsSchema + > + + export const PostBillingMetersResponseSchema = BillingMeterSchema + export type PostBillingMetersResponse = z.infer< + typeof PostBillingMetersResponseSchema + > + + export const GetBillingMetersIdParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBillingMetersIdParams = z.infer< + typeof GetBillingMetersIdParamsSchema + > + + export const GetBillingMetersIdResponseSchema = BillingMeterSchema + export type GetBillingMetersIdResponse = z.infer< + typeof GetBillingMetersIdResponseSchema + > + + export const PostBillingMetersIdParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.') + }) + export type PostBillingMetersIdParams = z.infer< + typeof PostBillingMetersIdParamsSchema + > + + export const PostBillingMetersIdResponseSchema = BillingMeterSchema + export type PostBillingMetersIdResponse = z.infer< + typeof PostBillingMetersIdResponseSchema + > + + export const PostBillingMetersIdDeactivateParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.') + }) + export type PostBillingMetersIdDeactivateParams = z.infer< + typeof PostBillingMetersIdDeactivateParamsSchema + > + + export const PostBillingMetersIdDeactivateResponseSchema = BillingMeterSchema + export type PostBillingMetersIdDeactivateResponse = z.infer< + typeof PostBillingMetersIdDeactivateResponseSchema + > + + export const GetBillingMetersIdEventSummariesParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.'), + /** The customer for which to fetch event summaries. */ + customer: z + .string() + .max(5000) + .describe('The customer for which to fetch event summaries.'), + /** The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. */ + end_time: z + .number() + .int() + .describe( + 'The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.' + ), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. */ + start_time: z + .number() + .int() + .describe( + 'The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.' + ), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). */ + value_grouping_window: z + .enum(['day', 'hour']) + .describe( + 'Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).' + ) + .optional() + }) + export type GetBillingMetersIdEventSummariesParams = z.infer< + typeof GetBillingMetersIdEventSummariesParamsSchema + > + + export const GetBillingMetersIdEventSummariesResponseSchema = z.object({ + data: z.array(BillingMeterEventSummarySchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/billing/meters/[^/]+/event_summaries')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBillingMetersIdEventSummariesResponse = z.infer< + typeof GetBillingMetersIdEventSummariesResponseSchema + > + + export const PostBillingMetersIdReactivateParamsSchema = z.object({ + /** Unique identifier for the object. */ + id: z.string().max(5000).describe('Unique identifier for the object.') + }) + export type PostBillingMetersIdReactivateParams = z.infer< + typeof PostBillingMetersIdReactivateParamsSchema + > + + export const PostBillingMetersIdReactivateResponseSchema = BillingMeterSchema + export type PostBillingMetersIdReactivateResponse = z.infer< + typeof PostBillingMetersIdReactivateResponseSchema + > + + export const GetBillingPortalConfigurationsParamsSchema = z.object({ + /** Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). */ + active: z + .boolean() + .describe( + 'Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). */ + is_default: z + .boolean() + .describe( + 'Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetBillingPortalConfigurationsParams = z.infer< + typeof GetBillingPortalConfigurationsParamsSchema + > + + export const GetBillingPortalConfigurationsResponseSchema = z.object({ + data: z.array(BillingPortalConfigurationSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/billing_portal/configurations')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetBillingPortalConfigurationsResponse = z.infer< + typeof GetBillingPortalConfigurationsResponseSchema + > + + export const PostBillingPortalConfigurationsParamsSchema = z.object({}) + export type PostBillingPortalConfigurationsParams = z.infer< + typeof PostBillingPortalConfigurationsParamsSchema + > + + export const PostBillingPortalConfigurationsResponseSchema = + BillingPortalConfigurationSchema + export type PostBillingPortalConfigurationsResponse = z.infer< + typeof PostBillingPortalConfigurationsResponseSchema + > + + export const GetBillingPortalConfigurationsConfigurationParamsSchema = + z.object({ + configuration: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetBillingPortalConfigurationsConfigurationParams = z.infer< + typeof GetBillingPortalConfigurationsConfigurationParamsSchema + > + + export const GetBillingPortalConfigurationsConfigurationResponseSchema = + BillingPortalConfigurationSchema + export type GetBillingPortalConfigurationsConfigurationResponse = z.infer< + typeof GetBillingPortalConfigurationsConfigurationResponseSchema + > + + export const PostBillingPortalConfigurationsConfigurationParamsSchema = + z.object({ configuration: z.string().max(5000) }) + export type PostBillingPortalConfigurationsConfigurationParams = z.infer< + typeof PostBillingPortalConfigurationsConfigurationParamsSchema + > + + export const PostBillingPortalConfigurationsConfigurationResponseSchema = + BillingPortalConfigurationSchema + export type PostBillingPortalConfigurationsConfigurationResponse = z.infer< + typeof PostBillingPortalConfigurationsConfigurationResponseSchema + > + + export const PostBillingPortalSessionsParamsSchema = z.object({}) + export type PostBillingPortalSessionsParams = z.infer< + typeof PostBillingPortalSessionsParamsSchema + > + + export const PostBillingPortalSessionsResponseSchema = + BillingPortalSessionSchema + export type PostBillingPortalSessionsResponse = z.infer< + typeof PostBillingPortalSessionsResponseSchema + > + + export const GetChargesParamsSchema = z.object({ + /** Only return charges that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return charges that were created during the given date interval.' + ) + .optional(), + /** Only return charges for the customer specified by this customer ID. */ + customer: z + .string() + .max(5000) + .describe( + 'Only return charges for the customer specified by this customer ID.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent: z + .string() + .max(5000) + .describe( + 'Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return charges for this transfer group, limited to 100. */ + transfer_group: z + .string() + .max(5000) + .describe('Only return charges for this transfer group, limited to 100.') + .optional() + }) + export type GetChargesParams = z.infer + + export const GetChargesResponseSchema = z.object({ + data: z.array(ChargeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/charges')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetChargesResponse = z.infer + + export const PostChargesParamsSchema = z.object({}) + export type PostChargesParams = z.infer + + export const PostChargesResponseSchema = ChargeSchema + export type PostChargesResponse = z.infer + + export const GetChargesSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).' + ) + }) + export type GetChargesSearchParams = z.infer< + typeof GetChargesSearchParamsSchema + > + + export const GetChargesSearchResponseSchema = z.object({ + data: z.array(ChargeSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetChargesSearchResponse = z.infer< + typeof GetChargesSearchResponseSchema + > + + export const GetChargesChargeParamsSchema = z.object({ + charge: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetChargesChargeParams = z.infer< + typeof GetChargesChargeParamsSchema + > + + export const GetChargesChargeResponseSchema = ChargeSchema + export type GetChargesChargeResponse = z.infer< + typeof GetChargesChargeResponseSchema + > + + export const PostChargesChargeParamsSchema = z.object({ + charge: z.string().max(5000) + }) + export type PostChargesChargeParams = z.infer< + typeof PostChargesChargeParamsSchema + > + + export const PostChargesChargeResponseSchema = ChargeSchema + export type PostChargesChargeResponse = z.infer< + typeof PostChargesChargeResponseSchema + > + + export const PostChargesChargeCaptureParamsSchema = z.object({ + charge: z.string().max(5000) + }) + export type PostChargesChargeCaptureParams = z.infer< + typeof PostChargesChargeCaptureParamsSchema + > + + export const PostChargesChargeCaptureResponseSchema = ChargeSchema + export type PostChargesChargeCaptureResponse = z.infer< + typeof PostChargesChargeCaptureResponseSchema + > + + export const GetChargesChargeDisputeParamsSchema = z.object({ + charge: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetChargesChargeDisputeParams = z.infer< + typeof GetChargesChargeDisputeParamsSchema + > + + export const GetChargesChargeDisputeResponseSchema = DisputeSchema + export type GetChargesChargeDisputeResponse = z.infer< + typeof GetChargesChargeDisputeResponseSchema + > + + export const PostChargesChargeDisputeParamsSchema = z.object({ + charge: z.string().max(5000) + }) + export type PostChargesChargeDisputeParams = z.infer< + typeof PostChargesChargeDisputeParamsSchema + > + + export const PostChargesChargeDisputeResponseSchema = DisputeSchema + export type PostChargesChargeDisputeResponse = z.infer< + typeof PostChargesChargeDisputeResponseSchema + > + + export const PostChargesChargeDisputeCloseParamsSchema = z.object({ + charge: z.string().max(5000) + }) + export type PostChargesChargeDisputeCloseParams = z.infer< + typeof PostChargesChargeDisputeCloseParamsSchema + > + + export const PostChargesChargeDisputeCloseResponseSchema = DisputeSchema + export type PostChargesChargeDisputeCloseResponse = z.infer< + typeof PostChargesChargeDisputeCloseResponseSchema + > + + export const PostChargesChargeRefundParamsSchema = z.object({ + /** The identifier of the charge to refund. */ + charge: z + .string() + .max(5000) + .describe('The identifier of the charge to refund.') + }) + export type PostChargesChargeRefundParams = z.infer< + typeof PostChargesChargeRefundParamsSchema + > + + export const PostChargesChargeRefundResponseSchema = ChargeSchema + export type PostChargesChargeRefundResponse = z.infer< + typeof PostChargesChargeRefundResponseSchema + > + + export const GetChargesChargeRefundsParamsSchema = z.object({ + charge: z.string(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetChargesChargeRefundsParams = z.infer< + typeof GetChargesChargeRefundsParamsSchema + > + + export const GetChargesChargeRefundsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(RefundSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetChargesChargeRefundsResponse = z.infer< + typeof GetChargesChargeRefundsResponseSchema + > + + export const PostChargesChargeRefundsParamsSchema = z.object({ + /** The identifier of the charge to refund. */ + charge: z + .string() + .max(5000) + .describe('The identifier of the charge to refund.') + }) + export type PostChargesChargeRefundsParams = z.infer< + typeof PostChargesChargeRefundsParamsSchema + > + + export const PostChargesChargeRefundsResponseSchema = RefundSchema + export type PostChargesChargeRefundsResponse = z.infer< + typeof PostChargesChargeRefundsResponseSchema + > + + export const GetChargesChargeRefundsRefundParamsSchema = z.object({ + charge: z.string(), + refund: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetChargesChargeRefundsRefundParams = z.infer< + typeof GetChargesChargeRefundsRefundParamsSchema + > + + export const GetChargesChargeRefundsRefundResponseSchema = RefundSchema + export type GetChargesChargeRefundsRefundResponse = z.infer< + typeof GetChargesChargeRefundsRefundResponseSchema + > + + export const PostChargesChargeRefundsRefundParamsSchema = z.object({ + charge: z.string(), + refund: z.string() + }) + export type PostChargesChargeRefundsRefundParams = z.infer< + typeof PostChargesChargeRefundsRefundParamsSchema + > + + export const PostChargesChargeRefundsRefundResponseSchema = RefundSchema + export type PostChargesChargeRefundsRefundResponse = z.infer< + typeof PostChargesChargeRefundsRefundResponseSchema + > + + export const GetCheckoutSessionsParamsSchema = z.object({ + /** Only return Checkout Sessions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return Checkout Sessions that were created during the given date interval.' + ) + .optional(), + /** Only return the Checkout Sessions for the Customer specified. */ + customer: z + .string() + .max(5000) + .describe('Only return the Checkout Sessions for the Customer specified.') + .optional(), + /** Only return the Checkout Sessions for the Customer details specified. */ + customer_details: z + .object({ email: z.string() }) + .describe( + 'Only return the Checkout Sessions for the Customer details specified.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return the Checkout Session for the PaymentIntent specified. */ + payment_intent: z + .string() + .max(5000) + .describe( + 'Only return the Checkout Session for the PaymentIntent specified.' + ) + .optional(), + /** Only return the Checkout Sessions for the Payment Link specified. */ + payment_link: z + .string() + .max(5000) + .describe( + 'Only return the Checkout Sessions for the Payment Link specified.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return the Checkout Sessions matching the given status. */ + status: z + .enum(['complete', 'expired', 'open']) + .describe('Only return the Checkout Sessions matching the given status.') + .optional(), + /** Only return the Checkout Session for the subscription specified. */ + subscription: z + .string() + .max(5000) + .describe( + 'Only return the Checkout Session for the subscription specified.' + ) + .optional() + }) + export type GetCheckoutSessionsParams = z.infer< + typeof GetCheckoutSessionsParamsSchema + > + + export const GetCheckoutSessionsResponseSchema = z.object({ + data: z.array(CheckoutSessionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCheckoutSessionsResponse = z.infer< + typeof GetCheckoutSessionsResponseSchema + > + + export const PostCheckoutSessionsParamsSchema = z.object({}) + export type PostCheckoutSessionsParams = z.infer< + typeof PostCheckoutSessionsParamsSchema + > + + export const PostCheckoutSessionsResponseSchema = CheckoutSessionSchema + export type PostCheckoutSessionsResponse = z.infer< + typeof PostCheckoutSessionsResponseSchema + > + + export const GetCheckoutSessionsSessionParamsSchema = z.object({ + session: z.string().max(66), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCheckoutSessionsSessionParams = z.infer< + typeof GetCheckoutSessionsSessionParamsSchema + > + + export const GetCheckoutSessionsSessionResponseSchema = CheckoutSessionSchema + export type GetCheckoutSessionsSessionResponse = z.infer< + typeof GetCheckoutSessionsSessionResponseSchema + > + + export const PostCheckoutSessionsSessionParamsSchema = z.object({ + session: z.string().max(5000) + }) + export type PostCheckoutSessionsSessionParams = z.infer< + typeof PostCheckoutSessionsSessionParamsSchema + > + + export const PostCheckoutSessionsSessionResponseSchema = CheckoutSessionSchema + export type PostCheckoutSessionsSessionResponse = z.infer< + typeof PostCheckoutSessionsSessionResponseSchema + > + + export const PostCheckoutSessionsSessionExpireParamsSchema = z.object({ + session: z.string().max(5000) + }) + export type PostCheckoutSessionsSessionExpireParams = z.infer< + typeof PostCheckoutSessionsSessionExpireParamsSchema + > + + export const PostCheckoutSessionsSessionExpireResponseSchema = + CheckoutSessionSchema + export type PostCheckoutSessionsSessionExpireResponse = z.infer< + typeof PostCheckoutSessionsSessionExpireResponseSchema + > + + export const GetCheckoutSessionsSessionLineItemsParamsSchema = z.object({ + session: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCheckoutSessionsSessionLineItemsParams = z.infer< + typeof GetCheckoutSessionsSessionLineItemsParamsSchema + > + + export const GetCheckoutSessionsSessionLineItemsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCheckoutSessionsSessionLineItemsResponse = z.infer< + typeof GetCheckoutSessionsSessionLineItemsResponseSchema + > + + export const GetClimateOrdersParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetClimateOrdersParams = z.infer< + typeof GetClimateOrdersParamsSchema + > + + export const GetClimateOrdersResponseSchema = z.object({ + data: z.array(ClimateOrderSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/climate/orders')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetClimateOrdersResponse = z.infer< + typeof GetClimateOrdersResponseSchema + > + + export const PostClimateOrdersParamsSchema = z.object({}) + export type PostClimateOrdersParams = z.infer< + typeof PostClimateOrdersParamsSchema + > + + export const PostClimateOrdersResponseSchema = ClimateOrderSchema + export type PostClimateOrdersResponse = z.infer< + typeof PostClimateOrdersResponseSchema + > + + export const GetClimateOrdersOrderParamsSchema = z.object({ + /** Unique identifier of the order. */ + order: z.string().max(5000).describe('Unique identifier of the order.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetClimateOrdersOrderParams = z.infer< + typeof GetClimateOrdersOrderParamsSchema + > + + export const GetClimateOrdersOrderResponseSchema = ClimateOrderSchema + export type GetClimateOrdersOrderResponse = z.infer< + typeof GetClimateOrdersOrderResponseSchema + > + + export const PostClimateOrdersOrderParamsSchema = z.object({ + /** Unique identifier of the order. */ + order: z.string().max(5000).describe('Unique identifier of the order.') + }) + export type PostClimateOrdersOrderParams = z.infer< + typeof PostClimateOrdersOrderParamsSchema + > + + export const PostClimateOrdersOrderResponseSchema = ClimateOrderSchema + export type PostClimateOrdersOrderResponse = z.infer< + typeof PostClimateOrdersOrderResponseSchema + > + + export const PostClimateOrdersOrderCancelParamsSchema = z.object({ + /** Unique identifier of the order. */ + order: z.string().max(5000).describe('Unique identifier of the order.') + }) + export type PostClimateOrdersOrderCancelParams = z.infer< + typeof PostClimateOrdersOrderCancelParamsSchema + > + + export const PostClimateOrdersOrderCancelResponseSchema = ClimateOrderSchema + export type PostClimateOrdersOrderCancelResponse = z.infer< + typeof PostClimateOrdersOrderCancelResponseSchema + > + + export const GetClimateProductsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetClimateProductsParams = z.infer< + typeof GetClimateProductsParamsSchema + > + + export const GetClimateProductsResponseSchema = z.object({ + data: z.array(ClimateProductSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/climate/products')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetClimateProductsResponse = z.infer< + typeof GetClimateProductsResponseSchema + > + + export const GetClimateProductsProductParamsSchema = z.object({ + product: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetClimateProductsProductParams = z.infer< + typeof GetClimateProductsProductParamsSchema + > + + export const GetClimateProductsProductResponseSchema = ClimateProductSchema + export type GetClimateProductsProductResponse = z.infer< + typeof GetClimateProductsProductResponseSchema + > + + export const GetClimateSuppliersParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetClimateSuppliersParams = z.infer< + typeof GetClimateSuppliersParamsSchema + > + + export const GetClimateSuppliersResponseSchema = z.object({ + data: z.array(ClimateSupplierSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/climate/suppliers')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetClimateSuppliersResponse = z.infer< + typeof GetClimateSuppliersResponseSchema + > + + export const GetClimateSuppliersSupplierParamsSchema = z.object({ + supplier: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetClimateSuppliersSupplierParams = z.infer< + typeof GetClimateSuppliersSupplierParamsSchema + > + + export const GetClimateSuppliersSupplierResponseSchema = ClimateSupplierSchema + export type GetClimateSuppliersSupplierResponse = z.infer< + typeof GetClimateSuppliersSupplierResponseSchema + > + + export const GetConfirmationTokensConfirmationTokenParamsSchema = z.object({ + confirmation_token: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetConfirmationTokensConfirmationTokenParams = z.infer< + typeof GetConfirmationTokensConfirmationTokenParamsSchema + > + + export const GetConfirmationTokensConfirmationTokenResponseSchema = + ConfirmationTokenSchema + export type GetConfirmationTokensConfirmationTokenResponse = z.infer< + typeof GetConfirmationTokensConfirmationTokenResponseSchema + > + + export const GetCountrySpecsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCountrySpecsParams = z.infer< + typeof GetCountrySpecsParamsSchema + > + + export const GetCountrySpecsResponseSchema = z.object({ + data: z.array(CountrySpecSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/country_specs')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCountrySpecsResponse = z.infer< + typeof GetCountrySpecsResponseSchema + > + + export const GetCountrySpecsCountryParamsSchema = z.object({ + country: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCountrySpecsCountryParams = z.infer< + typeof GetCountrySpecsCountryParamsSchema + > + + export const GetCountrySpecsCountryResponseSchema = CountrySpecSchema + export type GetCountrySpecsCountryResponse = z.infer< + typeof GetCountrySpecsCountryResponseSchema + > + + export const GetCouponsParamsSchema = z.object({ + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCouponsParams = z.infer + + export const GetCouponsResponseSchema = z.object({ + data: z.array(CouponSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/coupons')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCouponsResponse = z.infer + + export const PostCouponsParamsSchema = z.object({}) + export type PostCouponsParams = z.infer + + export const PostCouponsResponseSchema = CouponSchema + export type PostCouponsResponse = z.infer + + export const GetCouponsCouponParamsSchema = z.object({ + coupon: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCouponsCouponParams = z.infer< + typeof GetCouponsCouponParamsSchema + > + + export const GetCouponsCouponResponseSchema = CouponSchema + export type GetCouponsCouponResponse = z.infer< + typeof GetCouponsCouponResponseSchema + > + + export const PostCouponsCouponParamsSchema = z.object({ + coupon: z.string().max(5000) + }) + export type PostCouponsCouponParams = z.infer< + typeof PostCouponsCouponParamsSchema + > + + export const PostCouponsCouponResponseSchema = CouponSchema + export type PostCouponsCouponResponse = z.infer< + typeof PostCouponsCouponResponseSchema + > + + export const DeleteCouponsCouponParamsSchema = z.object({ + coupon: z.string().max(5000) + }) + export type DeleteCouponsCouponParams = z.infer< + typeof DeleteCouponsCouponParamsSchema + > + + export const DeleteCouponsCouponResponseSchema = DeletedCouponSchema + export type DeleteCouponsCouponResponse = z.infer< + typeof DeleteCouponsCouponResponseSchema + > + + export const GetCreditNotesParamsSchema = z.object({ + /** Only return credit notes that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return credit notes that were created during the given date interval.' + ) + .optional(), + /** Only return credit notes for the customer specified by this customer ID. */ + customer: z + .string() + .max(5000) + .describe( + 'Only return credit notes for the customer specified by this customer ID.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Only return credit notes for the invoice specified by this invoice ID. */ + invoice: z + .string() + .max(5000) + .describe( + 'Only return credit notes for the invoice specified by this invoice ID.' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCreditNotesParams = z.infer + + export const GetCreditNotesResponseSchema = z.object({ + data: z.array(CreditNoteSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCreditNotesResponse = z.infer< + typeof GetCreditNotesResponseSchema + > + + export const PostCreditNotesParamsSchema = z.object({}) + export type PostCreditNotesParams = z.infer< + typeof PostCreditNotesParamsSchema + > + + export const PostCreditNotesResponseSchema = CreditNoteSchema + export type PostCreditNotesResponse = z.infer< + typeof PostCreditNotesResponseSchema + > + + export const GetCreditNotesPreviewParamsSchema = z.object({ + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ + amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of the credit note.' + ) + .optional(), + /** The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount: z + .number() + .int() + .describe( + "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice." + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ) + .optional(), + /** Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. */ + email_type: z + .enum(['credit_note', 'none']) + .describe( + 'Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** ID of the invoice. */ + invoice: z.string().max(5000).describe('ID of the invoice.'), + /** Line items that make up the credit note. */ + lines: z + .array( + z.object({ + amount: z.number().int().optional(), + description: z.string().max(5000).optional(), + invoice_line_item: z.string().max(5000).optional(), + quantity: z.number().int().optional(), + tax_amounts: z + .union([ + z.array( + z.object({ + amount: z.number().int(), + tax_rate: z.string().max(5000), + taxable_amount: z.number().int() + }) + ), + z.literal('') + ]) + .optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + type: z.enum(['custom_line_item', 'invoice_line_item']), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + ) + .describe('Line items that make up the credit note.') + .optional(), + /** The credit note's memo appears on the credit note PDF. */ + memo: z + .string() + .max(5000) + .describe("The credit note's memo appears on the credit note PDF.") + .optional(), + /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata: z + .record(z.string()) + .describe( + 'Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.' + ) + .optional(), + /** The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ + out_of_band_amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.' + ) + .optional(), + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason: z + .enum([ + 'duplicate', + 'fraudulent', + 'order_change', + 'product_unsatisfactory' + ]) + .describe( + 'Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`' + ) + .optional(), + /** ID of an existing refund to link this credit note to. */ + refund: z + .string() + .describe('ID of an existing refund to link this credit note to.') + .optional(), + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.' + ) + .optional(), + /** When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. */ + shipping_cost: z + .object({ shipping_rate: z.string().max(5000).optional() }) + .describe( + 'When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.' + ) + .optional() + }) + export type GetCreditNotesPreviewParams = z.infer< + typeof GetCreditNotesPreviewParamsSchema + > + + export const GetCreditNotesPreviewResponseSchema = CreditNoteSchema + export type GetCreditNotesPreviewResponse = z.infer< + typeof GetCreditNotesPreviewResponseSchema + > + + export const GetCreditNotesPreviewLinesParamsSchema = z.object({ + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ + amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the total amount of the credit note.' + ) + .optional(), + /** The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount: z + .number() + .int() + .describe( + "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice." + ) + .optional(), + /** 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: z + .number() + .int() + .describe( + "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." + ) + .optional(), + /** Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. */ + email_type: z + .enum(['credit_note', 'none']) + .describe( + 'Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** ID of the invoice. */ + invoice: z.string().max(5000).describe('ID of the invoice.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Line items that make up the credit note. */ + lines: z + .array( + z.object({ + amount: z.number().int().optional(), + description: z.string().max(5000).optional(), + invoice_line_item: z.string().max(5000).optional(), + quantity: z.number().int().optional(), + tax_amounts: z + .union([ + z.array( + z.object({ + amount: z.number().int(), + tax_rate: z.string().max(5000), + taxable_amount: z.number().int() + }) + ), + z.literal('') + ]) + .optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + type: z.enum(['custom_line_item', 'invoice_line_item']), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + ) + .describe('Line items that make up the credit note.') + .optional(), + /** The credit note's memo appears on the credit note PDF. */ + memo: z + .string() + .max(5000) + .describe("The credit note's memo appears on the credit note PDF.") + .optional(), + /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata: z + .record(z.string()) + .describe( + 'Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.' + ) + .optional(), + /** The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ + out_of_band_amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.' + ) + .optional(), + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason: z + .enum([ + 'duplicate', + 'fraudulent', + 'order_change', + 'product_unsatisfactory' + ]) + .describe( + 'Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`' + ) + .optional(), + /** ID of an existing refund to link this credit note to. */ + refund: z + .string() + .describe('ID of an existing refund to link this credit note to.') + .optional(), + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount: z + .number() + .int() + .describe( + 'The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.' + ) + .optional(), + /** When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. */ + shipping_cost: z + .object({ shipping_rate: z.string().max(5000).optional() }) + .describe( + 'When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCreditNotesPreviewLinesParams = z.infer< + typeof GetCreditNotesPreviewLinesParamsSchema + > + + export const GetCreditNotesPreviewLinesResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(CreditNoteLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCreditNotesPreviewLinesResponse = z.infer< + typeof GetCreditNotesPreviewLinesResponseSchema + > + + export const GetCreditNotesCreditNoteLinesParamsSchema = z.object({ + credit_note: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCreditNotesCreditNoteLinesParams = z.infer< + typeof GetCreditNotesCreditNoteLinesParamsSchema + > + + export const GetCreditNotesCreditNoteLinesResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(CreditNoteLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCreditNotesCreditNoteLinesResponse = z.infer< + typeof GetCreditNotesCreditNoteLinesResponseSchema + > + + export const GetCreditNotesIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCreditNotesIdParams = z.infer< + typeof GetCreditNotesIdParamsSchema + > + + export const GetCreditNotesIdResponseSchema = CreditNoteSchema + export type GetCreditNotesIdResponse = z.infer< + typeof GetCreditNotesIdResponseSchema + > + + export const PostCreditNotesIdParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostCreditNotesIdParams = z.infer< + typeof PostCreditNotesIdParamsSchema + > + + export const PostCreditNotesIdResponseSchema = CreditNoteSchema + export type PostCreditNotesIdResponse = z.infer< + typeof PostCreditNotesIdResponseSchema + > + + export const PostCreditNotesIdVoidParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostCreditNotesIdVoidParams = z.infer< + typeof PostCreditNotesIdVoidParamsSchema + > + + export const PostCreditNotesIdVoidResponseSchema = CreditNoteSchema + export type PostCreditNotesIdVoidResponse = z.infer< + typeof PostCreditNotesIdVoidResponseSchema + > + + export const PostCustomerSessionsParamsSchema = z.object({}) + export type PostCustomerSessionsParams = z.infer< + typeof PostCustomerSessionsParamsSchema + > + + export const PostCustomerSessionsResponseSchema = CustomerSessionSchema + export type PostCustomerSessionsResponse = z.infer< + typeof PostCustomerSessionsResponseSchema + > + + export const GetCustomersParamsSchema = z.object({ + /** Only return customers that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return customers that were created during the given date interval.' + ) + .optional(), + /** A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. */ + email: z + .string() + .max(512) + .describe( + "A case-sensitive filter on the list based on the customer's `email` field. The value must be a string." + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + test_clock: z + .string() + .max(5000) + .describe( + 'Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.' + ) + .optional() + }) + export type GetCustomersParams = z.infer + + export const GetCustomersResponseSchema = z.object({ + data: z.array(CustomerSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/customers')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersResponse = z.infer + + export const PostCustomersParamsSchema = z.object({}) + export type PostCustomersParams = z.infer + + export const PostCustomersResponseSchema = CustomerSchema + export type PostCustomersResponse = z.infer< + typeof PostCustomersResponseSchema + > + + export const GetCustomersSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).' + ) + }) + export type GetCustomersSearchParams = z.infer< + typeof GetCustomersSearchParamsSchema + > + + export const GetCustomersSearchResponseSchema = z.object({ + data: z.array(CustomerSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetCustomersSearchResponse = z.infer< + typeof GetCustomersSearchResponseSchema + > + + export const GetCustomersCustomerParamsSchema = z.object({ + customer: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerParams = z.infer< + typeof GetCustomersCustomerParamsSchema + > + + export const GetCustomersCustomerResponseSchema = z.union([ + CustomerSchema, + DeletedCustomerSchema + ]) + export type GetCustomersCustomerResponse = z.infer< + typeof GetCustomersCustomerResponseSchema + > + + export const PostCustomersCustomerParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerParams = z.infer< + typeof PostCustomersCustomerParamsSchema + > + + export const PostCustomersCustomerResponseSchema = CustomerSchema + export type PostCustomersCustomerResponse = z.infer< + typeof PostCustomersCustomerResponseSchema + > + + export const DeleteCustomersCustomerParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type DeleteCustomersCustomerParams = z.infer< + typeof DeleteCustomersCustomerParamsSchema + > + + export const DeleteCustomersCustomerResponseSchema = DeletedCustomerSchema + export type DeleteCustomersCustomerResponse = z.infer< + typeof DeleteCustomersCustomerResponseSchema + > + + export const GetCustomersCustomerBalanceTransactionsParamsSchema = z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerBalanceTransactionsParams = z.infer< + typeof GetCustomersCustomerBalanceTransactionsParamsSchema + > + + export const GetCustomersCustomerBalanceTransactionsResponseSchema = z.object( + { + /** Details about each object. */ + data: z + .array(CustomerBalanceTransactionSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + } + ) + export type GetCustomersCustomerBalanceTransactionsResponse = z.infer< + typeof GetCustomersCustomerBalanceTransactionsResponseSchema + > + + export const PostCustomersCustomerBalanceTransactionsParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerBalanceTransactionsParams = z.infer< + typeof PostCustomersCustomerBalanceTransactionsParamsSchema + > + + export const PostCustomersCustomerBalanceTransactionsResponseSchema = + CustomerBalanceTransactionSchema + export type PostCustomersCustomerBalanceTransactionsResponse = z.infer< + typeof PostCustomersCustomerBalanceTransactionsResponseSchema + > + + export const GetCustomersCustomerBalanceTransactionsTransactionParamsSchema = + z.object({ + customer: z.string().max(5000), + transaction: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerBalanceTransactionsTransactionParams = + z.infer< + typeof GetCustomersCustomerBalanceTransactionsTransactionParamsSchema + > + + export const GetCustomersCustomerBalanceTransactionsTransactionResponseSchema = + CustomerBalanceTransactionSchema + export type GetCustomersCustomerBalanceTransactionsTransactionResponse = + z.infer< + typeof GetCustomersCustomerBalanceTransactionsTransactionResponseSchema + > + + export const PostCustomersCustomerBalanceTransactionsTransactionParamsSchema = + z.object({ + customer: z.string().max(5000), + transaction: z.string().max(5000) + }) + export type PostCustomersCustomerBalanceTransactionsTransactionParams = + z.infer< + typeof PostCustomersCustomerBalanceTransactionsTransactionParamsSchema + > + + export const PostCustomersCustomerBalanceTransactionsTransactionResponseSchema = + CustomerBalanceTransactionSchema + export type PostCustomersCustomerBalanceTransactionsTransactionResponse = + z.infer< + typeof PostCustomersCustomerBalanceTransactionsTransactionResponseSchema + > + + export const GetCustomersCustomerBankAccountsParamsSchema = z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerBankAccountsParams = z.infer< + typeof GetCustomersCustomerBankAccountsParamsSchema + > + + export const GetCustomersCustomerBankAccountsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(BankAccountSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersCustomerBankAccountsResponse = z.infer< + typeof GetCustomersCustomerBankAccountsResponseSchema + > + + export const PostCustomersCustomerBankAccountsParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerBankAccountsParams = z.infer< + typeof PostCustomersCustomerBankAccountsParamsSchema + > + + export const PostCustomersCustomerBankAccountsResponseSchema = + PaymentSourceSchema + export type PostCustomersCustomerBankAccountsResponse = z.infer< + typeof PostCustomersCustomerBankAccountsResponseSchema + > + + export const GetCustomersCustomerBankAccountsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerBankAccountsIdParams = z.infer< + typeof GetCustomersCustomerBankAccountsIdParamsSchema + > + + export const GetCustomersCustomerBankAccountsIdResponseSchema = + BankAccountSchema + export type GetCustomersCustomerBankAccountsIdResponse = z.infer< + typeof GetCustomersCustomerBankAccountsIdResponseSchema + > + + export const PostCustomersCustomerBankAccountsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(5000) + }) + export type PostCustomersCustomerBankAccountsIdParams = z.infer< + typeof PostCustomersCustomerBankAccountsIdParamsSchema + > + + export const PostCustomersCustomerBankAccountsIdResponseSchema = z.union([ + CardSchema, + BankAccountSchema, + SourceSchema + ]) + export type PostCustomersCustomerBankAccountsIdResponse = z.infer< + typeof PostCustomersCustomerBankAccountsIdResponseSchema + > + + export const DeleteCustomersCustomerBankAccountsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string() + }) + export type DeleteCustomersCustomerBankAccountsIdParams = z.infer< + typeof DeleteCustomersCustomerBankAccountsIdParamsSchema + > + + export const DeleteCustomersCustomerBankAccountsIdResponseSchema = z.union([ + PaymentSourceSchema, + DeletedPaymentSourceSchema + ]) + export type DeleteCustomersCustomerBankAccountsIdResponse = z.infer< + typeof DeleteCustomersCustomerBankAccountsIdResponseSchema + > + + export const PostCustomersCustomerBankAccountsIdVerifyParamsSchema = z.object( + { customer: z.string().max(5000), id: z.string().max(5000) } + ) + export type PostCustomersCustomerBankAccountsIdVerifyParams = z.infer< + typeof PostCustomersCustomerBankAccountsIdVerifyParamsSchema + > + + export const PostCustomersCustomerBankAccountsIdVerifyResponseSchema = + BankAccountSchema + export type PostCustomersCustomerBankAccountsIdVerifyResponse = z.infer< + typeof PostCustomersCustomerBankAccountsIdVerifyResponseSchema + > + + export const GetCustomersCustomerCardsParamsSchema = z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerCardsParams = z.infer< + typeof GetCustomersCustomerCardsParamsSchema + > + + export const GetCustomersCustomerCardsResponseSchema = z.object({ + data: z.array(CardSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersCustomerCardsResponse = z.infer< + typeof GetCustomersCustomerCardsResponseSchema + > + + export const PostCustomersCustomerCardsParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerCardsParams = z.infer< + typeof PostCustomersCustomerCardsParamsSchema + > + + export const PostCustomersCustomerCardsResponseSchema = PaymentSourceSchema + export type PostCustomersCustomerCardsResponse = z.infer< + typeof PostCustomersCustomerCardsResponseSchema + > + + export const GetCustomersCustomerCardsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerCardsIdParams = z.infer< + typeof GetCustomersCustomerCardsIdParamsSchema + > + + export const GetCustomersCustomerCardsIdResponseSchema = CardSchema + export type GetCustomersCustomerCardsIdResponse = z.infer< + typeof GetCustomersCustomerCardsIdResponseSchema + > + + export const PostCustomersCustomerCardsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(5000) + }) + export type PostCustomersCustomerCardsIdParams = z.infer< + typeof PostCustomersCustomerCardsIdParamsSchema + > + + export const PostCustomersCustomerCardsIdResponseSchema = z.union([ + CardSchema, + BankAccountSchema, + SourceSchema + ]) + export type PostCustomersCustomerCardsIdResponse = z.infer< + typeof PostCustomersCustomerCardsIdResponseSchema + > + + export const DeleteCustomersCustomerCardsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string() + }) + export type DeleteCustomersCustomerCardsIdParams = z.infer< + typeof DeleteCustomersCustomerCardsIdParamsSchema + > + + export const DeleteCustomersCustomerCardsIdResponseSchema = z.union([ + PaymentSourceSchema, + DeletedPaymentSourceSchema + ]) + export type DeleteCustomersCustomerCardsIdResponse = z.infer< + typeof DeleteCustomersCustomerCardsIdResponseSchema + > + + export const GetCustomersCustomerCashBalanceParamsSchema = z.object({ + customer: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerCashBalanceParams = z.infer< + typeof GetCustomersCustomerCashBalanceParamsSchema + > + + export const GetCustomersCustomerCashBalanceResponseSchema = CashBalanceSchema + export type GetCustomersCustomerCashBalanceResponse = z.infer< + typeof GetCustomersCustomerCashBalanceResponseSchema + > + + export const PostCustomersCustomerCashBalanceParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerCashBalanceParams = z.infer< + typeof PostCustomersCustomerCashBalanceParamsSchema + > + + export const PostCustomersCustomerCashBalanceResponseSchema = + CashBalanceSchema + export type PostCustomersCustomerCashBalanceResponse = z.infer< + typeof PostCustomersCustomerCashBalanceResponseSchema + > + + export const GetCustomersCustomerCashBalanceTransactionsParamsSchema = + z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerCashBalanceTransactionsParams = z.infer< + typeof GetCustomersCustomerCashBalanceTransactionsParamsSchema + > + + /** + * 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 GetCustomersCustomerCashBalanceTransactionsResponseSchema = z + .object({ + /** Details about each object. */ + data: z + .array(CustomerCashBalanceTransactionSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe( + 'Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.' + ) + export type GetCustomersCustomerCashBalanceTransactionsResponse = z.infer< + typeof GetCustomersCustomerCashBalanceTransactionsResponseSchema + > + + export const GetCustomersCustomerCashBalanceTransactionsTransactionParamsSchema = + z.object({ + customer: z.string().max(5000), + transaction: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerCashBalanceTransactionsTransactionParams = + z.infer< + typeof GetCustomersCustomerCashBalanceTransactionsTransactionParamsSchema + > + + export const GetCustomersCustomerCashBalanceTransactionsTransactionResponseSchema = + CustomerCashBalanceTransactionSchema + export type GetCustomersCustomerCashBalanceTransactionsTransactionResponse = + z.infer< + typeof GetCustomersCustomerCashBalanceTransactionsTransactionResponseSchema + > + + export const GetCustomersCustomerDiscountParamsSchema = z.object({ + customer: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerDiscountParams = z.infer< + typeof GetCustomersCustomerDiscountParamsSchema + > + + export const GetCustomersCustomerDiscountResponseSchema = DiscountSchema + export type GetCustomersCustomerDiscountResponse = z.infer< + typeof GetCustomersCustomerDiscountResponseSchema + > + + export const DeleteCustomersCustomerDiscountParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type DeleteCustomersCustomerDiscountParams = z.infer< + typeof DeleteCustomersCustomerDiscountParamsSchema + > + + export const DeleteCustomersCustomerDiscountResponseSchema = + DeletedDiscountSchema + export type DeleteCustomersCustomerDiscountResponse = z.infer< + typeof DeleteCustomersCustomerDiscountResponseSchema + > + + export const PostCustomersCustomerFundingInstructionsParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerFundingInstructionsParams = z.infer< + typeof PostCustomersCustomerFundingInstructionsParamsSchema + > + + export const PostCustomersCustomerFundingInstructionsResponseSchema = + FundingInstructionsSchema + export type PostCustomersCustomerFundingInstructionsResponse = z.infer< + typeof PostCustomersCustomerFundingInstructionsResponseSchema + > + + export const GetCustomersCustomerPaymentMethodsParamsSchema = z.object({ + customer: z.string().max(5000), + /** 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: z + .enum(['always', 'limited', 'unspecified']) + .describe( + '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`.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. */ + type: z + .enum([ + 'acss_debit', + 'affirm', + 'afterpay_clearpay', + 'alipay', + 'alma', + 'amazon_pay', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'blik', + 'boleto', + 'card', + 'cashapp', + 'customer_balance', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'kakao_pay', + 'klarna', + 'konbini', + 'kr_card', + 'link', + 'mobilepay', + 'multibanco', + 'naver_pay', + 'oxxo', + 'p24', + 'pay_by_bank', + 'payco', + 'paynow', + 'paypal', + 'pix', + 'promptpay', + 'revolut_pay', + 'samsung_pay', + 'sepa_debit', + 'sofort', + 'swish', + 'twint', + 'us_bank_account', + 'wechat_pay', + 'zip' + ]) + .describe( + 'An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.' + ) + .optional() + }) + export type GetCustomersCustomerPaymentMethodsParams = z.infer< + typeof GetCustomersCustomerPaymentMethodsParamsSchema + > + + export const GetCustomersCustomerPaymentMethodsResponseSchema = z.object({ + data: z.array(PaymentMethodSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersCustomerPaymentMethodsResponse = z.infer< + typeof GetCustomersCustomerPaymentMethodsResponseSchema + > + + export const GetCustomersCustomerPaymentMethodsPaymentMethodParamsSchema = + z.object({ + customer: z.string().max(5000), + payment_method: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerPaymentMethodsPaymentMethodParams = z.infer< + typeof GetCustomersCustomerPaymentMethodsPaymentMethodParamsSchema + > + + export const GetCustomersCustomerPaymentMethodsPaymentMethodResponseSchema = + PaymentMethodSchema + export type GetCustomersCustomerPaymentMethodsPaymentMethodResponse = z.infer< + typeof GetCustomersCustomerPaymentMethodsPaymentMethodResponseSchema + > + + export const GetCustomersCustomerSourcesParamsSchema = z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filter sources according to a particular object type. */ + object: z + .string() + .max(5000) + .describe('Filter sources according to a particular object type.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerSourcesParams = z.infer< + typeof GetCustomersCustomerSourcesParamsSchema + > + + export const GetCustomersCustomerSourcesResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(z.union([BankAccountSchema, CardSchema, SourceSchema])) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersCustomerSourcesResponse = z.infer< + typeof GetCustomersCustomerSourcesResponseSchema + > + + export const PostCustomersCustomerSourcesParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerSourcesParams = z.infer< + typeof PostCustomersCustomerSourcesParamsSchema + > + + export const PostCustomersCustomerSourcesResponseSchema = PaymentSourceSchema + export type PostCustomersCustomerSourcesResponse = z.infer< + typeof PostCustomersCustomerSourcesResponseSchema + > + + export const GetCustomersCustomerSourcesIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(500), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerSourcesIdParams = z.infer< + typeof GetCustomersCustomerSourcesIdParamsSchema + > + + export const GetCustomersCustomerSourcesIdResponseSchema = PaymentSourceSchema + export type GetCustomersCustomerSourcesIdResponse = z.infer< + typeof GetCustomersCustomerSourcesIdResponseSchema + > + + export const PostCustomersCustomerSourcesIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(5000) + }) + export type PostCustomersCustomerSourcesIdParams = z.infer< + typeof PostCustomersCustomerSourcesIdParamsSchema + > + + export const PostCustomersCustomerSourcesIdResponseSchema = z.union([ + CardSchema, + BankAccountSchema, + SourceSchema + ]) + export type PostCustomersCustomerSourcesIdResponse = z.infer< + typeof PostCustomersCustomerSourcesIdResponseSchema + > + + export const DeleteCustomersCustomerSourcesIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string() + }) + export type DeleteCustomersCustomerSourcesIdParams = z.infer< + typeof DeleteCustomersCustomerSourcesIdParamsSchema + > + + export const DeleteCustomersCustomerSourcesIdResponseSchema = z.union([ + PaymentSourceSchema, + DeletedPaymentSourceSchema + ]) + export type DeleteCustomersCustomerSourcesIdResponse = z.infer< + typeof DeleteCustomersCustomerSourcesIdResponseSchema + > + + export const PostCustomersCustomerSourcesIdVerifyParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string().max(5000) + }) + export type PostCustomersCustomerSourcesIdVerifyParams = z.infer< + typeof PostCustomersCustomerSourcesIdVerifyParamsSchema + > + + export const PostCustomersCustomerSourcesIdVerifyResponseSchema = + BankAccountSchema + export type PostCustomersCustomerSourcesIdVerifyResponse = z.infer< + typeof PostCustomersCustomerSourcesIdVerifyResponseSchema + > + + export const GetCustomersCustomerSubscriptionsParamsSchema = z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerSubscriptionsParams = z.infer< + typeof GetCustomersCustomerSubscriptionsParamsSchema + > + + export const GetCustomersCustomerSubscriptionsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(SubscriptionSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersCustomerSubscriptionsResponse = z.infer< + typeof GetCustomersCustomerSubscriptionsResponseSchema + > + + export const PostCustomersCustomerSubscriptionsParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerSubscriptionsParams = z.infer< + typeof PostCustomersCustomerSubscriptionsParamsSchema + > + + export const PostCustomersCustomerSubscriptionsResponseSchema = + SubscriptionSchema + export type PostCustomersCustomerSubscriptionsResponse = z.infer< + typeof PostCustomersCustomerSubscriptionsResponseSchema + > + + export const GetCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema = + z.object({ + customer: z.string().max(5000), + subscription_exposed_id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerSubscriptionsSubscriptionExposedIdParams = + z.infer< + typeof GetCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema + > + + export const GetCustomersCustomerSubscriptionsSubscriptionExposedIdResponseSchema = + SubscriptionSchema + export type GetCustomersCustomerSubscriptionsSubscriptionExposedIdResponse = + z.infer< + typeof GetCustomersCustomerSubscriptionsSubscriptionExposedIdResponseSchema + > + + export const PostCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema = + z.object({ + customer: z.string().max(5000), + subscription_exposed_id: z.string().max(5000) + }) + export type PostCustomersCustomerSubscriptionsSubscriptionExposedIdParams = + z.infer< + typeof PostCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema + > + + export const PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseSchema = + SubscriptionSchema + export type PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponse = + z.infer< + typeof PostCustomersCustomerSubscriptionsSubscriptionExposedIdResponseSchema + > + + export const DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema = + z.object({ + customer: z.string().max(5000), + subscription_exposed_id: z.string().max(5000) + }) + export type DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParams = + z.infer< + typeof DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema + > + + export const DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponseSchema = + SubscriptionSchema + export type DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse = + z.infer< + typeof DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponseSchema + > + + export const GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParamsSchema = + z.object({ + customer: z.string().max(5000), + subscription_exposed_id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParams = + z.infer< + typeof GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParamsSchema + > + + export const GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountResponseSchema = + DiscountSchema + export type GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountResponse = + z.infer< + typeof GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountResponseSchema + > + + export const DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParamsSchema = + z.object({ + customer: z.string().max(5000), + subscription_exposed_id: z.string().max(5000) + }) + export type DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParams = + z.infer< + typeof DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParamsSchema + > + + export const DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountResponseSchema = + DeletedDiscountSchema + export type DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountResponse = + z.infer< + typeof DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountResponseSchema + > + + export const GetCustomersCustomerTaxIdsParamsSchema = z.object({ + customer: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetCustomersCustomerTaxIdsParams = z.infer< + typeof GetCustomersCustomerTaxIdsParamsSchema + > + + export const GetCustomersCustomerTaxIdsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(TaxIdSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetCustomersCustomerTaxIdsResponse = z.infer< + typeof GetCustomersCustomerTaxIdsResponseSchema + > + + export const PostCustomersCustomerTaxIdsParamsSchema = z.object({ + customer: z.string().max(5000) + }) + export type PostCustomersCustomerTaxIdsParams = z.infer< + typeof PostCustomersCustomerTaxIdsParamsSchema + > + + export const PostCustomersCustomerTaxIdsResponseSchema = TaxIdSchema + export type PostCustomersCustomerTaxIdsResponse = z.infer< + typeof PostCustomersCustomerTaxIdsResponseSchema + > + + export const GetCustomersCustomerTaxIdsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetCustomersCustomerTaxIdsIdParams = z.infer< + typeof GetCustomersCustomerTaxIdsIdParamsSchema + > + + export const GetCustomersCustomerTaxIdsIdResponseSchema = TaxIdSchema + export type GetCustomersCustomerTaxIdsIdResponse = z.infer< + typeof GetCustomersCustomerTaxIdsIdResponseSchema + > + + export const DeleteCustomersCustomerTaxIdsIdParamsSchema = z.object({ + customer: z.string().max(5000), + id: z.string() + }) + export type DeleteCustomersCustomerTaxIdsIdParams = z.infer< + typeof DeleteCustomersCustomerTaxIdsIdParamsSchema + > + + export const DeleteCustomersCustomerTaxIdsIdResponseSchema = + DeletedTaxIdSchema + export type DeleteCustomersCustomerTaxIdsIdResponse = z.infer< + typeof DeleteCustomersCustomerTaxIdsIdResponseSchema + > + + export const GetDisputesParamsSchema = z.object({ + /** Only return disputes associated to the charge specified by this charge ID. */ + charge: z + .string() + .max(5000) + .describe( + 'Only return disputes associated to the charge specified by this charge ID.' + ) + .optional(), + /** Only return disputes that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return disputes that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent: z + .string() + .max(5000) + .describe( + 'Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetDisputesParams = z.infer + + export const GetDisputesResponseSchema = z.object({ + data: z.array(DisputeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/disputes')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetDisputesResponse = z.infer + + export const GetDisputesDisputeParamsSchema = z.object({ + dispute: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetDisputesDisputeParams = z.infer< + typeof GetDisputesDisputeParamsSchema + > + + export const GetDisputesDisputeResponseSchema = DisputeSchema + export type GetDisputesDisputeResponse = z.infer< + typeof GetDisputesDisputeResponseSchema + > + + export const PostDisputesDisputeParamsSchema = z.object({ + dispute: z.string().max(5000) + }) + export type PostDisputesDisputeParams = z.infer< + typeof PostDisputesDisputeParamsSchema + > + + export const PostDisputesDisputeResponseSchema = DisputeSchema + export type PostDisputesDisputeResponse = z.infer< + typeof PostDisputesDisputeResponseSchema + > + + export const PostDisputesDisputeCloseParamsSchema = z.object({ + dispute: z.string().max(5000) + }) + export type PostDisputesDisputeCloseParams = z.infer< + typeof PostDisputesDisputeCloseParamsSchema + > + + export const PostDisputesDisputeCloseResponseSchema = DisputeSchema + export type PostDisputesDisputeCloseResponse = z.infer< + typeof PostDisputesDisputeCloseResponseSchema + > + + export const GetEntitlementsActiveEntitlementsParamsSchema = z.object({ + /** The ID of the customer. */ + customer: z.string().max(5000).describe('The ID of the customer.'), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetEntitlementsActiveEntitlementsParams = z.infer< + typeof GetEntitlementsActiveEntitlementsParamsSchema + > + + export const GetEntitlementsActiveEntitlementsResponseSchema = z.object({ + data: z.array(EntitlementsActiveEntitlementSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetEntitlementsActiveEntitlementsResponse = z.infer< + typeof GetEntitlementsActiveEntitlementsResponseSchema + > + + export const GetEntitlementsActiveEntitlementsIdParamsSchema = z.object({ + /** The ID of the entitlement. */ + id: z.string().max(5000).describe('The ID of the entitlement.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetEntitlementsActiveEntitlementsIdParams = z.infer< + typeof GetEntitlementsActiveEntitlementsIdParamsSchema + > + + export const GetEntitlementsActiveEntitlementsIdResponseSchema = + EntitlementsActiveEntitlementSchema + export type GetEntitlementsActiveEntitlementsIdResponse = z.infer< + typeof GetEntitlementsActiveEntitlementsIdResponseSchema + > + + export const GetEntitlementsFeaturesParamsSchema = z.object({ + /** If set, filter results to only include features with the given archive status. */ + archived: z + .boolean() + .describe( + 'If set, filter results to only include features with the given archive status.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** If set, filter results to only include features with the given lookup_key. */ + lookup_key: z + .string() + .max(5000) + .describe( + 'If set, filter results to only include features with the given lookup_key.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetEntitlementsFeaturesParams = z.infer< + typeof GetEntitlementsFeaturesParamsSchema + > + + export const GetEntitlementsFeaturesResponseSchema = z.object({ + data: z.array(EntitlementsFeatureSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/entitlements/features')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetEntitlementsFeaturesResponse = z.infer< + typeof GetEntitlementsFeaturesResponseSchema + > + + export const PostEntitlementsFeaturesParamsSchema = z.object({}) + export type PostEntitlementsFeaturesParams = z.infer< + typeof PostEntitlementsFeaturesParamsSchema + > + + export const PostEntitlementsFeaturesResponseSchema = + EntitlementsFeatureSchema + export type PostEntitlementsFeaturesResponse = z.infer< + typeof PostEntitlementsFeaturesResponseSchema + > + + export const GetEntitlementsFeaturesIdParamsSchema = z.object({ + /** The ID of the feature. */ + id: z.string().max(5000).describe('The ID of the feature.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetEntitlementsFeaturesIdParams = z.infer< + typeof GetEntitlementsFeaturesIdParamsSchema + > + + export const GetEntitlementsFeaturesIdResponseSchema = + EntitlementsFeatureSchema + export type GetEntitlementsFeaturesIdResponse = z.infer< + typeof GetEntitlementsFeaturesIdResponseSchema + > + + export const PostEntitlementsFeaturesIdParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostEntitlementsFeaturesIdParams = z.infer< + typeof PostEntitlementsFeaturesIdParamsSchema + > + + export const PostEntitlementsFeaturesIdResponseSchema = + EntitlementsFeatureSchema + export type PostEntitlementsFeaturesIdResponse = z.infer< + typeof PostEntitlementsFeaturesIdResponseSchema + > + + export const PostEphemeralKeysParamsSchema = z.object({}) + export type PostEphemeralKeysParams = z.infer< + typeof PostEphemeralKeysParamsSchema + > + + export const PostEphemeralKeysResponseSchema = EphemeralKeySchema + export type PostEphemeralKeysResponse = z.infer< + typeof PostEphemeralKeysResponseSchema + > + + export const DeleteEphemeralKeysKeyParamsSchema = z.object({ + key: z.string().max(5000) + }) + export type DeleteEphemeralKeysKeyParams = z.infer< + typeof DeleteEphemeralKeysKeyParamsSchema + > + + export const DeleteEphemeralKeysKeyResponseSchema = EphemeralKeySchema + export type DeleteEphemeralKeysKeyResponse = z.infer< + typeof DeleteEphemeralKeysKeyResponseSchema + > + + export const GetEventsParamsSchema = z.object({ + /** Only return events that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return events that were created during the given date interval.' + ) + .optional(), + /** Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ + delivery_success: z + .boolean() + .describe( + 'Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. */ + type: z + .string() + .max(5000) + .describe( + 'A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.' + ) + .optional(), + /** An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. */ + types: z + .array(z.string().max(5000)) + .describe( + 'An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.' + ) + .optional() + }) + export type GetEventsParams = z.infer + + export const GetEventsResponseSchema = z.object({ + data: z.array(EventSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/events')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetEventsResponse = z.infer + + export const GetEventsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetEventsIdParams = z.infer + + export const GetEventsIdResponseSchema = EventSchema + export type GetEventsIdResponse = z.infer + + export const GetExchangeRatesParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetExchangeRatesParams = z.infer< + typeof GetExchangeRatesParamsSchema + > + + export const GetExchangeRatesResponseSchema = z.object({ + data: z.array(ExchangeRateSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/exchange_rates')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetExchangeRatesResponse = z.infer< + typeof GetExchangeRatesResponseSchema + > + + export const GetExchangeRatesRateIdParamsSchema = z.object({ + rate_id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetExchangeRatesRateIdParams = z.infer< + typeof GetExchangeRatesRateIdParamsSchema + > + + export const GetExchangeRatesRateIdResponseSchema = ExchangeRateSchema + export type GetExchangeRatesRateIdResponse = z.infer< + typeof GetExchangeRatesRateIdResponseSchema + > + + export const GetFileLinksParamsSchema = z.object({ + /** Only return links that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return links that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Filter links by their expiration status. By default, Stripe returns all links. */ + expired: z + .boolean() + .describe( + 'Filter links by their expiration status. By default, Stripe returns all links.' + ) + .optional(), + /** Only return links for the given file. */ + file: z + .string() + .max(5000) + .describe('Only return links for the given file.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetFileLinksParams = z.infer + + export const GetFileLinksResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(FileLinkSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/file_links')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetFileLinksResponse = z.infer + + export const PostFileLinksParamsSchema = z.object({}) + export type PostFileLinksParams = z.infer + + export const PostFileLinksResponseSchema = FileLinkSchema + export type PostFileLinksResponse = z.infer< + typeof PostFileLinksResponseSchema + > + + export const GetFileLinksLinkParamsSchema = z.object({ + link: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetFileLinksLinkParams = z.infer< + typeof GetFileLinksLinkParamsSchema + > + + export const GetFileLinksLinkResponseSchema = FileLinkSchema + export type GetFileLinksLinkResponse = z.infer< + typeof GetFileLinksLinkResponseSchema + > + + export const PostFileLinksLinkParamsSchema = z.object({ link: z.string() }) + export type PostFileLinksLinkParams = z.infer< + typeof PostFileLinksLinkParamsSchema + > + + export const PostFileLinksLinkResponseSchema = FileLinkSchema + export type PostFileLinksLinkResponse = z.infer< + typeof PostFileLinksLinkResponseSchema + > + + export const GetFilesParamsSchema = z.object({ + /** Only return files that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return files that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. */ + 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', + 'selfie', + 'sigma_scheduled_query', + 'tax_document_user_upload', + 'terminal_reader_splashscreen' + ]) + .describe( + "Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files." + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetFilesParams = z.infer + + export const GetFilesResponseSchema = z.object({ + data: z.array(FileSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/files')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetFilesResponse = z.infer + + export const PostFilesParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. */ + file: z + .string() + .base64() + .describe( + 'A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.' + ), + /** Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. */ + file_link_data: z + .object({ + create: z.boolean(), + expires_at: z.number().int().optional(), + metadata: z.union([z.record(z.string()), z.literal('')]).optional() + }) + .describe( + 'Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.' + ) + .optional(), + /** The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. */ + purpose: z + .enum([ + 'account_requirement', + 'additional_verification', + 'business_icon', + 'business_logo', + 'customer_signature', + 'dispute_evidence', + 'identity_document', + 'issuing_regulatory_reporting', + 'pci_document', + 'tax_document_user_upload', + 'terminal_reader_splashscreen' + ]) + .describe( + 'The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.' + ) + }) + export type PostFilesParams = z.infer + + export const PostFilesResponseSchema = FileSchema + export type PostFilesResponse = z.infer + + export const GetFilesFileParamsSchema = z.object({ + file: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetFilesFileParams = z.infer + + export const GetFilesFileResponseSchema = FileSchema + export type GetFilesFileResponse = z.infer + + export const GetFinancialConnectionsAccountsParamsSchema = z.object({ + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder: z + .object({ + account: z.string().max(5000).optional(), + customer: z.string().max(5000).optional() + }) + .describe( + 'If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** If present, only return accounts that were collected as part of the given session. */ + session: z + .string() + .max(5000) + .describe( + 'If present, only return accounts that were collected as part of the given session.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetFinancialConnectionsAccountsParams = z.infer< + typeof GetFinancialConnectionsAccountsParamsSchema + > + + export const GetFinancialConnectionsAccountsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsAccountSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/financial_connections/accounts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetFinancialConnectionsAccountsResponse = z.infer< + typeof GetFinancialConnectionsAccountsResponseSchema + > + + export const GetFinancialConnectionsAccountsAccountParamsSchema = z.object({ + account: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetFinancialConnectionsAccountsAccountParams = z.infer< + typeof GetFinancialConnectionsAccountsAccountParamsSchema + > + + export const GetFinancialConnectionsAccountsAccountResponseSchema = + FinancialConnectionsAccountSchema + export type GetFinancialConnectionsAccountsAccountResponse = z.infer< + typeof GetFinancialConnectionsAccountsAccountResponseSchema + > + + export const PostFinancialConnectionsAccountsAccountDisconnectParamsSchema = + z.object({ account: z.string().max(5000) }) + export type PostFinancialConnectionsAccountsAccountDisconnectParams = z.infer< + typeof PostFinancialConnectionsAccountsAccountDisconnectParamsSchema + > + + export const PostFinancialConnectionsAccountsAccountDisconnectResponseSchema = + FinancialConnectionsAccountSchema + export type PostFinancialConnectionsAccountsAccountDisconnectResponse = + z.infer< + typeof PostFinancialConnectionsAccountsAccountDisconnectResponseSchema + > + + export const GetFinancialConnectionsAccountsAccountOwnersParamsSchema = + z.object({ + account: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** The ID of the ownership object to fetch owners from. */ + ownership: z + .string() + .max(5000) + .describe('The ID of the ownership object to fetch owners from.'), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetFinancialConnectionsAccountsAccountOwnersParams = z.infer< + typeof GetFinancialConnectionsAccountsAccountOwnersParamsSchema + > + + export const GetFinancialConnectionsAccountsAccountOwnersResponseSchema = + z.object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsAccountOwnerSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetFinancialConnectionsAccountsAccountOwnersResponse = z.infer< + typeof GetFinancialConnectionsAccountsAccountOwnersResponseSchema + > + + export const PostFinancialConnectionsAccountsAccountRefreshParamsSchema = + z.object({ account: z.string().max(5000) }) + export type PostFinancialConnectionsAccountsAccountRefreshParams = z.infer< + typeof PostFinancialConnectionsAccountsAccountRefreshParamsSchema + > + + export const PostFinancialConnectionsAccountsAccountRefreshResponseSchema = + FinancialConnectionsAccountSchema + export type PostFinancialConnectionsAccountsAccountRefreshResponse = z.infer< + typeof PostFinancialConnectionsAccountsAccountRefreshResponseSchema + > + + export const PostFinancialConnectionsAccountsAccountSubscribeParamsSchema = + z.object({ account: z.string().max(5000) }) + export type PostFinancialConnectionsAccountsAccountSubscribeParams = z.infer< + typeof PostFinancialConnectionsAccountsAccountSubscribeParamsSchema + > + + export const PostFinancialConnectionsAccountsAccountSubscribeResponseSchema = + FinancialConnectionsAccountSchema + export type PostFinancialConnectionsAccountsAccountSubscribeResponse = + z.infer< + typeof PostFinancialConnectionsAccountsAccountSubscribeResponseSchema + > + + export const PostFinancialConnectionsAccountsAccountUnsubscribeParamsSchema = + z.object({ account: z.string().max(5000) }) + export type PostFinancialConnectionsAccountsAccountUnsubscribeParams = + z.infer< + typeof PostFinancialConnectionsAccountsAccountUnsubscribeParamsSchema + > + + export const PostFinancialConnectionsAccountsAccountUnsubscribeResponseSchema = + FinancialConnectionsAccountSchema + export type PostFinancialConnectionsAccountsAccountUnsubscribeResponse = + z.infer< + typeof PostFinancialConnectionsAccountsAccountUnsubscribeResponseSchema + > + + export const PostFinancialConnectionsSessionsParamsSchema = z.object({}) + export type PostFinancialConnectionsSessionsParams = z.infer< + typeof PostFinancialConnectionsSessionsParamsSchema + > + + export const PostFinancialConnectionsSessionsResponseSchema = + FinancialConnectionsSessionSchema + export type PostFinancialConnectionsSessionsResponse = z.infer< + typeof PostFinancialConnectionsSessionsResponseSchema + > + + export const GetFinancialConnectionsSessionsSessionParamsSchema = z.object({ + session: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetFinancialConnectionsSessionsSessionParams = z.infer< + typeof GetFinancialConnectionsSessionsSessionParamsSchema + > + + export const GetFinancialConnectionsSessionsSessionResponseSchema = + FinancialConnectionsSessionSchema + export type GetFinancialConnectionsSessionsSessionResponse = z.infer< + typeof GetFinancialConnectionsSessionsSessionResponseSchema + > + + export const GetFinancialConnectionsTransactionsParamsSchema = z.object({ + /** The ID of the Financial Connections Account whose transactions will be retrieved. */ + account: z + .string() + .max(5000) + .describe( + 'The ID of the Financial Connections Account whose transactions will be retrieved.' + ), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: */ + transacted_at: 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() + ]) + .describe( + 'A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:' + ) + .optional(), + /** A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: */ + transaction_refresh: z + .object({ after: z.string().max(5000) }) + .describe( + 'A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:' + ) + .optional() + }) + export type GetFinancialConnectionsTransactionsParams = z.infer< + typeof GetFinancialConnectionsTransactionsParamsSchema + > + + export const GetFinancialConnectionsTransactionsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsTransactionSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/financial_connections/transactions')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetFinancialConnectionsTransactionsResponse = z.infer< + typeof GetFinancialConnectionsTransactionsResponseSchema + > + + export const GetFinancialConnectionsTransactionsTransactionParamsSchema = + z.object({ + transaction: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetFinancialConnectionsTransactionsTransactionParams = z.infer< + typeof GetFinancialConnectionsTransactionsTransactionParamsSchema + > + + export const GetFinancialConnectionsTransactionsTransactionResponseSchema = + FinancialConnectionsTransactionSchema + export type GetFinancialConnectionsTransactionsTransactionResponse = z.infer< + typeof GetFinancialConnectionsTransactionsTransactionResponseSchema + > + + export const GetForwardingRequestsParamsSchema = z.object({ + /** Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. */ + created: z + .object({ + gt: z.number().int().optional(), + gte: z.number().int().optional(), + lt: z.number().int().optional(), + lte: z.number().int().optional() + }) + .describe( + 'Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.' + ) + .optional(), + /** A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.' + ) + .optional() + }) + export type GetForwardingRequestsParams = z.infer< + typeof GetForwardingRequestsParamsSchema + > + + /** List of ForwardingRequest data. */ + export const GetForwardingRequestsResponseSchema = z + .object({ + data: z.array(ForwardingRequestSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + .describe('List of ForwardingRequest data.') + export type GetForwardingRequestsResponse = z.infer< + typeof GetForwardingRequestsResponseSchema + > + + export const PostForwardingRequestsParamsSchema = z.object({}) + export type PostForwardingRequestsParams = z.infer< + typeof PostForwardingRequestsParamsSchema + > + + export const PostForwardingRequestsResponseSchema = ForwardingRequestSchema + export type PostForwardingRequestsResponse = z.infer< + typeof PostForwardingRequestsResponseSchema + > + + export const GetForwardingRequestsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetForwardingRequestsIdParams = z.infer< + typeof GetForwardingRequestsIdParamsSchema + > + + export const GetForwardingRequestsIdResponseSchema = ForwardingRequestSchema + export type GetForwardingRequestsIdResponse = z.infer< + typeof GetForwardingRequestsIdResponseSchema + > + + export const GetIdentityVerificationReportsParamsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** Only return VerificationReports that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return VerificationReports that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return VerificationReports of this type */ + type: z + .enum(['document', 'id_number']) + .describe('Only return VerificationReports of this type') + .optional(), + /** Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. */ + verification_session: z + .string() + .max(5000) + .describe( + 'Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.' + ) + .optional() + }) + export type GetIdentityVerificationReportsParams = z.infer< + typeof GetIdentityVerificationReportsParamsSchema + > + + export const GetIdentityVerificationReportsResponseSchema = z.object({ + data: z.array(IdentityVerificationReportSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/identity/verification_reports')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIdentityVerificationReportsResponse = z.infer< + typeof GetIdentityVerificationReportsResponseSchema + > + + export const GetIdentityVerificationReportsReportParamsSchema = z.object({ + report: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIdentityVerificationReportsReportParams = z.infer< + typeof GetIdentityVerificationReportsReportParamsSchema + > + + export const GetIdentityVerificationReportsReportResponseSchema = + IdentityVerificationReportSchema + export type GetIdentityVerificationReportsReportResponse = z.infer< + typeof GetIdentityVerificationReportsReportResponseSchema + > + + export const GetIdentityVerificationSessionsParamsSchema = z.object({ + /** 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: z + .string() + .max(5000) + .describe( + '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.' + ) + .optional(), + /** Only return VerificationSessions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return VerificationSessions that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + related_customer: z.string().max(5000).optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). */ + status: z + .enum(['canceled', 'processing', 'requires_input', 'verified']) + .describe( + 'Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).' + ) + .optional() + }) + export type GetIdentityVerificationSessionsParams = z.infer< + typeof GetIdentityVerificationSessionsParamsSchema + > + + export const GetIdentityVerificationSessionsResponseSchema = z.object({ + data: z.array(IdentityVerificationSessionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/identity/verification_sessions')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIdentityVerificationSessionsResponse = z.infer< + typeof GetIdentityVerificationSessionsResponseSchema + > + + export const PostIdentityVerificationSessionsParamsSchema = z.object({}) + export type PostIdentityVerificationSessionsParams = z.infer< + typeof PostIdentityVerificationSessionsParamsSchema + > + + export const PostIdentityVerificationSessionsResponseSchema = + IdentityVerificationSessionSchema + export type PostIdentityVerificationSessionsResponse = z.infer< + typeof PostIdentityVerificationSessionsResponseSchema + > + + export const GetIdentityVerificationSessionsSessionParamsSchema = z.object({ + session: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIdentityVerificationSessionsSessionParams = z.infer< + typeof GetIdentityVerificationSessionsSessionParamsSchema + > + + export const GetIdentityVerificationSessionsSessionResponseSchema = + IdentityVerificationSessionSchema + export type GetIdentityVerificationSessionsSessionResponse = z.infer< + typeof GetIdentityVerificationSessionsSessionResponseSchema + > + + export const PostIdentityVerificationSessionsSessionParamsSchema = z.object({ + session: z.string().max(5000) + }) + export type PostIdentityVerificationSessionsSessionParams = z.infer< + typeof PostIdentityVerificationSessionsSessionParamsSchema + > + + export const PostIdentityVerificationSessionsSessionResponseSchema = + IdentityVerificationSessionSchema + export type PostIdentityVerificationSessionsSessionResponse = z.infer< + typeof PostIdentityVerificationSessionsSessionResponseSchema + > + + export const PostIdentityVerificationSessionsSessionCancelParamsSchema = + z.object({ session: z.string().max(5000) }) + export type PostIdentityVerificationSessionsSessionCancelParams = z.infer< + typeof PostIdentityVerificationSessionsSessionCancelParamsSchema + > + + export const PostIdentityVerificationSessionsSessionCancelResponseSchema = + IdentityVerificationSessionSchema + export type PostIdentityVerificationSessionsSessionCancelResponse = z.infer< + typeof PostIdentityVerificationSessionsSessionCancelResponseSchema + > + + export const PostIdentityVerificationSessionsSessionRedactParamsSchema = + z.object({ session: z.string().max(5000) }) + export type PostIdentityVerificationSessionsSessionRedactParams = z.infer< + typeof PostIdentityVerificationSessionsSessionRedactParamsSchema + > + + export const PostIdentityVerificationSessionsSessionRedactResponseSchema = + IdentityVerificationSessionSchema + export type PostIdentityVerificationSessionsSessionRedactResponse = z.infer< + typeof PostIdentityVerificationSessionsSessionRedactResponseSchema + > + + export const GetInvoiceRenderingTemplatesParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + status: z.enum(['active', 'archived']).optional() + }) + export type GetInvoiceRenderingTemplatesParams = z.infer< + typeof GetInvoiceRenderingTemplatesParamsSchema + > + + export const GetInvoiceRenderingTemplatesResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(InvoiceRenderingTemplateSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetInvoiceRenderingTemplatesResponse = z.infer< + typeof GetInvoiceRenderingTemplatesResponseSchema + > + + export const GetInvoiceRenderingTemplatesTemplateParamsSchema = z.object({ + template: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + version: z.number().int().optional() + }) + export type GetInvoiceRenderingTemplatesTemplateParams = z.infer< + typeof GetInvoiceRenderingTemplatesTemplateParamsSchema + > + + export const GetInvoiceRenderingTemplatesTemplateResponseSchema = + InvoiceRenderingTemplateSchema + export type GetInvoiceRenderingTemplatesTemplateResponse = z.infer< + typeof GetInvoiceRenderingTemplatesTemplateResponseSchema + > + + export const PostInvoiceRenderingTemplatesTemplateArchiveParamsSchema = + z.object({ template: z.string().max(5000) }) + export type PostInvoiceRenderingTemplatesTemplateArchiveParams = z.infer< + typeof PostInvoiceRenderingTemplatesTemplateArchiveParamsSchema + > + + export const PostInvoiceRenderingTemplatesTemplateArchiveResponseSchema = + InvoiceRenderingTemplateSchema + export type PostInvoiceRenderingTemplatesTemplateArchiveResponse = z.infer< + typeof PostInvoiceRenderingTemplatesTemplateArchiveResponseSchema + > + + export const PostInvoiceRenderingTemplatesTemplateUnarchiveParamsSchema = + z.object({ template: z.string().max(5000) }) + export type PostInvoiceRenderingTemplatesTemplateUnarchiveParams = z.infer< + typeof PostInvoiceRenderingTemplatesTemplateUnarchiveParamsSchema + > + + export const PostInvoiceRenderingTemplatesTemplateUnarchiveResponseSchema = + InvoiceRenderingTemplateSchema + export type PostInvoiceRenderingTemplatesTemplateUnarchiveResponse = z.infer< + typeof PostInvoiceRenderingTemplatesTemplateUnarchiveResponseSchema + > + + export const GetInvoiceitemsParamsSchema = z.object({ + /** Only return invoice items that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return invoice items that were created during the given date interval.' + ) + .optional(), + /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ + customer: z + .string() + .max(5000) + .describe( + 'The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. */ + invoice: z + .string() + .max(5000) + .describe( + 'Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. */ + pending: z + .boolean() + .describe( + 'Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetInvoiceitemsParams = z.infer< + typeof GetInvoiceitemsParamsSchema + > + + export const GetInvoiceitemsResponseSchema = z.object({ + data: z.array(InvoiceitemSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/invoiceitems')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetInvoiceitemsResponse = z.infer< + typeof GetInvoiceitemsResponseSchema + > + + export const PostInvoiceitemsParamsSchema = z.object({}) + export type PostInvoiceitemsParams = z.infer< + typeof PostInvoiceitemsParamsSchema + > + + export const PostInvoiceitemsResponseSchema = InvoiceitemSchema + export type PostInvoiceitemsResponse = z.infer< + typeof PostInvoiceitemsResponseSchema + > + + export const GetInvoiceitemsInvoiceitemParamsSchema = z.object({ + invoiceitem: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetInvoiceitemsInvoiceitemParams = z.infer< + typeof GetInvoiceitemsInvoiceitemParamsSchema + > + + export const GetInvoiceitemsInvoiceitemResponseSchema = InvoiceitemSchema + export type GetInvoiceitemsInvoiceitemResponse = z.infer< + typeof GetInvoiceitemsInvoiceitemResponseSchema + > + + export const PostInvoiceitemsInvoiceitemParamsSchema = z.object({ + invoiceitem: z.string().max(5000) + }) + export type PostInvoiceitemsInvoiceitemParams = z.infer< + typeof PostInvoiceitemsInvoiceitemParamsSchema + > + + export const PostInvoiceitemsInvoiceitemResponseSchema = InvoiceitemSchema + export type PostInvoiceitemsInvoiceitemResponse = z.infer< + typeof PostInvoiceitemsInvoiceitemResponseSchema + > + + export const DeleteInvoiceitemsInvoiceitemParamsSchema = z.object({ + invoiceitem: z.string().max(5000) + }) + export type DeleteInvoiceitemsInvoiceitemParams = z.infer< + typeof DeleteInvoiceitemsInvoiceitemParamsSchema + > + + export const DeleteInvoiceitemsInvoiceitemResponseSchema = + DeletedInvoiceitemSchema + export type DeleteInvoiceitemsInvoiceitemResponse = z.infer< + typeof DeleteInvoiceitemsInvoiceitemResponseSchema + > + + export const GetInvoicesParamsSchema = z.object({ + /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method: z + .enum(['charge_automatically', 'send_invoice']) + .describe( + 'The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.' + ) + .optional(), + /** Only return invoices that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return invoices that were created during the given date interval.' + ) + .optional(), + /** Only return invoices for the customer specified by this customer ID. */ + customer: z + .string() + .max(5000) + .describe( + 'Only return invoices for the customer specified by this customer ID.' + ) + .optional(), + due_date: 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(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** 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: z + .enum(['draft', 'open', 'paid', 'uncollectible', 'void']) + .describe( + 'The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)' + ) + .optional(), + /** Only return invoices for the subscription specified by this subscription ID. */ + subscription: z + .string() + .max(5000) + .describe( + 'Only return invoices for the subscription specified by this subscription ID.' + ) + .optional() + }) + export type GetInvoicesParams = z.infer + + export const GetInvoicesResponseSchema = z.object({ + data: z.array(InvoiceSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/invoices')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetInvoicesResponse = z.infer + + export const PostInvoicesParamsSchema = z.object({}) + export type PostInvoicesParams = z.infer + + export const PostInvoicesResponseSchema = InvoiceSchema + export type PostInvoicesResponse = z.infer + + export const PostInvoicesCreatePreviewParamsSchema = z.object({}) + export type PostInvoicesCreatePreviewParams = z.infer< + typeof PostInvoicesCreatePreviewParamsSchema + > + + export const PostInvoicesCreatePreviewResponseSchema = InvoiceSchema + export type PostInvoicesCreatePreviewResponse = z.infer< + typeof PostInvoicesCreatePreviewResponseSchema + > + + export const GetInvoicesSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).' + ) + }) + export type GetInvoicesSearchParams = z.infer< + typeof GetInvoicesSearchParamsSchema + > + + export const GetInvoicesSearchResponseSchema = z.object({ + data: z.array(InvoiceSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetInvoicesSearchResponse = z.infer< + typeof GetInvoicesSearchResponseSchema + > + + export const GetInvoicesUpcomingParamsSchema = z.object({ + /** Settings for automatic tax lookup for this invoice preview. */ + automatic_tax: z + .object({ + enabled: z.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .optional() + }) + .describe('Settings for automatic tax lookup for this invoice preview.') + .optional(), + /** The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. */ + coupon: z + .string() + .max(5000) + .describe( + 'The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.' + ) + .optional(), + /** The currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency: z + .string() + .describe( + 'The currency to preview this invoice in. Defaults to that of `customer` if not specified.' + ) + .optional(), + /** The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. */ + customer: z + .string() + .max(5000) + .describe( + "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set." + ) + .optional(), + /** Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. */ + customer_details: z + .object({ + address: z + .union([ + z.object({ + city: z.string().max(5000).optional(), + country: z.string().max(5000).optional(), + line1: z.string().max(5000).optional(), + line2: z.string().max(5000).optional(), + postal_code: z.string().max(5000).optional(), + state: z.string().max(5000).optional() + }), + z.literal('') + ]) + .optional(), + shipping: z + .union([ + z.object({ + address: z.object({ + city: z.string().max(5000).optional(), + country: z.string().max(5000).optional(), + line1: z.string().max(5000).optional(), + line2: z.string().max(5000).optional(), + postal_code: z.string().max(5000).optional(), + state: z.string().max(5000).optional() + }), + name: z.string().max(5000), + phone: z.string().max(5000).optional() + }), + z.literal('') + ]) + .optional(), + tax: z + .object({ + ip_address: z.union([z.string(), z.literal('')]).optional() + }) + .optional(), + tax_exempt: z.enum(['', 'exempt', 'none', 'reverse']).optional(), + tax_ids: z + .array( + z.object({ + type: z.enum([ + 'ad_nrt', + 'ae_trn', + 'al_tin', + 'am_tin', + 'ao_tin', + 'ar_cuit', + 'au_abn', + 'au_arn', + 'ba_tin', + 'bb_tin', + 'bg_uic', + 'bh_vat', + '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', + 'cn_tin', + 'co_nit', + 'cr_tin', + 'de_stn', + 'do_rcn', + 'ec_ruc', + 'eg_tin', + 'es_cif', + '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', + 'kh_tin', + 'kr_brn', + 'kz_bin', + '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', + 'zw_tin' + ]), + value: z.string() + }) + ) + .optional() + }) + .describe( + 'Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.' + ) + .optional(), + /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. */ + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .describe( + 'The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** List of invoice items to add or update in the upcoming invoice preview (up to 250). */ + invoice_items: z + .array( + z.object({ + amount: z.number().int().optional(), + currency: z.string().optional(), + description: z.string().max(5000).optional(), + discountable: z.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + invoiceitem: z.string().max(5000).optional(), + metadata: z.union([z.record(z.string()), z.literal('')]).optional(), + period: z + .object({ end: z.number().int(), start: z.number().int() }) + .optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + tax_code: z.union([z.string(), z.literal('')]).optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + ) + .describe( + 'List of invoice items to add or update in the upcoming invoice preview (up to 250).' + ) + .optional(), + /** The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. */ + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .describe( + 'The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.' + ) + .optional(), + /** 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: z + .union([z.string(), z.literal('')]) + .describe( + '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.' + ) + .optional(), + /** Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. */ + preview_mode: z + .enum(['next', 'recurring']) + .describe( + 'Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.' + ) + .optional(), + /** The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ + schedule: z + .string() + .max(5000) + .describe( + "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields." + ) + .optional(), + /** The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. */ + schedule_details: z + .object({ + end_behavior: z.enum(['cancel', 'release']).optional(), + phases: z + .array( + z.object({ + add_invoice_items: z + .array( + z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ) + .optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ) + .optional(), + application_fee_percent: z.number().optional(), + automatic_tax: z + .object({ + enabled: z.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .optional() + }) + .optional(), + billing_cycle_anchor: z + .enum(['automatic', 'phase_start']) + .optional(), + billing_thresholds: z + .union([ + z.object({ + amount_gte: z.number().int().optional(), + reset_billing_cycle_anchor: z.boolean().optional() + }), + z.literal('') + ]) + .optional(), + collection_method: z + .enum(['charge_automatically', 'send_invoice']) + .optional(), + coupon: z.string().max(5000).optional(), + default_payment_method: z.string().max(5000).optional(), + default_tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + description: z + .union([z.string().max(500), z.literal('')]) + .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + end_date: z + .union([z.number().int(), z.literal('now')]) + .optional(), + invoice_settings: z + .object({ + account_tax_ids: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + days_until_due: z.number().int().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .optional() + }) + .optional(), + items: z.array( + z.object({ + billing_thresholds: z + .union([ + z.object({ usage_gte: z.number().int() }), + z.literal('') + ]) + .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + metadata: z.record(z.string()).optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + recurring: z.object({ + interval: z.enum(['day', 'month', 'week', 'year']), + interval_count: z.number().int().optional() + }), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ), + iterations: z.number().int().optional(), + metadata: z.record(z.string()).optional(), + on_behalf_of: z.string().optional(), + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .optional(), + start_date: z + .union([z.number().int(), z.literal('now')]) + .optional(), + transfer_data: z + .object({ + amount_percent: z.number().optional(), + destination: z.string() + }) + .optional(), + trial: z.boolean().optional(), + trial_end: z + .union([z.number().int(), z.literal('now')]) + .optional() + }) + ) + .optional(), + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .optional() + }) + .describe( + 'The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.' + ) + .optional(), + /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ + subscription: z + .string() + .max(5000) + .describe( + "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions." + ) + .optional(), + /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. */ + subscription_billing_cycle_anchor: z + .union([z.enum(['now', 'unchanged']), z.number().int()]) + .describe( + "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead." + ) + .optional(), + /** A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. */ + subscription_cancel_at: z + .union([z.number().int(), z.literal('')]) + .describe( + 'A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.' + ) + .optional(), + /** Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. */ + subscription_cancel_at_period_end: z + .boolean() + .describe( + 'Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.' + ) + .optional(), + /** This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. */ + subscription_cancel_now: z + .boolean() + .describe( + 'This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.' + ) + .optional(), + /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. */ + subscription_default_tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .describe( + 'If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.' + ) + .optional(), + /** The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. */ + subscription_details: z + .object({ + billing_cycle_anchor: z + .union([z.enum(['now', 'unchanged']), z.number().int()]) + .optional(), + cancel_at: z.union([z.number().int(), z.literal('')]).optional(), + cancel_at_period_end: z.boolean().optional(), + cancel_now: z.boolean().optional(), + default_tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + items: z + .array( + z.object({ + billing_thresholds: z + .union([ + z.object({ usage_gte: z.number().int() }), + z.literal('') + ]) + .optional(), + clear_usage: z.boolean().optional(), + deleted: z.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + id: z.string().max(5000).optional(), + metadata: z + .union([z.record(z.string()), z.literal('')]) + .optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + recurring: z.object({ + interval: z.enum(['day', 'month', 'week', 'year']), + interval_count: z.number().int().optional() + }), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ) + .optional(), + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .optional(), + proration_date: z.number().int().optional(), + resume_at: z.literal('now').optional(), + start_date: z.number().int().optional(), + trial_end: z.union([z.literal('now'), z.number().int()]).optional() + }) + .describe( + 'The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.' + ) + .optional(), + /** A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. */ + subscription_items: z + .array( + z.object({ + billing_thresholds: z + .union([z.object({ usage_gte: z.number().int() }), z.literal('')]) + .optional(), + clear_usage: z.boolean().optional(), + deleted: z.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + id: z.string().max(5000).optional(), + metadata: z.union([z.record(z.string()), z.literal('')]).optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + recurring: z.object({ + interval: z.enum(['day', 'month', 'week', 'year']), + interval_count: z.number().int().optional() + }), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ) + .describe( + 'A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.' + ) + .optional(), + /** Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. */ + subscription_proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .describe( + "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead." + ) + .optional(), + /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. */ + subscription_proration_date: z + .number() + .int() + .describe( + "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead." + ) + .optional(), + /** For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. */ + subscription_resume_at: z + .literal('now') + .describe( + 'For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.' + ) + .optional(), + /** Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. */ + subscription_start_date: z + .number() + .int() + .describe( + 'Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.' + ) + .optional(), + /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. */ + subscription_trial_end: z + .union([z.literal('now'), z.number().int()]) + .describe( + 'If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.' + ) + .optional() + }) + export type GetInvoicesUpcomingParams = z.infer< + typeof GetInvoicesUpcomingParamsSchema + > + + export const GetInvoicesUpcomingResponseSchema = InvoiceSchema + export type GetInvoicesUpcomingResponse = z.infer< + typeof GetInvoicesUpcomingResponseSchema + > + + export const GetInvoicesUpcomingLinesParamsSchema = z.object({ + /** Settings for automatic tax lookup for this invoice preview. */ + automatic_tax: z + .object({ + enabled: z.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .optional() + }) + .describe('Settings for automatic tax lookup for this invoice preview.') + .optional(), + /** The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. */ + coupon: z + .string() + .max(5000) + .describe( + 'The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.' + ) + .optional(), + /** The currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency: z + .string() + .describe( + 'The currency to preview this invoice in. Defaults to that of `customer` if not specified.' + ) + .optional(), + /** The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. */ + customer: z + .string() + .max(5000) + .describe( + "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set." + ) + .optional(), + /** Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. */ + customer_details: z + .object({ + address: z + .union([ + z.object({ + city: z.string().max(5000).optional(), + country: z.string().max(5000).optional(), + line1: z.string().max(5000).optional(), + line2: z.string().max(5000).optional(), + postal_code: z.string().max(5000).optional(), + state: z.string().max(5000).optional() + }), + z.literal('') + ]) + .optional(), + shipping: z + .union([ + z.object({ + address: z.object({ + city: z.string().max(5000).optional(), + country: z.string().max(5000).optional(), + line1: z.string().max(5000).optional(), + line2: z.string().max(5000).optional(), + postal_code: z.string().max(5000).optional(), + state: z.string().max(5000).optional() + }), + name: z.string().max(5000), + phone: z.string().max(5000).optional() + }), + z.literal('') + ]) + .optional(), + tax: z + .object({ + ip_address: z.union([z.string(), z.literal('')]).optional() + }) + .optional(), + tax_exempt: z.enum(['', 'exempt', 'none', 'reverse']).optional(), + tax_ids: z + .array( + z.object({ + type: z.enum([ + 'ad_nrt', + 'ae_trn', + 'al_tin', + 'am_tin', + 'ao_tin', + 'ar_cuit', + 'au_abn', + 'au_arn', + 'ba_tin', + 'bb_tin', + 'bg_uic', + 'bh_vat', + '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', + 'cn_tin', + 'co_nit', + 'cr_tin', + 'de_stn', + 'do_rcn', + 'ec_ruc', + 'eg_tin', + 'es_cif', + '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', + 'kh_tin', + 'kr_brn', + 'kz_bin', + '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', + 'zw_tin' + ]), + value: z.string() + }) + ) + .optional() + }) + .describe( + 'Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.' + ) + .optional(), + /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. */ + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .describe( + 'The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** List of invoice items to add or update in the upcoming invoice preview (up to 250). */ + invoice_items: z + .array( + z.object({ + amount: z.number().int().optional(), + currency: z.string().optional(), + description: z.string().max(5000).optional(), + discountable: z.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + invoiceitem: z.string().max(5000).optional(), + metadata: z.union([z.record(z.string()), z.literal('')]).optional(), + period: z + .object({ end: z.number().int(), start: z.number().int() }) + .optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + tax_code: z.union([z.string(), z.literal('')]).optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + ) + .describe( + 'List of invoice items to add or update in the upcoming invoice preview (up to 250).' + ) + .optional(), + /** The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. */ + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .describe( + 'The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** 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: z + .union([z.string(), z.literal('')]) + .describe( + '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.' + ) + .optional(), + /** Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. */ + preview_mode: z + .enum(['next', 'recurring']) + .describe( + 'Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.' + ) + .optional(), + /** The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ + schedule: z + .string() + .max(5000) + .describe( + "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields." + ) + .optional(), + /** The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. */ + schedule_details: z + .object({ + end_behavior: z.enum(['cancel', 'release']).optional(), + phases: z + .array( + z.object({ + add_invoice_items: z + .array( + z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ) + .optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ) + .optional(), + application_fee_percent: z.number().optional(), + automatic_tax: z + .object({ + enabled: z.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .optional() + }) + .optional(), + billing_cycle_anchor: z + .enum(['automatic', 'phase_start']) + .optional(), + billing_thresholds: z + .union([ + z.object({ + amount_gte: z.number().int().optional(), + reset_billing_cycle_anchor: z.boolean().optional() + }), + z.literal('') + ]) + .optional(), + collection_method: z + .enum(['charge_automatically', 'send_invoice']) + .optional(), + coupon: z.string().max(5000).optional(), + default_payment_method: z.string().max(5000).optional(), + default_tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + description: z + .union([z.string().max(500), z.literal('')]) + .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + end_date: z + .union([z.number().int(), z.literal('now')]) + .optional(), + invoice_settings: z + .object({ + account_tax_ids: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + days_until_due: z.number().int().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(['account', 'self']) + }) + .optional() + }) + .optional(), + items: z.array( + z.object({ + billing_thresholds: z + .union([ + z.object({ usage_gte: z.number().int() }), + z.literal('') + ]) + .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + metadata: z.record(z.string()).optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + recurring: z.object({ + interval: z.enum(['day', 'month', 'week', 'year']), + interval_count: z.number().int().optional() + }), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ), + iterations: z.number().int().optional(), + metadata: z.record(z.string()).optional(), + on_behalf_of: z.string().optional(), + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .optional(), + start_date: z + .union([z.number().int(), z.literal('now')]) + .optional(), + transfer_data: z + .object({ + amount_percent: z.number().optional(), + destination: z.string() + }) + .optional(), + trial: z.boolean().optional(), + trial_end: z + .union([z.number().int(), z.literal('now')]) + .optional() + }) + ) + .optional(), + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .optional() + }) + .describe( + 'The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ + subscription: z + .string() + .max(5000) + .describe( + "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions." + ) + .optional(), + /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. */ + subscription_billing_cycle_anchor: z + .union([z.enum(['now', 'unchanged']), z.number().int()]) + .describe( + "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead." + ) + .optional(), + /** A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. */ + subscription_cancel_at: z + .union([z.number().int(), z.literal('')]) + .describe( + 'A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.' + ) + .optional(), + /** Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. */ + subscription_cancel_at_period_end: z + .boolean() + .describe( + 'Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.' + ) + .optional(), + /** This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. */ + subscription_cancel_now: z + .boolean() + .describe( + 'This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.' + ) + .optional(), + /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. */ + subscription_default_tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .describe( + 'If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.' + ) + .optional(), + /** The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. */ + subscription_details: z + .object({ + billing_cycle_anchor: z + .union([z.enum(['now', 'unchanged']), z.number().int()]) + .optional(), + cancel_at: z.union([z.number().int(), z.literal('')]).optional(), + cancel_at_period_end: z.boolean().optional(), + cancel_now: z.boolean().optional(), + default_tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional(), + items: z + .array( + z.object({ + billing_thresholds: z + .union([ + z.object({ usage_gte: z.number().int() }), + z.literal('') + ]) + .optional(), + clear_usage: z.boolean().optional(), + deleted: z.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + id: z.string().max(5000).optional(), + metadata: z + .union([z.record(z.string()), z.literal('')]) + .optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + recurring: z.object({ + interval: z.enum(['day', 'month', 'week', 'year']), + interval_count: z.number().int().optional() + }), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ) + .optional(), + proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .optional(), + proration_date: z.number().int().optional(), + resume_at: z.literal('now').optional(), + start_date: z.number().int().optional(), + trial_end: z.union([z.literal('now'), z.number().int()]).optional() + }) + .describe( + 'The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.' + ) + .optional(), + /** A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. */ + subscription_items: z + .array( + z.object({ + billing_thresholds: z + .union([z.object({ usage_gte: z.number().int() }), z.literal('')]) + .optional(), + clear_usage: z.boolean().optional(), + deleted: z.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().max(5000).optional(), + discount: z.string().max(5000).optional(), + promotion_code: z.string().max(5000).optional() + }) + ), + z.literal('') + ]) + .optional(), + id: z.string().max(5000).optional(), + metadata: z.union([z.record(z.string()), z.literal('')]).optional(), + price: z.string().max(5000).optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().max(5000), + recurring: z.object({ + interval: z.enum(['day', 'month', 'week', 'year']), + interval_count: z.number().int().optional() + }), + tax_behavior: z + .enum(['exclusive', 'inclusive', 'unspecified']) + .optional(), + unit_amount: z.number().int().optional(), + unit_amount_decimal: z.string().optional() + }) + .optional(), + quantity: z.number().int().optional(), + tax_rates: z + .union([z.array(z.string().max(5000)), z.literal('')]) + .optional() + }) + ) + .describe( + 'A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.' + ) + .optional(), + /** Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. */ + subscription_proration_behavior: z + .enum(['always_invoice', 'create_prorations', 'none']) + .describe( + "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead." + ) + .optional(), + /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. */ + subscription_proration_date: z + .number() + .int() + .describe( + "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead." + ) + .optional(), + /** For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. */ + subscription_resume_at: z + .literal('now') + .describe( + 'For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.' + ) + .optional(), + /** Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. */ + subscription_start_date: z + .number() + .int() + .describe( + 'Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.' + ) + .optional(), + /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. */ + subscription_trial_end: z + .union([z.literal('now'), z.number().int()]) + .describe( + 'If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.' + ) + .optional() + }) + export type GetInvoicesUpcomingLinesParams = z.infer< + typeof GetInvoicesUpcomingLinesParamsSchema + > + + export const GetInvoicesUpcomingLinesResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(LineItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetInvoicesUpcomingLinesResponse = z.infer< + typeof GetInvoicesUpcomingLinesResponseSchema + > + + export const GetInvoicesInvoiceParamsSchema = z.object({ + invoice: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetInvoicesInvoiceParams = z.infer< + typeof GetInvoicesInvoiceParamsSchema + > + + export const GetInvoicesInvoiceResponseSchema = InvoiceSchema + export type GetInvoicesInvoiceResponse = z.infer< + typeof GetInvoicesInvoiceResponseSchema + > + + export const PostInvoicesInvoiceParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceParams = z.infer< + typeof PostInvoicesInvoiceParamsSchema + > + + export const PostInvoicesInvoiceResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceResponse = z.infer< + typeof PostInvoicesInvoiceResponseSchema + > + + export const DeleteInvoicesInvoiceParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type DeleteInvoicesInvoiceParams = z.infer< + typeof DeleteInvoicesInvoiceParamsSchema + > + + export const DeleteInvoicesInvoiceResponseSchema = DeletedInvoiceSchema + export type DeleteInvoicesInvoiceResponse = z.infer< + typeof DeleteInvoicesInvoiceResponseSchema + > + + export const PostInvoicesInvoiceAddLinesParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceAddLinesParams = z.infer< + typeof PostInvoicesInvoiceAddLinesParamsSchema + > + + export const PostInvoicesInvoiceAddLinesResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceAddLinesResponse = z.infer< + typeof PostInvoicesInvoiceAddLinesResponseSchema + > + + export const PostInvoicesInvoiceFinalizeParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceFinalizeParams = z.infer< + typeof PostInvoicesInvoiceFinalizeParamsSchema + > + + export const PostInvoicesInvoiceFinalizeResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceFinalizeResponse = z.infer< + typeof PostInvoicesInvoiceFinalizeResponseSchema + > + + export const GetInvoicesInvoiceLinesParamsSchema = z.object({ + invoice: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetInvoicesInvoiceLinesParams = z.infer< + typeof GetInvoicesInvoiceLinesParamsSchema + > + + export const GetInvoicesInvoiceLinesResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(LineItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetInvoicesInvoiceLinesResponse = z.infer< + typeof GetInvoicesInvoiceLinesResponseSchema + > + + export const PostInvoicesInvoiceLinesLineItemIdParamsSchema = z.object({ + /** Invoice ID of line item */ + invoice: z.string().max(5000).describe('Invoice ID of line item'), + /** Invoice line item ID */ + line_item_id: z.string().max(5000).describe('Invoice line item ID') + }) + export type PostInvoicesInvoiceLinesLineItemIdParams = z.infer< + typeof PostInvoicesInvoiceLinesLineItemIdParamsSchema + > + + export const PostInvoicesInvoiceLinesLineItemIdResponseSchema = LineItemSchema + export type PostInvoicesInvoiceLinesLineItemIdResponse = z.infer< + typeof PostInvoicesInvoiceLinesLineItemIdResponseSchema + > + + export const PostInvoicesInvoiceMarkUncollectibleParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceMarkUncollectibleParams = z.infer< + typeof PostInvoicesInvoiceMarkUncollectibleParamsSchema + > + + export const PostInvoicesInvoiceMarkUncollectibleResponseSchema = + InvoiceSchema + export type PostInvoicesInvoiceMarkUncollectibleResponse = z.infer< + typeof PostInvoicesInvoiceMarkUncollectibleResponseSchema + > + + export const PostInvoicesInvoicePayParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoicePayParams = z.infer< + typeof PostInvoicesInvoicePayParamsSchema + > + + export const PostInvoicesInvoicePayResponseSchema = InvoiceSchema + export type PostInvoicesInvoicePayResponse = z.infer< + typeof PostInvoicesInvoicePayResponseSchema + > + + export const PostInvoicesInvoiceRemoveLinesParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceRemoveLinesParams = z.infer< + typeof PostInvoicesInvoiceRemoveLinesParamsSchema + > + + export const PostInvoicesInvoiceRemoveLinesResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceRemoveLinesResponse = z.infer< + typeof PostInvoicesInvoiceRemoveLinesResponseSchema + > + + export const PostInvoicesInvoiceSendParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceSendParams = z.infer< + typeof PostInvoicesInvoiceSendParamsSchema + > + + export const PostInvoicesInvoiceSendResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceSendResponse = z.infer< + typeof PostInvoicesInvoiceSendResponseSchema + > + + export const PostInvoicesInvoiceUpdateLinesParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceUpdateLinesParams = z.infer< + typeof PostInvoicesInvoiceUpdateLinesParamsSchema + > + + export const PostInvoicesInvoiceUpdateLinesResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceUpdateLinesResponse = z.infer< + typeof PostInvoicesInvoiceUpdateLinesResponseSchema + > + + export const PostInvoicesInvoiceVoidParamsSchema = z.object({ + invoice: z.string().max(5000) + }) + export type PostInvoicesInvoiceVoidParams = z.infer< + typeof PostInvoicesInvoiceVoidParamsSchema + > + + export const PostInvoicesInvoiceVoidResponseSchema = InvoiceSchema + export type PostInvoicesInvoiceVoidResponse = z.infer< + typeof PostInvoicesInvoiceVoidResponseSchema + > + + export const GetIssuingAuthorizationsParamsSchema = z.object({ + /** Only return authorizations that belong to the given card. */ + card: z + .string() + .max(5000) + .describe('Only return authorizations that belong to the given card.') + .optional(), + /** Only return authorizations that belong to the given cardholder. */ + cardholder: z + .string() + .max(5000) + .describe( + 'Only return authorizations that belong to the given cardholder.' + ) + .optional(), + /** Only return authorizations that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return authorizations that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. */ + status: z + .enum(['closed', 'pending', 'reversed']) + .describe( + 'Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.' + ) + .optional() + }) + export type GetIssuingAuthorizationsParams = z.infer< + typeof GetIssuingAuthorizationsParamsSchema + > + + export const GetIssuingAuthorizationsResponseSchema = z.object({ + data: z.array(IssuingAuthorizationSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/authorizations')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingAuthorizationsResponse = z.infer< + typeof GetIssuingAuthorizationsResponseSchema + > + + export const GetIssuingAuthorizationsAuthorizationParamsSchema = z.object({ + authorization: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingAuthorizationsAuthorizationParams = z.infer< + typeof GetIssuingAuthorizationsAuthorizationParamsSchema + > + + export const GetIssuingAuthorizationsAuthorizationResponseSchema = + IssuingAuthorizationSchema + export type GetIssuingAuthorizationsAuthorizationResponse = z.infer< + typeof GetIssuingAuthorizationsAuthorizationResponseSchema + > + + export const PostIssuingAuthorizationsAuthorizationParamsSchema = z.object({ + authorization: z.string().max(5000) + }) + export type PostIssuingAuthorizationsAuthorizationParams = z.infer< + typeof PostIssuingAuthorizationsAuthorizationParamsSchema + > + + export const PostIssuingAuthorizationsAuthorizationResponseSchema = + IssuingAuthorizationSchema + export type PostIssuingAuthorizationsAuthorizationResponse = z.infer< + typeof PostIssuingAuthorizationsAuthorizationResponseSchema + > + + export const PostIssuingAuthorizationsAuthorizationApproveParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostIssuingAuthorizationsAuthorizationApproveParams = z.infer< + typeof PostIssuingAuthorizationsAuthorizationApproveParamsSchema + > + + export const PostIssuingAuthorizationsAuthorizationApproveResponseSchema = + IssuingAuthorizationSchema + export type PostIssuingAuthorizationsAuthorizationApproveResponse = z.infer< + typeof PostIssuingAuthorizationsAuthorizationApproveResponseSchema + > + + export const PostIssuingAuthorizationsAuthorizationDeclineParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostIssuingAuthorizationsAuthorizationDeclineParams = z.infer< + typeof PostIssuingAuthorizationsAuthorizationDeclineParamsSchema + > + + export const PostIssuingAuthorizationsAuthorizationDeclineResponseSchema = + IssuingAuthorizationSchema + export type PostIssuingAuthorizationsAuthorizationDeclineResponse = z.infer< + typeof PostIssuingAuthorizationsAuthorizationDeclineResponseSchema + > + + export const GetIssuingCardholdersParamsSchema = z.object({ + /** Only return cardholders that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return cardholders that were created during the given date interval.' + ) + .optional(), + /** Only return cardholders that have the given email address. */ + email: z + .string() + .describe('Only return cardholders that have the given email address.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return cardholders that have the given phone number. */ + phone_number: z + .string() + .describe('Only return cardholders that have the given phone number.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. */ + status: z + .enum(['active', 'blocked', 'inactive']) + .describe( + 'Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.' + ) + .optional(), + /** Only return cardholders that have the given type. One of `individual` or `company`. */ + type: z + .enum(['company', 'individual']) + .describe( + 'Only return cardholders that have the given type. One of `individual` or `company`.' + ) + .optional() + }) + export type GetIssuingCardholdersParams = z.infer< + typeof GetIssuingCardholdersParamsSchema + > + + export const GetIssuingCardholdersResponseSchema = z.object({ + data: z.array(IssuingCardholderSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/cardholders')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingCardholdersResponse = z.infer< + typeof GetIssuingCardholdersResponseSchema + > + + export const PostIssuingCardholdersParamsSchema = z.object({}) + export type PostIssuingCardholdersParams = z.infer< + typeof PostIssuingCardholdersParamsSchema + > + + export const PostIssuingCardholdersResponseSchema = IssuingCardholderSchema + export type PostIssuingCardholdersResponse = z.infer< + typeof PostIssuingCardholdersResponseSchema + > + + export const GetIssuingCardholdersCardholderParamsSchema = z.object({ + cardholder: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingCardholdersCardholderParams = z.infer< + typeof GetIssuingCardholdersCardholderParamsSchema + > + + export const GetIssuingCardholdersCardholderResponseSchema = + IssuingCardholderSchema + export type GetIssuingCardholdersCardholderResponse = z.infer< + typeof GetIssuingCardholdersCardholderResponseSchema + > + + export const PostIssuingCardholdersCardholderParamsSchema = z.object({ + cardholder: z.string().max(5000) + }) + export type PostIssuingCardholdersCardholderParams = z.infer< + typeof PostIssuingCardholdersCardholderParamsSchema + > + + export const PostIssuingCardholdersCardholderResponseSchema = + IssuingCardholderSchema + export type PostIssuingCardholdersCardholderResponse = z.infer< + typeof PostIssuingCardholdersCardholderResponseSchema + > + + export const GetIssuingCardsParamsSchema = z.object({ + /** Only return cards belonging to the Cardholder with the provided ID. */ + cardholder: z + .string() + .max(5000) + .describe( + 'Only return cards belonging to the Cardholder with the provided ID.' + ) + .optional(), + /** Only return cards that were issued during the given date interval. */ + 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() + ]) + .describe( + 'Only return cards that were issued during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Only return cards that have the given expiration month. */ + exp_month: z + .number() + .int() + .describe('Only return cards that have the given expiration month.') + .optional(), + /** Only return cards that have the given expiration year. */ + exp_year: z + .number() + .int() + .describe('Only return cards that have the given expiration year.') + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Only return cards that have the given last four digits. */ + last4: z + .string() + .max(5000) + .describe('Only return cards that have the given last four digits.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + personalization_design: z.string().max(5000).optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ + status: z + .enum(['active', 'canceled', 'inactive']) + .describe( + 'Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.' + ) + .optional(), + /** Only return cards that have the given type. One of `virtual` or `physical`. */ + type: z + .enum(['physical', 'virtual']) + .describe( + 'Only return cards that have the given type. One of `virtual` or `physical`.' + ) + .optional() + }) + export type GetIssuingCardsParams = z.infer< + typeof GetIssuingCardsParamsSchema + > + + export const GetIssuingCardsResponseSchema = z.object({ + data: z.array(IssuingCardSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/cards')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingCardsResponse = z.infer< + typeof GetIssuingCardsResponseSchema + > + + export const PostIssuingCardsParamsSchema = z.object({}) + export type PostIssuingCardsParams = z.infer< + typeof PostIssuingCardsParamsSchema + > + + export const PostIssuingCardsResponseSchema = IssuingCardSchema + export type PostIssuingCardsResponse = z.infer< + typeof PostIssuingCardsResponseSchema + > + + export const GetIssuingCardsCardParamsSchema = z.object({ + card: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingCardsCardParams = z.infer< + typeof GetIssuingCardsCardParamsSchema + > + + export const GetIssuingCardsCardResponseSchema = IssuingCardSchema + export type GetIssuingCardsCardResponse = z.infer< + typeof GetIssuingCardsCardResponseSchema + > + + export const PostIssuingCardsCardParamsSchema = z.object({ + card: z.string().max(5000) + }) + export type PostIssuingCardsCardParams = z.infer< + typeof PostIssuingCardsCardParamsSchema + > + + export const PostIssuingCardsCardResponseSchema = IssuingCardSchema + export type PostIssuingCardsCardResponse = z.infer< + typeof PostIssuingCardsCardResponseSchema + > + + export const GetIssuingDisputesParamsSchema = z.object({ + /** Only return Issuing disputes that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return Issuing disputes that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Select Issuing disputes with the given status. */ + status: z + .enum(['expired', 'lost', 'submitted', 'unsubmitted', 'won']) + .describe('Select Issuing disputes with the given status.') + .optional(), + /** Select the Issuing dispute for the given transaction. */ + transaction: z + .string() + .max(5000) + .describe('Select the Issuing dispute for the given transaction.') + .optional() + }) + export type GetIssuingDisputesParams = z.infer< + typeof GetIssuingDisputesParamsSchema + > + + export const GetIssuingDisputesResponseSchema = z.object({ + data: z.array(IssuingDisputeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/disputes')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingDisputesResponse = z.infer< + typeof GetIssuingDisputesResponseSchema + > + + export const PostIssuingDisputesParamsSchema = z.object({}) + export type PostIssuingDisputesParams = z.infer< + typeof PostIssuingDisputesParamsSchema + > + + export const PostIssuingDisputesResponseSchema = IssuingDisputeSchema + export type PostIssuingDisputesResponse = z.infer< + typeof PostIssuingDisputesResponseSchema + > + + export const GetIssuingDisputesDisputeParamsSchema = z.object({ + dispute: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingDisputesDisputeParams = z.infer< + typeof GetIssuingDisputesDisputeParamsSchema + > + + export const GetIssuingDisputesDisputeResponseSchema = IssuingDisputeSchema + export type GetIssuingDisputesDisputeResponse = z.infer< + typeof GetIssuingDisputesDisputeResponseSchema + > + + export const PostIssuingDisputesDisputeParamsSchema = z.object({ + dispute: z.string().max(5000) + }) + export type PostIssuingDisputesDisputeParams = z.infer< + typeof PostIssuingDisputesDisputeParamsSchema + > + + export const PostIssuingDisputesDisputeResponseSchema = IssuingDisputeSchema + export type PostIssuingDisputesDisputeResponse = z.infer< + typeof PostIssuingDisputesDisputeResponseSchema + > + + export const PostIssuingDisputesDisputeSubmitParamsSchema = z.object({ + dispute: z.string().max(5000) + }) + export type PostIssuingDisputesDisputeSubmitParams = z.infer< + typeof PostIssuingDisputesDisputeSubmitParamsSchema + > + + export const PostIssuingDisputesDisputeSubmitResponseSchema = + IssuingDisputeSchema + export type PostIssuingDisputesDisputeSubmitResponse = z.infer< + typeof PostIssuingDisputesDisputeSubmitResponseSchema + > + + export const GetIssuingPersonalizationDesignsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return personalization designs with the given lookup keys. */ + lookup_keys: z + .array(z.string().max(200)) + .describe( + 'Only return personalization designs with the given lookup keys.' + ) + .optional(), + /** Only return personalization designs with the given preferences. */ + preferences: z + .object({ + is_default: z.boolean().optional(), + is_platform_default: z.boolean().optional() + }) + .describe( + 'Only return personalization designs with the given preferences.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return personalization designs with the given status. */ + status: z + .enum(['active', 'inactive', 'rejected', 'review']) + .describe('Only return personalization designs with the given status.') + .optional() + }) + export type GetIssuingPersonalizationDesignsParams = z.infer< + typeof GetIssuingPersonalizationDesignsParamsSchema + > + + export const GetIssuingPersonalizationDesignsResponseSchema = z.object({ + data: z.array(IssuingPersonalizationDesignSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/personalization_designs')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingPersonalizationDesignsResponse = z.infer< + typeof GetIssuingPersonalizationDesignsResponseSchema + > + + export const PostIssuingPersonalizationDesignsParamsSchema = z.object({}) + export type PostIssuingPersonalizationDesignsParams = z.infer< + typeof PostIssuingPersonalizationDesignsParamsSchema + > + + export const PostIssuingPersonalizationDesignsResponseSchema = + IssuingPersonalizationDesignSchema + export type PostIssuingPersonalizationDesignsResponse = z.infer< + typeof PostIssuingPersonalizationDesignsResponseSchema + > + + export const GetIssuingPersonalizationDesignsPersonalizationDesignParamsSchema = + z.object({ + personalization_design: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingPersonalizationDesignsPersonalizationDesignParams = + z.infer< + typeof GetIssuingPersonalizationDesignsPersonalizationDesignParamsSchema + > + + export const GetIssuingPersonalizationDesignsPersonalizationDesignResponseSchema = + IssuingPersonalizationDesignSchema + export type GetIssuingPersonalizationDesignsPersonalizationDesignResponse = + z.infer< + typeof GetIssuingPersonalizationDesignsPersonalizationDesignResponseSchema + > + + export const PostIssuingPersonalizationDesignsPersonalizationDesignParamsSchema = + z.object({ personalization_design: z.string().max(5000) }) + export type PostIssuingPersonalizationDesignsPersonalizationDesignParams = + z.infer< + typeof PostIssuingPersonalizationDesignsPersonalizationDesignParamsSchema + > + + export const PostIssuingPersonalizationDesignsPersonalizationDesignResponseSchema = + IssuingPersonalizationDesignSchema + export type PostIssuingPersonalizationDesignsPersonalizationDesignResponse = + z.infer< + typeof PostIssuingPersonalizationDesignsPersonalizationDesignResponseSchema + > + + export const GetIssuingPhysicalBundlesParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return physical bundles with the given status. */ + status: z + .enum(['active', 'inactive', 'review']) + .describe('Only return physical bundles with the given status.') + .optional(), + /** Only return physical bundles with the given type. */ + type: z + .enum(['custom', 'standard']) + .describe('Only return physical bundles with the given type.') + .optional() + }) + export type GetIssuingPhysicalBundlesParams = z.infer< + typeof GetIssuingPhysicalBundlesParamsSchema + > + + export const GetIssuingPhysicalBundlesResponseSchema = z.object({ + data: z.array(IssuingPhysicalBundleSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/physical_bundles')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingPhysicalBundlesResponse = z.infer< + typeof GetIssuingPhysicalBundlesResponseSchema + > + + export const GetIssuingPhysicalBundlesPhysicalBundleParamsSchema = z.object({ + physical_bundle: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingPhysicalBundlesPhysicalBundleParams = z.infer< + typeof GetIssuingPhysicalBundlesPhysicalBundleParamsSchema + > + + export const GetIssuingPhysicalBundlesPhysicalBundleResponseSchema = + IssuingPhysicalBundleSchema + export type GetIssuingPhysicalBundlesPhysicalBundleResponse = z.infer< + typeof GetIssuingPhysicalBundlesPhysicalBundleResponseSchema + > + + export const GetIssuingSettlementsSettlementParamsSchema = z.object({ + settlement: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingSettlementsSettlementParams = z.infer< + typeof GetIssuingSettlementsSettlementParamsSchema + > + + export const GetIssuingSettlementsSettlementResponseSchema = + IssuingSettlementSchema + export type GetIssuingSettlementsSettlementResponse = z.infer< + typeof GetIssuingSettlementsSettlementResponseSchema + > + + export const PostIssuingSettlementsSettlementParamsSchema = z.object({ + settlement: z.string().max(5000) + }) + export type PostIssuingSettlementsSettlementParams = z.infer< + typeof PostIssuingSettlementsSettlementParamsSchema + > + + export const PostIssuingSettlementsSettlementResponseSchema = + IssuingSettlementSchema + export type PostIssuingSettlementsSettlementResponse = z.infer< + typeof PostIssuingSettlementsSettlementResponseSchema + > + + export const GetIssuingTokensParamsSchema = z.object({ + /** The Issuing card identifier to list tokens for. */ + card: z + .string() + .max(5000) + .describe('The Issuing card identifier to list tokens for.'), + /** Only return Issuing tokens that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return Issuing tokens that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Select Issuing tokens with the given status. */ + status: z + .enum(['active', 'deleted', 'requested', 'suspended']) + .describe('Select Issuing tokens with the given status.') + .optional() + }) + export type GetIssuingTokensParams = z.infer< + typeof GetIssuingTokensParamsSchema + > + + export const GetIssuingTokensResponseSchema = z.object({ + data: z.array(IssuingTokenSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingTokensResponse = z.infer< + typeof GetIssuingTokensResponseSchema + > + + export const GetIssuingTokensTokenParamsSchema = z.object({ + token: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingTokensTokenParams = z.infer< + typeof GetIssuingTokensTokenParamsSchema + > + + export const GetIssuingTokensTokenResponseSchema = IssuingTokenSchema + export type GetIssuingTokensTokenResponse = z.infer< + typeof GetIssuingTokensTokenResponseSchema + > + + export const PostIssuingTokensTokenParamsSchema = z.object({ + token: z.string().max(5000) + }) + export type PostIssuingTokensTokenParams = z.infer< + typeof PostIssuingTokensTokenParamsSchema + > + + export const PostIssuingTokensTokenResponseSchema = IssuingTokenSchema + export type PostIssuingTokensTokenResponse = z.infer< + typeof PostIssuingTokensTokenResponseSchema + > + + export const GetIssuingTransactionsParamsSchema = z.object({ + /** Only return transactions that belong to the given card. */ + card: z + .string() + .max(5000) + .describe('Only return transactions that belong to the given card.') + .optional(), + /** Only return transactions that belong to the given cardholder. */ + cardholder: z + .string() + .max(5000) + .describe('Only return transactions that belong to the given cardholder.') + .optional(), + /** Only return transactions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return transactions that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return transactions that have the given type. One of `capture` or `refund`. */ + type: z + .enum(['capture', 'refund']) + .describe( + 'Only return transactions that have the given type. One of `capture` or `refund`.' + ) + .optional() + }) + export type GetIssuingTransactionsParams = z.infer< + typeof GetIssuingTransactionsParamsSchema + > + + export const GetIssuingTransactionsResponseSchema = z.object({ + data: z.array(IssuingTransactionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/issuing/transactions')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetIssuingTransactionsResponse = z.infer< + typeof GetIssuingTransactionsResponseSchema + > + + export const GetIssuingTransactionsTransactionParamsSchema = z.object({ + transaction: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetIssuingTransactionsTransactionParams = z.infer< + typeof GetIssuingTransactionsTransactionParamsSchema + > + + export const GetIssuingTransactionsTransactionResponseSchema = + IssuingTransactionSchema + export type GetIssuingTransactionsTransactionResponse = z.infer< + typeof GetIssuingTransactionsTransactionResponseSchema + > + + export const PostIssuingTransactionsTransactionParamsSchema = z.object({ + transaction: z.string().max(5000) + }) + export type PostIssuingTransactionsTransactionParams = z.infer< + typeof PostIssuingTransactionsTransactionParamsSchema + > + + export const PostIssuingTransactionsTransactionResponseSchema = + IssuingTransactionSchema + export type PostIssuingTransactionsTransactionResponse = z.infer< + typeof PostIssuingTransactionsTransactionResponseSchema + > + + export const PostLinkAccountSessionsParamsSchema = z.object({}) + export type PostLinkAccountSessionsParams = z.infer< + typeof PostLinkAccountSessionsParamsSchema + > + + export const PostLinkAccountSessionsResponseSchema = + FinancialConnectionsSessionSchema + export type PostLinkAccountSessionsResponse = z.infer< + typeof PostLinkAccountSessionsResponseSchema + > + + export const GetLinkAccountSessionsSessionParamsSchema = z.object({ + session: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetLinkAccountSessionsSessionParams = z.infer< + typeof GetLinkAccountSessionsSessionParamsSchema + > + + export const GetLinkAccountSessionsSessionResponseSchema = + FinancialConnectionsSessionSchema + export type GetLinkAccountSessionsSessionResponse = z.infer< + typeof GetLinkAccountSessionsSessionResponseSchema + > + + export const GetLinkedAccountsParamsSchema = z.object({ + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder: z + .object({ + account: z.string().max(5000).optional(), + customer: z.string().max(5000).optional() + }) + .describe( + 'If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** If present, only return accounts that were collected as part of the given session. */ + session: z + .string() + .max(5000) + .describe( + 'If present, only return accounts that were collected as part of the given session.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetLinkedAccountsParams = z.infer< + typeof GetLinkedAccountsParamsSchema + > + + export const GetLinkedAccountsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsAccountSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/financial_connections/accounts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetLinkedAccountsResponse = z.infer< + typeof GetLinkedAccountsResponseSchema + > + + export const GetLinkedAccountsAccountParamsSchema = z.object({ + account: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetLinkedAccountsAccountParams = z.infer< + typeof GetLinkedAccountsAccountParamsSchema + > + + export const GetLinkedAccountsAccountResponseSchema = + FinancialConnectionsAccountSchema + export type GetLinkedAccountsAccountResponse = z.infer< + typeof GetLinkedAccountsAccountResponseSchema + > + + export const PostLinkedAccountsAccountDisconnectParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostLinkedAccountsAccountDisconnectParams = z.infer< + typeof PostLinkedAccountsAccountDisconnectParamsSchema + > + + export const PostLinkedAccountsAccountDisconnectResponseSchema = + FinancialConnectionsAccountSchema + export type PostLinkedAccountsAccountDisconnectResponse = z.infer< + typeof PostLinkedAccountsAccountDisconnectResponseSchema + > + + export const GetLinkedAccountsAccountOwnersParamsSchema = z.object({ + account: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** The ID of the ownership object to fetch owners from. */ + ownership: z + .string() + .max(5000) + .describe('The ID of the ownership object to fetch owners from.'), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetLinkedAccountsAccountOwnersParams = z.infer< + typeof GetLinkedAccountsAccountOwnersParamsSchema + > + + export const GetLinkedAccountsAccountOwnersResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(FinancialConnectionsAccountOwnerSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetLinkedAccountsAccountOwnersResponse = z.infer< + typeof GetLinkedAccountsAccountOwnersResponseSchema + > + + export const PostLinkedAccountsAccountRefreshParamsSchema = z.object({ + account: z.string().max(5000) + }) + export type PostLinkedAccountsAccountRefreshParams = z.infer< + typeof PostLinkedAccountsAccountRefreshParamsSchema + > + + export const PostLinkedAccountsAccountRefreshResponseSchema = + FinancialConnectionsAccountSchema + export type PostLinkedAccountsAccountRefreshResponse = z.infer< + typeof PostLinkedAccountsAccountRefreshResponseSchema + > + + export const GetMandatesMandateParamsSchema = z.object({ + mandate: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetMandatesMandateParams = z.infer< + typeof GetMandatesMandateParamsSchema + > + + export const GetMandatesMandateResponseSchema = MandateSchema + export type GetMandatesMandateResponse = z.infer< + typeof GetMandatesMandateResponseSchema + > + + export const GetPaymentIntentsParamsSchema = z.object({ + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.' + ) + .optional(), + /** Only return PaymentIntents for the customer that this customer ID specifies. */ + customer: z + .string() + .max(5000) + .describe( + 'Only return PaymentIntents for the customer that this customer ID specifies.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPaymentIntentsParams = z.infer< + typeof GetPaymentIntentsParamsSchema + > + + export const GetPaymentIntentsResponseSchema = z.object({ + data: z.array(PaymentIntentSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/payment_intents')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPaymentIntentsResponse = z.infer< + typeof GetPaymentIntentsResponseSchema + > + + export const PostPaymentIntentsParamsSchema = z.object({}) + export type PostPaymentIntentsParams = z.infer< + typeof PostPaymentIntentsParamsSchema + > + + export const PostPaymentIntentsResponseSchema = PaymentIntentSchema + export type PostPaymentIntentsResponse = z.infer< + typeof PostPaymentIntentsResponseSchema + > + + export const GetPaymentIntentsSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).' + ) + }) + export type GetPaymentIntentsSearchParams = z.infer< + typeof GetPaymentIntentsSearchParamsSchema + > + + export const GetPaymentIntentsSearchResponseSchema = z.object({ + data: z.array(PaymentIntentSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetPaymentIntentsSearchResponse = z.infer< + typeof GetPaymentIntentsSearchResponseSchema + > + + export const GetPaymentIntentsIntentParamsSchema = z.object({ + intent: z.string().max(5000), + /** The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. */ + client_secret: z + .string() + .max(5000) + .describe( + 'The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPaymentIntentsIntentParams = z.infer< + typeof GetPaymentIntentsIntentParamsSchema + > + + export const GetPaymentIntentsIntentResponseSchema = PaymentIntentSchema + export type GetPaymentIntentsIntentResponse = z.infer< + typeof GetPaymentIntentsIntentResponseSchema + > + + export const PostPaymentIntentsIntentParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostPaymentIntentsIntentParams = z.infer< + typeof PostPaymentIntentsIntentParamsSchema + > + + export const PostPaymentIntentsIntentResponseSchema = PaymentIntentSchema + export type PostPaymentIntentsIntentResponse = z.infer< + typeof PostPaymentIntentsIntentResponseSchema + > + + export const PostPaymentIntentsIntentApplyCustomerBalanceParamsSchema = + z.object({ intent: z.string().max(5000) }) + export type PostPaymentIntentsIntentApplyCustomerBalanceParams = z.infer< + typeof PostPaymentIntentsIntentApplyCustomerBalanceParamsSchema + > + + export const PostPaymentIntentsIntentApplyCustomerBalanceResponseSchema = + PaymentIntentSchema + export type PostPaymentIntentsIntentApplyCustomerBalanceResponse = z.infer< + typeof PostPaymentIntentsIntentApplyCustomerBalanceResponseSchema + > + + export const PostPaymentIntentsIntentCancelParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostPaymentIntentsIntentCancelParams = z.infer< + typeof PostPaymentIntentsIntentCancelParamsSchema + > + + export const PostPaymentIntentsIntentCancelResponseSchema = + PaymentIntentSchema + export type PostPaymentIntentsIntentCancelResponse = z.infer< + typeof PostPaymentIntentsIntentCancelResponseSchema + > + + export const PostPaymentIntentsIntentCaptureParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostPaymentIntentsIntentCaptureParams = z.infer< + typeof PostPaymentIntentsIntentCaptureParamsSchema + > + + export const PostPaymentIntentsIntentCaptureResponseSchema = + PaymentIntentSchema + export type PostPaymentIntentsIntentCaptureResponse = z.infer< + typeof PostPaymentIntentsIntentCaptureResponseSchema + > + + export const PostPaymentIntentsIntentConfirmParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostPaymentIntentsIntentConfirmParams = z.infer< + typeof PostPaymentIntentsIntentConfirmParamsSchema + > + + export const PostPaymentIntentsIntentConfirmResponseSchema = + PaymentIntentSchema + export type PostPaymentIntentsIntentConfirmResponse = z.infer< + typeof PostPaymentIntentsIntentConfirmResponseSchema + > + + export const PostPaymentIntentsIntentIncrementAuthorizationParamsSchema = + z.object({ intent: z.string().max(5000) }) + export type PostPaymentIntentsIntentIncrementAuthorizationParams = z.infer< + typeof PostPaymentIntentsIntentIncrementAuthorizationParamsSchema + > + + export const PostPaymentIntentsIntentIncrementAuthorizationResponseSchema = + PaymentIntentSchema + export type PostPaymentIntentsIntentIncrementAuthorizationResponse = z.infer< + typeof PostPaymentIntentsIntentIncrementAuthorizationResponseSchema + > + + export const PostPaymentIntentsIntentVerifyMicrodepositsParamsSchema = + z.object({ intent: z.string().max(5000) }) + export type PostPaymentIntentsIntentVerifyMicrodepositsParams = z.infer< + typeof PostPaymentIntentsIntentVerifyMicrodepositsParamsSchema + > + + export const PostPaymentIntentsIntentVerifyMicrodepositsResponseSchema = + PaymentIntentSchema + export type PostPaymentIntentsIntentVerifyMicrodepositsResponse = z.infer< + typeof PostPaymentIntentsIntentVerifyMicrodepositsResponseSchema + > + + export const GetPaymentLinksParamsSchema = z.object({ + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ + active: z + .boolean() + .describe( + 'Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPaymentLinksParams = z.infer< + typeof GetPaymentLinksParamsSchema + > + + export const GetPaymentLinksResponseSchema = z.object({ + data: z.array(PaymentLinkSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/payment_links')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPaymentLinksResponse = z.infer< + typeof GetPaymentLinksResponseSchema + > + + export const PostPaymentLinksParamsSchema = z.object({}) + export type PostPaymentLinksParams = z.infer< + typeof PostPaymentLinksParamsSchema + > + + export const PostPaymentLinksResponseSchema = PaymentLinkSchema + export type PostPaymentLinksResponse = z.infer< + typeof PostPaymentLinksResponseSchema + > + + export const GetPaymentLinksPaymentLinkParamsSchema = z.object({ + payment_link: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPaymentLinksPaymentLinkParams = z.infer< + typeof GetPaymentLinksPaymentLinkParamsSchema + > + + export const GetPaymentLinksPaymentLinkResponseSchema = PaymentLinkSchema + export type GetPaymentLinksPaymentLinkResponse = z.infer< + typeof GetPaymentLinksPaymentLinkResponseSchema + > + + export const PostPaymentLinksPaymentLinkParamsSchema = z.object({ + payment_link: z.string().max(5000) + }) + export type PostPaymentLinksPaymentLinkParams = z.infer< + typeof PostPaymentLinksPaymentLinkParamsSchema + > + + export const PostPaymentLinksPaymentLinkResponseSchema = PaymentLinkSchema + export type PostPaymentLinksPaymentLinkResponse = z.infer< + typeof PostPaymentLinksPaymentLinkResponseSchema + > + + export const GetPaymentLinksPaymentLinkLineItemsParamsSchema = z.object({ + payment_link: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPaymentLinksPaymentLinkLineItemsParams = z.infer< + typeof GetPaymentLinksPaymentLinkLineItemsParamsSchema + > + + export const GetPaymentLinksPaymentLinkLineItemsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPaymentLinksPaymentLinkLineItemsResponse = z.infer< + typeof GetPaymentLinksPaymentLinkLineItemsResponseSchema + > + + export const GetPaymentMethodConfigurationsParamsSchema = z.object({ + /** The Connect application to filter by. */ + application: z + .union([z.string().max(100), z.literal('')]) + .describe('The Connect application to filter by.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPaymentMethodConfigurationsParams = z.infer< + typeof GetPaymentMethodConfigurationsParamsSchema + > + + export const GetPaymentMethodConfigurationsResponseSchema = z.object({ + data: z.array(PaymentMethodConfigurationSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/payment_method_configurations')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPaymentMethodConfigurationsResponse = z.infer< + typeof GetPaymentMethodConfigurationsResponseSchema + > + + export const PostPaymentMethodConfigurationsParamsSchema = z.object({}) + export type PostPaymentMethodConfigurationsParams = z.infer< + typeof PostPaymentMethodConfigurationsParamsSchema + > + + export const PostPaymentMethodConfigurationsResponseSchema = + PaymentMethodConfigurationSchema + export type PostPaymentMethodConfigurationsResponse = z.infer< + typeof PostPaymentMethodConfigurationsResponseSchema + > + + export const GetPaymentMethodConfigurationsConfigurationParamsSchema = + z.object({ + configuration: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPaymentMethodConfigurationsConfigurationParams = z.infer< + typeof GetPaymentMethodConfigurationsConfigurationParamsSchema + > + + export const GetPaymentMethodConfigurationsConfigurationResponseSchema = + PaymentMethodConfigurationSchema + export type GetPaymentMethodConfigurationsConfigurationResponse = z.infer< + typeof GetPaymentMethodConfigurationsConfigurationResponseSchema + > + + export const PostPaymentMethodConfigurationsConfigurationParamsSchema = + z.object({ configuration: z.string().max(5000) }) + export type PostPaymentMethodConfigurationsConfigurationParams = z.infer< + typeof PostPaymentMethodConfigurationsConfigurationParamsSchema + > + + export const PostPaymentMethodConfigurationsConfigurationResponseSchema = + PaymentMethodConfigurationSchema + export type PostPaymentMethodConfigurationsConfigurationResponse = z.infer< + typeof PostPaymentMethodConfigurationsConfigurationResponseSchema + > + + export const GetPaymentMethodDomainsParamsSchema = z.object({ + /** The domain name that this payment method domain object represents. */ + domain_name: z + .string() + .max(5000) + .describe( + 'The domain name that this payment method domain object represents.' + ) + .optional(), + /** Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements */ + enabled: z + .boolean() + .describe( + 'Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPaymentMethodDomainsParams = z.infer< + typeof GetPaymentMethodDomainsParamsSchema + > + + export const GetPaymentMethodDomainsResponseSchema = z.object({ + data: z.array(PaymentMethodDomainSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/payment_method_domains')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPaymentMethodDomainsResponse = z.infer< + typeof GetPaymentMethodDomainsResponseSchema + > + + export const PostPaymentMethodDomainsParamsSchema = z.object({}) + export type PostPaymentMethodDomainsParams = z.infer< + typeof PostPaymentMethodDomainsParamsSchema + > + + export const PostPaymentMethodDomainsResponseSchema = + PaymentMethodDomainSchema + export type PostPaymentMethodDomainsResponse = z.infer< + typeof PostPaymentMethodDomainsResponseSchema + > + + export const GetPaymentMethodDomainsPaymentMethodDomainParamsSchema = + z.object({ + payment_method_domain: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPaymentMethodDomainsPaymentMethodDomainParams = z.infer< + typeof GetPaymentMethodDomainsPaymentMethodDomainParamsSchema + > + + export const GetPaymentMethodDomainsPaymentMethodDomainResponseSchema = + PaymentMethodDomainSchema + export type GetPaymentMethodDomainsPaymentMethodDomainResponse = z.infer< + typeof GetPaymentMethodDomainsPaymentMethodDomainResponseSchema + > + + export const PostPaymentMethodDomainsPaymentMethodDomainParamsSchema = + z.object({ payment_method_domain: z.string().max(5000) }) + export type PostPaymentMethodDomainsPaymentMethodDomainParams = z.infer< + typeof PostPaymentMethodDomainsPaymentMethodDomainParamsSchema + > + + export const PostPaymentMethodDomainsPaymentMethodDomainResponseSchema = + PaymentMethodDomainSchema + export type PostPaymentMethodDomainsPaymentMethodDomainResponse = z.infer< + typeof PostPaymentMethodDomainsPaymentMethodDomainResponseSchema + > + + export const PostPaymentMethodDomainsPaymentMethodDomainValidateParamsSchema = + z.object({ payment_method_domain: z.string().max(5000) }) + export type PostPaymentMethodDomainsPaymentMethodDomainValidateParams = + z.infer< + typeof PostPaymentMethodDomainsPaymentMethodDomainValidateParamsSchema + > + + export const PostPaymentMethodDomainsPaymentMethodDomainValidateResponseSchema = + PaymentMethodDomainSchema + export type PostPaymentMethodDomainsPaymentMethodDomainValidateResponse = + z.infer< + typeof PostPaymentMethodDomainsPaymentMethodDomainValidateResponseSchema + > + + export const GetPaymentMethodsParamsSchema = z.object({ + /** The ID of the customer whose PaymentMethods will be retrieved. */ + customer: z + .string() + .max(5000) + .describe( + 'The ID of the customer whose PaymentMethods will be retrieved.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. */ + type: z + .enum([ + 'acss_debit', + 'affirm', + 'afterpay_clearpay', + 'alipay', + 'alma', + 'amazon_pay', + 'au_becs_debit', + 'bacs_debit', + 'bancontact', + 'blik', + 'boleto', + 'card', + 'cashapp', + 'customer_balance', + 'eps', + 'fpx', + 'giropay', + 'grabpay', + 'ideal', + 'kakao_pay', + 'klarna', + 'konbini', + 'kr_card', + 'link', + 'mobilepay', + 'multibanco', + 'naver_pay', + 'oxxo', + 'p24', + 'pay_by_bank', + 'payco', + 'paynow', + 'paypal', + 'pix', + 'promptpay', + 'revolut_pay', + 'samsung_pay', + 'sepa_debit', + 'sofort', + 'swish', + 'twint', + 'us_bank_account', + 'wechat_pay', + 'zip' + ]) + .describe( + 'An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.' + ) + .optional() + }) + export type GetPaymentMethodsParams = z.infer< + typeof GetPaymentMethodsParamsSchema + > + + export const GetPaymentMethodsResponseSchema = z.object({ + data: z.array(PaymentMethodSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/payment_methods')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPaymentMethodsResponse = z.infer< + typeof GetPaymentMethodsResponseSchema + > + + export const PostPaymentMethodsParamsSchema = z.object({}) + export type PostPaymentMethodsParams = z.infer< + typeof PostPaymentMethodsParamsSchema + > + + export const PostPaymentMethodsResponseSchema = PaymentMethodSchema + export type PostPaymentMethodsResponse = z.infer< + typeof PostPaymentMethodsResponseSchema + > + + export const GetPaymentMethodsPaymentMethodParamsSchema = z.object({ + payment_method: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPaymentMethodsPaymentMethodParams = z.infer< + typeof GetPaymentMethodsPaymentMethodParamsSchema + > + + export const GetPaymentMethodsPaymentMethodResponseSchema = + PaymentMethodSchema + export type GetPaymentMethodsPaymentMethodResponse = z.infer< + typeof GetPaymentMethodsPaymentMethodResponseSchema + > + + export const PostPaymentMethodsPaymentMethodParamsSchema = z.object({ + payment_method: z.string().max(5000) + }) + export type PostPaymentMethodsPaymentMethodParams = z.infer< + typeof PostPaymentMethodsPaymentMethodParamsSchema + > + + export const PostPaymentMethodsPaymentMethodResponseSchema = + PaymentMethodSchema + export type PostPaymentMethodsPaymentMethodResponse = z.infer< + typeof PostPaymentMethodsPaymentMethodResponseSchema + > + + export const PostPaymentMethodsPaymentMethodAttachParamsSchema = z.object({ + payment_method: z.string().max(5000) + }) + export type PostPaymentMethodsPaymentMethodAttachParams = z.infer< + typeof PostPaymentMethodsPaymentMethodAttachParamsSchema + > + + export const PostPaymentMethodsPaymentMethodAttachResponseSchema = + PaymentMethodSchema + export type PostPaymentMethodsPaymentMethodAttachResponse = z.infer< + typeof PostPaymentMethodsPaymentMethodAttachResponseSchema + > + + export const PostPaymentMethodsPaymentMethodDetachParamsSchema = z.object({ + payment_method: z.string().max(5000) + }) + export type PostPaymentMethodsPaymentMethodDetachParams = z.infer< + typeof PostPaymentMethodsPaymentMethodDetachParamsSchema + > + + export const PostPaymentMethodsPaymentMethodDetachResponseSchema = + PaymentMethodSchema + export type PostPaymentMethodsPaymentMethodDetachResponse = z.infer< + typeof PostPaymentMethodsPaymentMethodDetachResponseSchema + > + + export const GetPayoutsParamsSchema = z.object({ + /** Only return payouts that are expected to arrive during the given date interval. */ + arrival_date: 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() + ]) + .describe( + 'Only return payouts that are expected to arrive during the given date interval.' + ) + .optional(), + /** Only return payouts that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return payouts that were created during the given date interval.' + ) + .optional(), + /** The ID of an external account - only return payouts sent to this external account. */ + destination: z + .string() + .describe( + 'The ID of an external account - only return payouts sent to this external account.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status: z + .string() + .max(5000) + .describe( + 'Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.' + ) + .optional() + }) + export type GetPayoutsParams = z.infer + + export const GetPayoutsResponseSchema = z.object({ + data: z.array(PayoutSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/payouts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPayoutsResponse = z.infer + + export const PostPayoutsParamsSchema = z.object({}) + export type PostPayoutsParams = z.infer + + export const PostPayoutsResponseSchema = PayoutSchema + export type PostPayoutsResponse = z.infer + + export const GetPayoutsPayoutParamsSchema = z.object({ + payout: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPayoutsPayoutParams = z.infer< + typeof GetPayoutsPayoutParamsSchema + > + + export const GetPayoutsPayoutResponseSchema = PayoutSchema + export type GetPayoutsPayoutResponse = z.infer< + typeof GetPayoutsPayoutResponseSchema + > + + export const PostPayoutsPayoutParamsSchema = z.object({ + payout: z.string().max(5000) + }) + export type PostPayoutsPayoutParams = z.infer< + typeof PostPayoutsPayoutParamsSchema + > + + export const PostPayoutsPayoutResponseSchema = PayoutSchema + export type PostPayoutsPayoutResponse = z.infer< + typeof PostPayoutsPayoutResponseSchema + > + + export const PostPayoutsPayoutCancelParamsSchema = z.object({ + payout: z.string().max(5000) + }) + export type PostPayoutsPayoutCancelParams = z.infer< + typeof PostPayoutsPayoutCancelParamsSchema + > + + export const PostPayoutsPayoutCancelResponseSchema = PayoutSchema + export type PostPayoutsPayoutCancelResponse = z.infer< + typeof PostPayoutsPayoutCancelResponseSchema + > + + export const PostPayoutsPayoutReverseParamsSchema = z.object({ + payout: z.string().max(5000) + }) + export type PostPayoutsPayoutReverseParams = z.infer< + typeof PostPayoutsPayoutReverseParamsSchema + > + + export const PostPayoutsPayoutReverseResponseSchema = PayoutSchema + export type PostPayoutsPayoutReverseResponse = z.infer< + typeof PostPayoutsPayoutReverseResponseSchema + > + + export const GetPlansParamsSchema = z.object({ + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ + active: z + .boolean() + .describe( + 'Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).' + ) + .optional(), + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return plans for the given product. */ + product: z + .string() + .max(5000) + .describe('Only return plans for the given product.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPlansParams = z.infer + + export const GetPlansResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(PlanSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/plans')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPlansResponse = z.infer + + export const PostPlansParamsSchema = z.object({}) + export type PostPlansParams = z.infer + + export const PostPlansResponseSchema = PlanSchema + export type PostPlansResponse = z.infer + + export const GetPlansPlanParamsSchema = z.object({ + plan: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPlansPlanParams = z.infer + + export const GetPlansPlanResponseSchema = PlanSchema + export type GetPlansPlanResponse = z.infer + + export const PostPlansPlanParamsSchema = z.object({ + plan: z.string().max(5000) + }) + export type PostPlansPlanParams = z.infer + + export const PostPlansPlanResponseSchema = PlanSchema + export type PostPlansPlanResponse = z.infer< + typeof PostPlansPlanResponseSchema + > + + export const DeletePlansPlanParamsSchema = z.object({ + plan: z.string().max(5000) + }) + export type DeletePlansPlanParams = z.infer< + typeof DeletePlansPlanParamsSchema + > + + export const DeletePlansPlanResponseSchema = DeletedPlanSchema + export type DeletePlansPlanResponse = z.infer< + typeof DeletePlansPlanResponseSchema + > + + export const GetPricesParamsSchema = z.object({ + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + active: z + .boolean() + .describe( + 'Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).' + ) + .optional(), + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** Only return prices for the given currency. */ + currency: z + .string() + .describe('Only return prices for the given currency.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. */ + lookup_keys: z + .array(z.string().max(5000)) + .describe( + 'Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.' + ) + .optional(), + /** Only return prices for the given product. */ + product: z + .string() + .max(5000) + .describe('Only return prices for the given product.') + .optional(), + /** Only return prices with these recurring fields. */ + recurring: z + .object({ + interval: z.enum(['day', 'month', 'week', 'year']).optional(), + meter: z.string().max(5000).optional(), + usage_type: z.enum(['licensed', 'metered']).optional() + }) + .describe('Only return prices with these recurring fields.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return prices of type `recurring` or `one_time`. */ + type: z + .enum(['one_time', 'recurring']) + .describe('Only return prices of type `recurring` or `one_time`.') + .optional() + }) + export type GetPricesParams = z.infer + + export const GetPricesResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(PriceSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/prices')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPricesResponse = z.infer + + export const PostPricesParamsSchema = z.object({}) + export type PostPricesParams = z.infer + + export const PostPricesResponseSchema = PriceSchema + export type PostPricesResponse = z.infer + + export const GetPricesSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).' + ) + }) + export type GetPricesSearchParams = z.infer< + typeof GetPricesSearchParamsSchema + > + + export const GetPricesSearchResponseSchema = z.object({ + data: z.array(PriceSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetPricesSearchResponse = z.infer< + typeof GetPricesSearchResponseSchema + > + + export const GetPricesPriceParamsSchema = z.object({ + price: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPricesPriceParams = z.infer + + export const GetPricesPriceResponseSchema = PriceSchema + export type GetPricesPriceResponse = z.infer< + typeof GetPricesPriceResponseSchema + > + + export const PostPricesPriceParamsSchema = z.object({ + price: z.string().max(5000) + }) + export type PostPricesPriceParams = z.infer< + typeof PostPricesPriceParamsSchema + > + + export const PostPricesPriceResponseSchema = PriceSchema + export type PostPricesPriceResponse = z.infer< + typeof PostPricesPriceResponseSchema + > + + export const GetProductsParamsSchema = z.object({ + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active: z + .boolean() + .describe( + 'Only return products that are active or inactive (e.g., pass `false` to list all inactive products).' + ) + .optional(), + /** Only return products that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return products that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ + ids: z + .array(z.string().max(5000)) + .describe( + 'Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return products that can be shipped (i.e., physical, not digital products). */ + shippable: z + .boolean() + .describe( + 'Only return products that can be shipped (i.e., physical, not digital products).' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return products with the given url. */ + url: z + .string() + .max(5000) + .describe('Only return products with the given url.') + .optional() + }) + export type GetProductsParams = z.infer + + export const GetProductsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(ProductSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/products')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetProductsResponse = z.infer + + export const PostProductsParamsSchema = z.object({}) + export type PostProductsParams = z.infer + + export const PostProductsResponseSchema = ProductSchema + export type PostProductsResponse = z.infer + + export const GetProductsSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).' + ) + }) + export type GetProductsSearchParams = z.infer< + typeof GetProductsSearchParamsSchema + > + + export const GetProductsSearchResponseSchema = z.object({ + data: z.array(ProductSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetProductsSearchResponse = z.infer< + typeof GetProductsSearchResponseSchema + > + + export const GetProductsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetProductsIdParams = z.infer + + export const GetProductsIdResponseSchema = ProductSchema + export type GetProductsIdResponse = z.infer< + typeof GetProductsIdResponseSchema + > + + export const PostProductsIdParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostProductsIdParams = z.infer + + export const PostProductsIdResponseSchema = ProductSchema + export type PostProductsIdResponse = z.infer< + typeof PostProductsIdResponseSchema + > + + export const DeleteProductsIdParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type DeleteProductsIdParams = z.infer< + typeof DeleteProductsIdParamsSchema + > + + export const DeleteProductsIdResponseSchema = DeletedProductSchema + export type DeleteProductsIdResponse = z.infer< + typeof DeleteProductsIdResponseSchema + > + + export const GetProductsProductFeaturesParamsSchema = z.object({ + product: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetProductsProductFeaturesParams = z.infer< + typeof GetProductsProductFeaturesParamsSchema + > + + export const GetProductsProductFeaturesResponseSchema = z.object({ + data: z.array(ProductFeatureSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetProductsProductFeaturesResponse = z.infer< + typeof GetProductsProductFeaturesResponseSchema + > + + export const PostProductsProductFeaturesParamsSchema = z.object({ + product: z.string().max(5000) + }) + export type PostProductsProductFeaturesParams = z.infer< + typeof PostProductsProductFeaturesParamsSchema + > + + export const PostProductsProductFeaturesResponseSchema = ProductFeatureSchema + export type PostProductsProductFeaturesResponse = z.infer< + typeof PostProductsProductFeaturesResponseSchema + > + + export const GetProductsProductFeaturesIdParamsSchema = z.object({ + /** The ID of the product_feature. */ + id: z.string().max(5000).describe('The ID of the product_feature.'), + /** The ID of the product. */ + product: z.string().max(5000).describe('The ID of the product.'), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetProductsProductFeaturesIdParams = z.infer< + typeof GetProductsProductFeaturesIdParamsSchema + > + + export const GetProductsProductFeaturesIdResponseSchema = ProductFeatureSchema + export type GetProductsProductFeaturesIdResponse = z.infer< + typeof GetProductsProductFeaturesIdResponseSchema + > + + export const DeleteProductsProductFeaturesIdParamsSchema = z.object({ + id: z.string().max(5000), + product: z.string().max(5000) + }) + export type DeleteProductsProductFeaturesIdParams = z.infer< + typeof DeleteProductsProductFeaturesIdParamsSchema + > + + export const DeleteProductsProductFeaturesIdResponseSchema = + DeletedProductFeatureSchema + export type DeleteProductsProductFeaturesIdResponse = z.infer< + typeof DeleteProductsProductFeaturesIdResponseSchema + > + + export const GetPromotionCodesParamsSchema = z.object({ + /** Filter promotion codes by whether they are active. */ + active: z + .boolean() + .describe('Filter promotion codes by whether they are active.') + .optional(), + /** Only return promotion codes that have this case-insensitive code. */ + code: z + .string() + .max(5000) + .describe( + 'Only return promotion codes that have this case-insensitive code.' + ) + .optional(), + /** Only return promotion codes for this coupon. */ + coupon: z + .string() + .max(5000) + .describe('Only return promotion codes for this coupon.') + .optional(), + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** Only return promotion codes that are restricted to this customer. */ + customer: z + .string() + .max(5000) + .describe( + 'Only return promotion codes that are restricted to this customer.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetPromotionCodesParams = z.infer< + typeof GetPromotionCodesParamsSchema + > + + export const GetPromotionCodesResponseSchema = z.object({ + data: z.array(PromotionCodeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/promotion_codes')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetPromotionCodesResponse = z.infer< + typeof GetPromotionCodesResponseSchema + > + + export const PostPromotionCodesParamsSchema = z.object({}) + export type PostPromotionCodesParams = z.infer< + typeof PostPromotionCodesParamsSchema + > + + export const PostPromotionCodesResponseSchema = PromotionCodeSchema + export type PostPromotionCodesResponse = z.infer< + typeof PostPromotionCodesResponseSchema + > + + export const GetPromotionCodesPromotionCodeParamsSchema = z.object({ + promotion_code: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetPromotionCodesPromotionCodeParams = z.infer< + typeof GetPromotionCodesPromotionCodeParamsSchema + > + + export const GetPromotionCodesPromotionCodeResponseSchema = + PromotionCodeSchema + export type GetPromotionCodesPromotionCodeResponse = z.infer< + typeof GetPromotionCodesPromotionCodeResponseSchema + > + + export const PostPromotionCodesPromotionCodeParamsSchema = z.object({ + promotion_code: z.string().max(5000) + }) + export type PostPromotionCodesPromotionCodeParams = z.infer< + typeof PostPromotionCodesPromotionCodeParamsSchema + > + + export const PostPromotionCodesPromotionCodeResponseSchema = + PromotionCodeSchema + export type PostPromotionCodesPromotionCodeResponse = z.infer< + typeof PostPromotionCodesPromotionCodeResponseSchema + > + + export const GetQuotesParamsSchema = z.object({ + /** The ID of the customer whose quotes will be retrieved. */ + customer: z + .string() + .max(5000) + .describe('The ID of the customer whose quotes will be retrieved.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** The status of the quote. */ + status: z + .enum(['accepted', 'canceled', 'draft', 'open']) + .describe('The status of the quote.') + .optional(), + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + test_clock: z + .string() + .max(5000) + .describe( + 'Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.' + ) + .optional() + }) + export type GetQuotesParams = z.infer + + export const GetQuotesResponseSchema = z.object({ + data: z.array(QuoteSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/quotes')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetQuotesResponse = z.infer + + export const PostQuotesParamsSchema = z.object({}) + export type PostQuotesParams = z.infer + + export const PostQuotesResponseSchema = QuoteSchema + export type PostQuotesResponse = z.infer + + export const GetQuotesQuoteParamsSchema = z.object({ + quote: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetQuotesQuoteParams = z.infer + + export const GetQuotesQuoteResponseSchema = QuoteSchema + export type GetQuotesQuoteResponse = z.infer< + typeof GetQuotesQuoteResponseSchema + > + + export const PostQuotesQuoteParamsSchema = z.object({ + quote: z.string().max(5000) + }) + export type PostQuotesQuoteParams = z.infer< + typeof PostQuotesQuoteParamsSchema + > + + export const PostQuotesQuoteResponseSchema = QuoteSchema + export type PostQuotesQuoteResponse = z.infer< + typeof PostQuotesQuoteResponseSchema + > + + export const PostQuotesQuoteAcceptParamsSchema = z.object({ + quote: z.string().max(5000) + }) + export type PostQuotesQuoteAcceptParams = z.infer< + typeof PostQuotesQuoteAcceptParamsSchema + > + + export const PostQuotesQuoteAcceptResponseSchema = QuoteSchema + export type PostQuotesQuoteAcceptResponse = z.infer< + typeof PostQuotesQuoteAcceptResponseSchema + > + + export const PostQuotesQuoteCancelParamsSchema = z.object({ + quote: z.string().max(5000) + }) + export type PostQuotesQuoteCancelParams = z.infer< + typeof PostQuotesQuoteCancelParamsSchema + > + + export const PostQuotesQuoteCancelResponseSchema = QuoteSchema + export type PostQuotesQuoteCancelResponse = z.infer< + typeof PostQuotesQuoteCancelResponseSchema + > + + export const GetQuotesQuoteComputedUpfrontLineItemsParamsSchema = z.object({ + quote: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetQuotesQuoteComputedUpfrontLineItemsParams = z.infer< + typeof GetQuotesQuoteComputedUpfrontLineItemsParamsSchema + > + + export const GetQuotesQuoteComputedUpfrontLineItemsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetQuotesQuoteComputedUpfrontLineItemsResponse = z.infer< + typeof GetQuotesQuoteComputedUpfrontLineItemsResponseSchema + > + + export const PostQuotesQuoteFinalizeParamsSchema = z.object({ + quote: z.string().max(5000) + }) + export type PostQuotesQuoteFinalizeParams = z.infer< + typeof PostQuotesQuoteFinalizeParamsSchema + > + + export const PostQuotesQuoteFinalizeResponseSchema = QuoteSchema + export type PostQuotesQuoteFinalizeResponse = z.infer< + typeof PostQuotesQuoteFinalizeResponseSchema + > + + export const GetQuotesQuoteLineItemsParamsSchema = z.object({ + quote: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetQuotesQuoteLineItemsParams = z.infer< + typeof GetQuotesQuoteLineItemsParamsSchema + > + + export const GetQuotesQuoteLineItemsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(ItemSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetQuotesQuoteLineItemsResponse = z.infer< + typeof GetQuotesQuoteLineItemsResponseSchema + > + + export const GetQuotesQuotePdfParamsSchema = z.object({ + quote: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetQuotesQuotePdfParams = z.infer< + typeof GetQuotesQuotePdfParamsSchema + > + + export type GetQuotesQuotePdfResponse = undefined + + export const GetRadarEarlyFraudWarningsParamsSchema = z.object({ + /** Only return early fraud warnings for the charge specified by this charge ID. */ + charge: z + .string() + .describe( + 'Only return early fraud warnings for the charge specified by this charge ID.' + ) + .optional(), + /** Only return early fraud warnings that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return early fraud warnings that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent: z + .string() + .max(5000) + .describe( + 'Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetRadarEarlyFraudWarningsParams = z.infer< + typeof GetRadarEarlyFraudWarningsParamsSchema + > + + export const GetRadarEarlyFraudWarningsResponseSchema = z.object({ + data: z.array(RadarEarlyFraudWarningSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/radar/early_fraud_warnings')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetRadarEarlyFraudWarningsResponse = z.infer< + typeof GetRadarEarlyFraudWarningsResponseSchema + > + + export const GetRadarEarlyFraudWarningsEarlyFraudWarningParamsSchema = + z.object({ + early_fraud_warning: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetRadarEarlyFraudWarningsEarlyFraudWarningParams = z.infer< + typeof GetRadarEarlyFraudWarningsEarlyFraudWarningParamsSchema + > + + export const GetRadarEarlyFraudWarningsEarlyFraudWarningResponseSchema = + RadarEarlyFraudWarningSchema + export type GetRadarEarlyFraudWarningsEarlyFraudWarningResponse = z.infer< + typeof GetRadarEarlyFraudWarningsEarlyFraudWarningResponseSchema + > + + export const GetRadarValueListItemsParamsSchema = z.object({ + /** Only return items that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return items that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ + value: z + .string() + .max(800) + .describe( + 'Return items belonging to the parent list whose value matches the specified value (using an "is like" match).' + ) + .optional(), + /** Identifier for the parent value list this item belongs to. */ + value_list: z + .string() + .max(5000) + .describe('Identifier for the parent value list this item belongs to.') + }) + export type GetRadarValueListItemsParams = z.infer< + typeof GetRadarValueListItemsParamsSchema + > + + export const GetRadarValueListItemsResponseSchema = z.object({ + data: z.array(RadarValueListItemSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/radar/value_list_items')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetRadarValueListItemsResponse = z.infer< + typeof GetRadarValueListItemsResponseSchema + > + + export const PostRadarValueListItemsParamsSchema = z.object({}) + export type PostRadarValueListItemsParams = z.infer< + typeof PostRadarValueListItemsParamsSchema + > + + export const PostRadarValueListItemsResponseSchema = RadarValueListItemSchema + export type PostRadarValueListItemsResponse = z.infer< + typeof PostRadarValueListItemsResponseSchema + > + + export const GetRadarValueListItemsItemParamsSchema = z.object({ + item: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetRadarValueListItemsItemParams = z.infer< + typeof GetRadarValueListItemsItemParamsSchema + > + + export const GetRadarValueListItemsItemResponseSchema = + RadarValueListItemSchema + export type GetRadarValueListItemsItemResponse = z.infer< + typeof GetRadarValueListItemsItemResponseSchema + > + + export const DeleteRadarValueListItemsItemParamsSchema = z.object({ + item: z.string().max(5000) + }) + export type DeleteRadarValueListItemsItemParams = z.infer< + typeof DeleteRadarValueListItemsItemParamsSchema + > + + export const DeleteRadarValueListItemsItemResponseSchema = + DeletedRadarValueListItemSchema + export type DeleteRadarValueListItemsItemResponse = z.infer< + typeof DeleteRadarValueListItemsItemResponseSchema + > + + export const GetRadarValueListsParamsSchema = z.object({ + /** The alias used to reference the value list when writing rules. */ + alias: z + .string() + .max(100) + .describe( + 'The alias used to reference the value list when writing rules.' + ) + .optional(), + /** A value contained within a value list - returns all value lists containing this value. */ + contains: z + .string() + .max(800) + .describe( + 'A value contained within a value list - returns all value lists containing this value.' + ) + .optional(), + /** Only return value lists that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return value lists that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetRadarValueListsParams = z.infer< + typeof GetRadarValueListsParamsSchema + > + + export const GetRadarValueListsResponseSchema = z.object({ + data: z.array(RadarValueListSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/radar/value_lists')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetRadarValueListsResponse = z.infer< + typeof GetRadarValueListsResponseSchema + > + + export const PostRadarValueListsParamsSchema = z.object({}) + export type PostRadarValueListsParams = z.infer< + typeof PostRadarValueListsParamsSchema + > + + export const PostRadarValueListsResponseSchema = RadarValueListSchema + export type PostRadarValueListsResponse = z.infer< + typeof PostRadarValueListsResponseSchema + > + + export const GetRadarValueListsValueListParamsSchema = z.object({ + value_list: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetRadarValueListsValueListParams = z.infer< + typeof GetRadarValueListsValueListParamsSchema + > + + export const GetRadarValueListsValueListResponseSchema = RadarValueListSchema + export type GetRadarValueListsValueListResponse = z.infer< + typeof GetRadarValueListsValueListResponseSchema + > + + export const PostRadarValueListsValueListParamsSchema = z.object({ + value_list: z.string().max(5000) + }) + export type PostRadarValueListsValueListParams = z.infer< + typeof PostRadarValueListsValueListParamsSchema + > + + export const PostRadarValueListsValueListResponseSchema = RadarValueListSchema + export type PostRadarValueListsValueListResponse = z.infer< + typeof PostRadarValueListsValueListResponseSchema + > + + export const DeleteRadarValueListsValueListParamsSchema = z.object({ + value_list: z.string().max(5000) + }) + export type DeleteRadarValueListsValueListParams = z.infer< + typeof DeleteRadarValueListsValueListParamsSchema + > + + export const DeleteRadarValueListsValueListResponseSchema = + DeletedRadarValueListSchema + export type DeleteRadarValueListsValueListResponse = z.infer< + typeof DeleteRadarValueListsValueListResponseSchema + > + + export const GetRefundsParamsSchema = z.object({ + /** Only return refunds for the charge specified by this charge ID. */ + charge: z + .string() + .describe( + 'Only return refunds for the charge specified by this charge ID.' + ) + .optional(), + /** Only return refunds that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return refunds that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return refunds for the PaymentIntent specified by this ID. */ + payment_intent: z + .string() + .max(5000) + .describe( + 'Only return refunds for the PaymentIntent specified by this ID.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetRefundsParams = z.infer + + export const GetRefundsResponseSchema = z.object({ + data: z.array(RefundSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/refunds')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetRefundsResponse = z.infer + + export const PostRefundsParamsSchema = z.object({}) + export type PostRefundsParams = z.infer + + export const PostRefundsResponseSchema = RefundSchema + export type PostRefundsResponse = z.infer + + export const GetRefundsRefundParamsSchema = z.object({ + refund: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetRefundsRefundParams = z.infer< + typeof GetRefundsRefundParamsSchema + > + + export const GetRefundsRefundResponseSchema = RefundSchema + export type GetRefundsRefundResponse = z.infer< + typeof GetRefundsRefundResponseSchema + > + + export const PostRefundsRefundParamsSchema = z.object({ refund: z.string() }) + export type PostRefundsRefundParams = z.infer< + typeof PostRefundsRefundParamsSchema + > + + export const PostRefundsRefundResponseSchema = RefundSchema + export type PostRefundsRefundResponse = z.infer< + typeof PostRefundsRefundResponseSchema + > + + export const PostRefundsRefundCancelParamsSchema = z.object({ + refund: z.string() + }) + export type PostRefundsRefundCancelParams = z.infer< + typeof PostRefundsRefundCancelParamsSchema + > + + export const PostRefundsRefundCancelResponseSchema = RefundSchema + export type PostRefundsRefundCancelResponse = z.infer< + typeof PostRefundsRefundCancelResponseSchema + > + + export const GetReportingReportRunsParamsSchema = z.object({ + /** Only return Report Runs that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return Report Runs that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetReportingReportRunsParams = z.infer< + typeof GetReportingReportRunsParamsSchema + > + + export const GetReportingReportRunsResponseSchema = z.object({ + data: z.array(ReportingReportRunSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/reporting/report_runs')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetReportingReportRunsResponse = z.infer< + typeof GetReportingReportRunsResponseSchema + > + + export const PostReportingReportRunsParamsSchema = z.object({}) + export type PostReportingReportRunsParams = z.infer< + typeof PostReportingReportRunsParamsSchema + > + + export const PostReportingReportRunsResponseSchema = ReportingReportRunSchema + export type PostReportingReportRunsResponse = z.infer< + typeof PostReportingReportRunsResponseSchema + > + + export const GetReportingReportRunsReportRunParamsSchema = z.object({ + report_run: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetReportingReportRunsReportRunParams = z.infer< + typeof GetReportingReportRunsReportRunParamsSchema + > + + export const GetReportingReportRunsReportRunResponseSchema = + ReportingReportRunSchema + export type GetReportingReportRunsReportRunResponse = z.infer< + typeof GetReportingReportRunsReportRunResponseSchema + > + + export const GetReportingReportTypesParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetReportingReportTypesParams = z.infer< + typeof GetReportingReportTypesParamsSchema + > + + export const GetReportingReportTypesResponseSchema = z.object({ + data: z.array(ReportingReportTypeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetReportingReportTypesResponse = z.infer< + typeof GetReportingReportTypesResponseSchema + > + + export const GetReportingReportTypesReportTypeParamsSchema = z.object({ + report_type: z.string(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetReportingReportTypesReportTypeParams = z.infer< + typeof GetReportingReportTypesReportTypeParamsSchema + > + + export const GetReportingReportTypesReportTypeResponseSchema = + ReportingReportTypeSchema + export type GetReportingReportTypesReportTypeResponse = z.infer< + typeof GetReportingReportTypesReportTypeResponseSchema + > + + export const GetReviewsParamsSchema = z.object({ + /** Only return reviews that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return reviews that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetReviewsParams = z.infer + + export const GetReviewsResponseSchema = z.object({ + data: z.array(ReviewSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetReviewsResponse = z.infer + + export const GetReviewsReviewParamsSchema = z.object({ + review: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetReviewsReviewParams = z.infer< + typeof GetReviewsReviewParamsSchema + > + + export const GetReviewsReviewResponseSchema = ReviewSchema + export type GetReviewsReviewResponse = z.infer< + typeof GetReviewsReviewResponseSchema + > + + export const PostReviewsReviewApproveParamsSchema = z.object({ + review: z.string().max(5000) + }) + export type PostReviewsReviewApproveParams = z.infer< + typeof PostReviewsReviewApproveParamsSchema + > + + export const PostReviewsReviewApproveResponseSchema = ReviewSchema + export type PostReviewsReviewApproveResponse = z.infer< + typeof PostReviewsReviewApproveResponseSchema + > + + export const GetSetupAttemptsParamsSchema = z.object({ + /** + * A filter on the list, based on the object `created` field. The value + * can be a string with an integer Unix timestamp or a + * dictionary with a number of different query options. + */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value\ncan be a string with an integer Unix timestamp or a\ndictionary with a number of different query options.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** + * Only return SetupAttempts created by the SetupIntent specified by + * this ID. + */ + setup_intent: z + .string() + .max(5000) + .describe( + 'Only return SetupAttempts created by the SetupIntent specified by\nthis ID.' + ), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetSetupAttemptsParams = z.infer< + typeof GetSetupAttemptsParamsSchema + > + + export const GetSetupAttemptsResponseSchema = z.object({ + data: z.array(SetupAttemptSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/setup_attempts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSetupAttemptsResponse = z.infer< + typeof GetSetupAttemptsResponseSchema + > + + export const GetSetupIntentsParamsSchema = z.object({ + /** + * 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: z + .boolean() + .describe( + "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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." + ) + .optional(), + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer: z + .string() + .max(5000) + .describe( + 'Only return SetupIntents for the customer specified by this customer ID.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return SetupIntents that associate with the specified payment method. */ + payment_method: z + .string() + .max(5000) + .describe( + 'Only return SetupIntents that associate with the specified payment method.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetSetupIntentsParams = z.infer< + typeof GetSetupIntentsParamsSchema + > + + export const GetSetupIntentsResponseSchema = z.object({ + data: z.array(SetupIntentSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/setup_intents')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSetupIntentsResponse = z.infer< + typeof GetSetupIntentsResponseSchema + > + + export const PostSetupIntentsParamsSchema = z.object({}) + export type PostSetupIntentsParams = z.infer< + typeof PostSetupIntentsParamsSchema + > + + export const PostSetupIntentsResponseSchema = SetupIntentSchema + export type PostSetupIntentsResponse = z.infer< + typeof PostSetupIntentsResponseSchema + > + + export const GetSetupIntentsIntentParamsSchema = z.object({ + intent: z.string().max(5000), + /** The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. */ + client_secret: z + .string() + .max(5000) + .describe( + 'The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSetupIntentsIntentParams = z.infer< + typeof GetSetupIntentsIntentParamsSchema + > + + export const GetSetupIntentsIntentResponseSchema = SetupIntentSchema + export type GetSetupIntentsIntentResponse = z.infer< + typeof GetSetupIntentsIntentResponseSchema + > + + export const PostSetupIntentsIntentParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostSetupIntentsIntentParams = z.infer< + typeof PostSetupIntentsIntentParamsSchema + > + + export const PostSetupIntentsIntentResponseSchema = SetupIntentSchema + export type PostSetupIntentsIntentResponse = z.infer< + typeof PostSetupIntentsIntentResponseSchema + > + + export const PostSetupIntentsIntentCancelParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostSetupIntentsIntentCancelParams = z.infer< + typeof PostSetupIntentsIntentCancelParamsSchema + > + + export const PostSetupIntentsIntentCancelResponseSchema = SetupIntentSchema + export type PostSetupIntentsIntentCancelResponse = z.infer< + typeof PostSetupIntentsIntentCancelResponseSchema + > + + export const PostSetupIntentsIntentConfirmParamsSchema = z.object({ + intent: z.string().max(5000) + }) + export type PostSetupIntentsIntentConfirmParams = z.infer< + typeof PostSetupIntentsIntentConfirmParamsSchema + > + + export const PostSetupIntentsIntentConfirmResponseSchema = SetupIntentSchema + export type PostSetupIntentsIntentConfirmResponse = z.infer< + typeof PostSetupIntentsIntentConfirmResponseSchema + > + + export const PostSetupIntentsIntentVerifyMicrodepositsParamsSchema = z.object( + { intent: z.string().max(5000) } + ) + export type PostSetupIntentsIntentVerifyMicrodepositsParams = z.infer< + typeof PostSetupIntentsIntentVerifyMicrodepositsParamsSchema + > + + export const PostSetupIntentsIntentVerifyMicrodepositsResponseSchema = + SetupIntentSchema + export type PostSetupIntentsIntentVerifyMicrodepositsResponse = z.infer< + typeof PostSetupIntentsIntentVerifyMicrodepositsResponseSchema + > + + export const GetShippingRatesParamsSchema = z.object({ + /** Only return shipping rates that are active or inactive. */ + active: z + .boolean() + .describe('Only return shipping rates that are active or inactive.') + .optional(), + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** Only return shipping rates for the given currency. */ + currency: z + .string() + .describe('Only return shipping rates for the given currency.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetShippingRatesParams = z.infer< + typeof GetShippingRatesParamsSchema + > + + export const GetShippingRatesResponseSchema = z.object({ + data: z.array(ShippingRateSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/shipping_rates')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetShippingRatesResponse = z.infer< + typeof GetShippingRatesResponseSchema + > + + export const PostShippingRatesParamsSchema = z.object({}) + export type PostShippingRatesParams = z.infer< + typeof PostShippingRatesParamsSchema + > + + export const PostShippingRatesResponseSchema = ShippingRateSchema + export type PostShippingRatesResponse = z.infer< + typeof PostShippingRatesResponseSchema + > + + export const GetShippingRatesShippingRateTokenParamsSchema = z.object({ + shipping_rate_token: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetShippingRatesShippingRateTokenParams = z.infer< + typeof GetShippingRatesShippingRateTokenParamsSchema + > + + export const GetShippingRatesShippingRateTokenResponseSchema = + ShippingRateSchema + export type GetShippingRatesShippingRateTokenResponse = z.infer< + typeof GetShippingRatesShippingRateTokenResponseSchema + > + + export const PostShippingRatesShippingRateTokenParamsSchema = z.object({ + shipping_rate_token: z.string().max(5000) + }) + export type PostShippingRatesShippingRateTokenParams = z.infer< + typeof PostShippingRatesShippingRateTokenParamsSchema + > + + export const PostShippingRatesShippingRateTokenResponseSchema = + ShippingRateSchema + export type PostShippingRatesShippingRateTokenResponse = z.infer< + typeof PostShippingRatesShippingRateTokenResponseSchema + > + + export const GetSigmaScheduledQueryRunsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetSigmaScheduledQueryRunsParams = z.infer< + typeof GetSigmaScheduledQueryRunsParamsSchema + > + + export const GetSigmaScheduledQueryRunsResponseSchema = z.object({ + data: z.array(ScheduledQueryRunSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/sigma/scheduled_query_runs')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSigmaScheduledQueryRunsResponse = z.infer< + typeof GetSigmaScheduledQueryRunsResponseSchema + > + + export const GetSigmaScheduledQueryRunsScheduledQueryRunParamsSchema = + z.object({ + scheduled_query_run: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSigmaScheduledQueryRunsScheduledQueryRunParams = z.infer< + typeof GetSigmaScheduledQueryRunsScheduledQueryRunParamsSchema + > + + export const GetSigmaScheduledQueryRunsScheduledQueryRunResponseSchema = + ScheduledQueryRunSchema + export type GetSigmaScheduledQueryRunsScheduledQueryRunResponse = z.infer< + typeof GetSigmaScheduledQueryRunsScheduledQueryRunResponseSchema + > + + export const PostSourcesParamsSchema = z.object({}) + export type PostSourcesParams = z.infer + + export const PostSourcesResponseSchema = SourceSchema + export type PostSourcesResponse = z.infer + + export const GetSourcesSourceParamsSchema = z.object({ + source: z.string().max(5000), + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret: z + .string() + .max(5000) + .describe( + 'The client secret of the source. Required if a publishable key is used to retrieve the source.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSourcesSourceParams = z.infer< + typeof GetSourcesSourceParamsSchema + > + + export const GetSourcesSourceResponseSchema = SourceSchema + export type GetSourcesSourceResponse = z.infer< + typeof GetSourcesSourceResponseSchema + > + + export const PostSourcesSourceParamsSchema = z.object({ + source: z.string().max(5000) + }) + export type PostSourcesSourceParams = z.infer< + typeof PostSourcesSourceParamsSchema + > + + export const PostSourcesSourceResponseSchema = SourceSchema + export type PostSourcesSourceResponse = z.infer< + typeof PostSourcesSourceResponseSchema + > + + export const GetSourcesSourceMandateNotificationsMandateNotificationParamsSchema = + z.object({ + mandate_notification: z.string().max(5000), + source: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSourcesSourceMandateNotificationsMandateNotificationParams = + z.infer< + typeof GetSourcesSourceMandateNotificationsMandateNotificationParamsSchema + > + + export const GetSourcesSourceMandateNotificationsMandateNotificationResponseSchema = + SourceMandateNotificationSchema + export type GetSourcesSourceMandateNotificationsMandateNotificationResponse = + z.infer< + typeof GetSourcesSourceMandateNotificationsMandateNotificationResponseSchema + > + + export const GetSourcesSourceSourceTransactionsParamsSchema = z.object({ + source: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetSourcesSourceSourceTransactionsParams = z.infer< + typeof GetSourcesSourceSourceTransactionsParamsSchema + > + + export const GetSourcesSourceSourceTransactionsResponseSchema = z.object({ + data: z.array(SourceTransactionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSourcesSourceSourceTransactionsResponse = z.infer< + typeof GetSourcesSourceSourceTransactionsResponseSchema + > + + export const GetSourcesSourceSourceTransactionsSourceTransactionParamsSchema = + z.object({ + source: z.string().max(5000), + source_transaction: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSourcesSourceSourceTransactionsSourceTransactionParams = + z.infer< + typeof GetSourcesSourceSourceTransactionsSourceTransactionParamsSchema + > + + export const GetSourcesSourceSourceTransactionsSourceTransactionResponseSchema = + SourceTransactionSchema + export type GetSourcesSourceSourceTransactionsSourceTransactionResponse = + z.infer< + typeof GetSourcesSourceSourceTransactionsSourceTransactionResponseSchema + > + + export const PostSourcesSourceVerifyParamsSchema = z.object({ + source: z.string().max(5000) + }) + export type PostSourcesSourceVerifyParams = z.infer< + typeof PostSourcesSourceVerifyParamsSchema + > + + export const PostSourcesSourceVerifyResponseSchema = SourceSchema + export type PostSourcesSourceVerifyResponse = z.infer< + typeof PostSourcesSourceVerifyResponseSchema + > + + export const GetSubscriptionItemsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** The ID of the subscription whose items will be retrieved. */ + subscription: z + .string() + .max(5000) + .describe('The ID of the subscription whose items will be retrieved.') + }) + export type GetSubscriptionItemsParams = z.infer< + typeof GetSubscriptionItemsParamsSchema + > + + export const GetSubscriptionItemsResponseSchema = z.object({ + data: z.array(SubscriptionItemSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/subscription_items')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSubscriptionItemsResponse = z.infer< + typeof GetSubscriptionItemsResponseSchema + > + + export const PostSubscriptionItemsParamsSchema = z.object({}) + export type PostSubscriptionItemsParams = z.infer< + typeof PostSubscriptionItemsParamsSchema + > + + export const PostSubscriptionItemsResponseSchema = SubscriptionItemSchema + export type PostSubscriptionItemsResponse = z.infer< + typeof PostSubscriptionItemsResponseSchema + > + + export const GetSubscriptionItemsItemParamsSchema = z.object({ + item: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSubscriptionItemsItemParams = z.infer< + typeof GetSubscriptionItemsItemParamsSchema + > + + export const GetSubscriptionItemsItemResponseSchema = SubscriptionItemSchema + export type GetSubscriptionItemsItemResponse = z.infer< + typeof GetSubscriptionItemsItemResponseSchema + > + + export const PostSubscriptionItemsItemParamsSchema = z.object({ + item: z.string().max(5000) + }) + export type PostSubscriptionItemsItemParams = z.infer< + typeof PostSubscriptionItemsItemParamsSchema + > + + export const PostSubscriptionItemsItemResponseSchema = SubscriptionItemSchema + export type PostSubscriptionItemsItemResponse = z.infer< + typeof PostSubscriptionItemsItemResponseSchema + > + + export const DeleteSubscriptionItemsItemParamsSchema = z.object({ + item: z.string().max(5000) + }) + export type DeleteSubscriptionItemsItemParams = z.infer< + typeof DeleteSubscriptionItemsItemParamsSchema + > + + export const DeleteSubscriptionItemsItemResponseSchema = + DeletedSubscriptionItemSchema + export type DeleteSubscriptionItemsItemResponse = z.infer< + typeof DeleteSubscriptionItemsItemResponseSchema + > + + export const GetSubscriptionItemsSubscriptionItemUsageRecordSummariesParamsSchema = + z.object({ + subscription_item: z.string(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetSubscriptionItemsSubscriptionItemUsageRecordSummariesParams = + z.infer< + typeof GetSubscriptionItemsSubscriptionItemUsageRecordSummariesParamsSchema + > + + export const GetSubscriptionItemsSubscriptionItemUsageRecordSummariesResponseSchema = + z.object({ + data: z.array(UsageRecordSummarySchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSubscriptionItemsSubscriptionItemUsageRecordSummariesResponse = + z.infer< + typeof GetSubscriptionItemsSubscriptionItemUsageRecordSummariesResponseSchema + > + + export const PostSubscriptionItemsSubscriptionItemUsageRecordsParamsSchema = + z.object({ subscription_item: z.string() }) + export type PostSubscriptionItemsSubscriptionItemUsageRecordsParams = z.infer< + typeof PostSubscriptionItemsSubscriptionItemUsageRecordsParamsSchema + > + + export const PostSubscriptionItemsSubscriptionItemUsageRecordsResponseSchema = + UsageRecordSchema + export type PostSubscriptionItemsSubscriptionItemUsageRecordsResponse = + z.infer< + typeof PostSubscriptionItemsSubscriptionItemUsageRecordsResponseSchema + > + + export const GetSubscriptionSchedulesParamsSchema = z.object({ + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at: 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() + ]) + .describe( + 'Only return subscription schedules that were created canceled the given date interval.' + ) + .optional(), + /** Only return subscription schedules that completed during the given date interval. */ + completed_at: 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() + ]) + .describe( + 'Only return subscription schedules that completed during the given date interval.' + ) + .optional(), + /** Only return subscription schedules that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return subscription schedules that were created during the given date interval.' + ) + .optional(), + /** Only return subscription schedules for the given customer. */ + customer: z + .string() + .max(5000) + .describe('Only return subscription schedules for the given customer.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return subscription schedules that were released during the given date interval. */ + released_at: 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() + ]) + .describe( + 'Only return subscription schedules that were released during the given date interval.' + ) + .optional(), + /** Only return subscription schedules that have not started yet. */ + scheduled: z + .boolean() + .describe('Only return subscription schedules that have not started yet.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetSubscriptionSchedulesParams = z.infer< + typeof GetSubscriptionSchedulesParamsSchema + > + + export const GetSubscriptionSchedulesResponseSchema = z.object({ + data: z.array(SubscriptionScheduleSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/subscription_schedules')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSubscriptionSchedulesResponse = z.infer< + typeof GetSubscriptionSchedulesResponseSchema + > + + export const PostSubscriptionSchedulesParamsSchema = z.object({}) + export type PostSubscriptionSchedulesParams = z.infer< + typeof PostSubscriptionSchedulesParamsSchema + > + + export const PostSubscriptionSchedulesResponseSchema = + SubscriptionScheduleSchema + export type PostSubscriptionSchedulesResponse = z.infer< + typeof PostSubscriptionSchedulesResponseSchema + > + + export const GetSubscriptionSchedulesScheduleParamsSchema = z.object({ + schedule: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSubscriptionSchedulesScheduleParams = z.infer< + typeof GetSubscriptionSchedulesScheduleParamsSchema + > + + export const GetSubscriptionSchedulesScheduleResponseSchema = + SubscriptionScheduleSchema + export type GetSubscriptionSchedulesScheduleResponse = z.infer< + typeof GetSubscriptionSchedulesScheduleResponseSchema + > + + export const PostSubscriptionSchedulesScheduleParamsSchema = z.object({ + schedule: z.string().max(5000) + }) + export type PostSubscriptionSchedulesScheduleParams = z.infer< + typeof PostSubscriptionSchedulesScheduleParamsSchema + > + + export const PostSubscriptionSchedulesScheduleResponseSchema = + SubscriptionScheduleSchema + export type PostSubscriptionSchedulesScheduleResponse = z.infer< + typeof PostSubscriptionSchedulesScheduleResponseSchema + > + + export const PostSubscriptionSchedulesScheduleCancelParamsSchema = z.object({ + schedule: z.string().max(5000) + }) + export type PostSubscriptionSchedulesScheduleCancelParams = z.infer< + typeof PostSubscriptionSchedulesScheduleCancelParamsSchema + > + + export const PostSubscriptionSchedulesScheduleCancelResponseSchema = + SubscriptionScheduleSchema + export type PostSubscriptionSchedulesScheduleCancelResponse = z.infer< + typeof PostSubscriptionSchedulesScheduleCancelResponseSchema + > + + export const PostSubscriptionSchedulesScheduleReleaseParamsSchema = z.object({ + schedule: z.string().max(5000) + }) + export type PostSubscriptionSchedulesScheduleReleaseParams = z.infer< + typeof PostSubscriptionSchedulesScheduleReleaseParamsSchema + > + + export const PostSubscriptionSchedulesScheduleReleaseResponseSchema = + SubscriptionScheduleSchema + export type PostSubscriptionSchedulesScheduleReleaseResponse = z.infer< + typeof PostSubscriptionSchedulesScheduleReleaseResponseSchema + > + + export const GetSubscriptionsParamsSchema = z.object({ + /** Filter subscriptions by their automatic tax settings. */ + automatic_tax: z + .object({ enabled: z.boolean() }) + .describe('Filter subscriptions by their automatic tax settings.') + .optional(), + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method: z + .enum(['charge_automatically', 'send_invoice']) + .describe( + 'The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.' + ) + .optional(), + /** Only return subscriptions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return subscriptions that were created during the given date interval.' + ) + .optional(), + /** Only return subscriptions whose current_period_end falls within the given date interval. */ + current_period_end: 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() + ]) + .describe( + 'Only return subscriptions whose current_period_end falls within the given date interval.' + ) + .optional(), + /** Only return subscriptions whose current_period_start falls within the given date interval. */ + current_period_start: 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() + ]) + .describe( + 'Only return subscriptions whose current_period_start falls within the given date interval.' + ) + .optional(), + /** The ID of the customer whose subscriptions will be retrieved. */ + customer: z + .string() + .max(5000) + .describe('The ID of the customer whose subscriptions will be retrieved.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Filter for subscriptions that contain this recurring price ID. */ + price: z + .string() + .max(5000) + .describe( + 'Filter for subscriptions that contain this recurring price ID.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + status: z + .enum([ + 'active', + 'all', + 'canceled', + 'ended', + 'incomplete', + 'incomplete_expired', + 'past_due', + 'paused', + 'trialing', + 'unpaid' + ]) + .describe( + 'The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.' + ) + .optional(), + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + test_clock: z + .string() + .max(5000) + .describe( + 'Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.' + ) + .optional() + }) + export type GetSubscriptionsParams = z.infer< + typeof GetSubscriptionsParamsSchema + > + + export const GetSubscriptionsResponseSchema = z.object({ + data: z.array(SubscriptionSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/subscriptions')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetSubscriptionsResponse = z.infer< + typeof GetSubscriptionsResponseSchema + > + + export const PostSubscriptionsParamsSchema = z.object({}) + export type PostSubscriptionsParams = z.infer< + typeof PostSubscriptionsParamsSchema + > + + export const PostSubscriptionsResponseSchema = SubscriptionSchema + export type PostSubscriptionsResponse = z.infer< + typeof PostSubscriptionsResponseSchema + > + + export const GetSubscriptionsSearchParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page: z + .string() + .max(5000) + .describe( + "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." + ) + .optional(), + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + query: z + .string() + .max(5000) + .describe( + 'The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).' + ) + }) + export type GetSubscriptionsSearchParams = z.infer< + typeof GetSubscriptionsSearchParamsSchema + > + + export const GetSubscriptionsSearchResponseSchema = z.object({ + data: z.array(SubscriptionSchema), + has_more: z.boolean(), + next_page: z.string().max(5000).nullable().optional(), + /** String representing the object's type. Objects of the same type share the same value. */ + object: z + .literal('search_result') + .describe( + "String representing the object's type. Objects of the same type share the same value." + ), + /** The total number of objects that match the query, only accurate up to 10,000. */ + total_count: z + .number() + .int() + .describe( + 'The total number of objects that match the query, only accurate up to 10,000.' + ) + .optional(), + url: z.string().max(5000) + }) + export type GetSubscriptionsSearchResponse = z.infer< + typeof GetSubscriptionsSearchResponseSchema + > + + export const GetSubscriptionsSubscriptionExposedIdParamsSchema = z.object({ + subscription_exposed_id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetSubscriptionsSubscriptionExposedIdParams = z.infer< + typeof GetSubscriptionsSubscriptionExposedIdParamsSchema + > + + export const GetSubscriptionsSubscriptionExposedIdResponseSchema = + SubscriptionSchema + export type GetSubscriptionsSubscriptionExposedIdResponse = z.infer< + typeof GetSubscriptionsSubscriptionExposedIdResponseSchema + > + + export const PostSubscriptionsSubscriptionExposedIdParamsSchema = z.object({ + subscription_exposed_id: z.string().max(5000) + }) + export type PostSubscriptionsSubscriptionExposedIdParams = z.infer< + typeof PostSubscriptionsSubscriptionExposedIdParamsSchema + > + + export const PostSubscriptionsSubscriptionExposedIdResponseSchema = + SubscriptionSchema + export type PostSubscriptionsSubscriptionExposedIdResponse = z.infer< + typeof PostSubscriptionsSubscriptionExposedIdResponseSchema + > + + export const DeleteSubscriptionsSubscriptionExposedIdParamsSchema = z.object({ + subscription_exposed_id: z.string().max(5000) + }) + export type DeleteSubscriptionsSubscriptionExposedIdParams = z.infer< + typeof DeleteSubscriptionsSubscriptionExposedIdParamsSchema + > + + export const DeleteSubscriptionsSubscriptionExposedIdResponseSchema = + SubscriptionSchema + export type DeleteSubscriptionsSubscriptionExposedIdResponse = z.infer< + typeof DeleteSubscriptionsSubscriptionExposedIdResponseSchema + > + + export const DeleteSubscriptionsSubscriptionExposedIdDiscountParamsSchema = + z.object({ subscription_exposed_id: z.string().max(5000) }) + export type DeleteSubscriptionsSubscriptionExposedIdDiscountParams = z.infer< + typeof DeleteSubscriptionsSubscriptionExposedIdDiscountParamsSchema + > + + export const DeleteSubscriptionsSubscriptionExposedIdDiscountResponseSchema = + DeletedDiscountSchema + export type DeleteSubscriptionsSubscriptionExposedIdDiscountResponse = + z.infer< + typeof DeleteSubscriptionsSubscriptionExposedIdDiscountResponseSchema + > + + export const PostSubscriptionsSubscriptionResumeParamsSchema = z.object({ + subscription: z.string().max(5000) + }) + export type PostSubscriptionsSubscriptionResumeParams = z.infer< + typeof PostSubscriptionsSubscriptionResumeParamsSchema + > + + export const PostSubscriptionsSubscriptionResumeResponseSchema = + SubscriptionSchema + export type PostSubscriptionsSubscriptionResumeResponse = z.infer< + typeof PostSubscriptionsSubscriptionResumeResponseSchema + > + + export const PostTaxCalculationsParamsSchema = z.object({}) + export type PostTaxCalculationsParams = z.infer< + typeof PostTaxCalculationsParamsSchema + > + + export const PostTaxCalculationsResponseSchema = TaxCalculationSchema + export type PostTaxCalculationsResponse = z.infer< + typeof PostTaxCalculationsResponseSchema + > + + export const GetTaxCalculationsCalculationParamsSchema = z.object({ + calculation: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxCalculationsCalculationParams = z.infer< + typeof GetTaxCalculationsCalculationParamsSchema + > + + export const GetTaxCalculationsCalculationResponseSchema = + TaxCalculationSchema + export type GetTaxCalculationsCalculationResponse = z.infer< + typeof GetTaxCalculationsCalculationResponseSchema + > + + export const GetTaxCalculationsCalculationLineItemsParamsSchema = z.object({ + calculation: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(500) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(500) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTaxCalculationsCalculationLineItemsParams = z.infer< + typeof GetTaxCalculationsCalculationLineItemsParamsSchema + > + + export const GetTaxCalculationsCalculationLineItemsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TaxCalculationLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/tax/calculations/[^/]+/line_items')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTaxCalculationsCalculationLineItemsResponse = z.infer< + typeof GetTaxCalculationsCalculationLineItemsResponseSchema + > + + export const GetTaxRegistrationsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** The status of the Tax Registration. */ + status: z + .enum(['active', 'all', 'expired', 'scheduled']) + .describe('The status of the Tax Registration.') + .optional() + }) + export type GetTaxRegistrationsParams = z.infer< + typeof GetTaxRegistrationsParamsSchema + > + + export const GetTaxRegistrationsResponseSchema = z.object({ + data: z.array(TaxRegistrationSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/tax/registrations')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTaxRegistrationsResponse = z.infer< + typeof GetTaxRegistrationsResponseSchema + > + + export const PostTaxRegistrationsParamsSchema = z.object({}) + export type PostTaxRegistrationsParams = z.infer< + typeof PostTaxRegistrationsParamsSchema + > + + export const PostTaxRegistrationsResponseSchema = TaxRegistrationSchema + export type PostTaxRegistrationsResponse = z.infer< + typeof PostTaxRegistrationsResponseSchema + > + + export const GetTaxRegistrationsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxRegistrationsIdParams = z.infer< + typeof GetTaxRegistrationsIdParamsSchema + > + + export const GetTaxRegistrationsIdResponseSchema = TaxRegistrationSchema + export type GetTaxRegistrationsIdResponse = z.infer< + typeof GetTaxRegistrationsIdResponseSchema + > + + export const PostTaxRegistrationsIdParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostTaxRegistrationsIdParams = z.infer< + typeof PostTaxRegistrationsIdParamsSchema + > + + export const PostTaxRegistrationsIdResponseSchema = TaxRegistrationSchema + export type PostTaxRegistrationsIdResponse = z.infer< + typeof PostTaxRegistrationsIdResponseSchema + > + + export const GetTaxSettingsParamsSchema = z.object({ + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxSettingsParams = z.infer + + export const GetTaxSettingsResponseSchema = TaxSettingsSchema + export type GetTaxSettingsResponse = z.infer< + typeof GetTaxSettingsResponseSchema + > + + export const PostTaxSettingsParamsSchema = z.object({}) + export type PostTaxSettingsParams = z.infer< + typeof PostTaxSettingsParamsSchema + > + + export const PostTaxSettingsResponseSchema = TaxSettingsSchema + export type PostTaxSettingsResponse = z.infer< + typeof PostTaxSettingsResponseSchema + > + + export const PostTaxTransactionsCreateFromCalculationParamsSchema = z.object( + {} + ) + export type PostTaxTransactionsCreateFromCalculationParams = z.infer< + typeof PostTaxTransactionsCreateFromCalculationParamsSchema + > + + export const PostTaxTransactionsCreateFromCalculationResponseSchema = + TaxTransactionSchema + export type PostTaxTransactionsCreateFromCalculationResponse = z.infer< + typeof PostTaxTransactionsCreateFromCalculationResponseSchema + > + + export const PostTaxTransactionsCreateReversalParamsSchema = z.object({}) + export type PostTaxTransactionsCreateReversalParams = z.infer< + typeof PostTaxTransactionsCreateReversalParamsSchema + > + + export const PostTaxTransactionsCreateReversalResponseSchema = + TaxTransactionSchema + export type PostTaxTransactionsCreateReversalResponse = z.infer< + typeof PostTaxTransactionsCreateReversalResponseSchema + > + + export const GetTaxTransactionsTransactionParamsSchema = z.object({ + transaction: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxTransactionsTransactionParams = z.infer< + typeof GetTaxTransactionsTransactionParamsSchema + > + + export const GetTaxTransactionsTransactionResponseSchema = + TaxTransactionSchema + export type GetTaxTransactionsTransactionResponse = z.infer< + typeof GetTaxTransactionsTransactionResponseSchema + > + + export const GetTaxTransactionsTransactionLineItemsParamsSchema = z.object({ + transaction: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(500) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(500) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTaxTransactionsTransactionLineItemsParams = z.infer< + typeof GetTaxTransactionsTransactionLineItemsParamsSchema + > + + export const GetTaxTransactionsTransactionLineItemsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TaxTransactionLineItemSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/tax/transactions/[^/]+/line_items')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTaxTransactionsTransactionLineItemsResponse = z.infer< + typeof GetTaxTransactionsTransactionLineItemsResponseSchema + > + + export const GetTaxCodesParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTaxCodesParams = z.infer + + export const GetTaxCodesResponseSchema = z.object({ + data: z.array(TaxCodeSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTaxCodesResponse = z.infer + + export const GetTaxCodesIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxCodesIdParams = z.infer + + export const GetTaxCodesIdResponseSchema = TaxCodeSchema + export type GetTaxCodesIdResponse = z.infer< + typeof GetTaxCodesIdResponseSchema + > + + export const GetTaxIdsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. */ + owner: z + .object({ + account: z.string().optional(), + customer: z.string().max(5000).optional(), + type: z.enum(['account', 'application', 'customer', 'self']) + }) + .describe( + 'The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTaxIdsParams = z.infer + + export const GetTaxIdsResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(TaxIdSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTaxIdsResponse = z.infer + + export const PostTaxIdsParamsSchema = z.object({}) + export type PostTaxIdsParams = z.infer + + export const PostTaxIdsResponseSchema = TaxIdSchema + export type PostTaxIdsResponse = z.infer + + export const GetTaxIdsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxIdsIdParams = z.infer + + export const GetTaxIdsIdResponseSchema = TaxIdSchema + export type GetTaxIdsIdResponse = z.infer + + export const DeleteTaxIdsIdParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type DeleteTaxIdsIdParams = z.infer + + export const DeleteTaxIdsIdResponseSchema = DeletedTaxIdSchema + export type DeleteTaxIdsIdResponse = z.infer< + typeof DeleteTaxIdsIdResponseSchema + > + + export const GetTaxRatesParamsSchema = z.object({ + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + active: z + .boolean() + .describe( + 'Optional flag to filter by tax rates that are either active or inactive (archived).' + ) + .optional(), + /** Optional range for filtering created date. */ + 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() + ]) + .describe('Optional range for filtering created date.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ + inclusive: z + .boolean() + .describe( + 'Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTaxRatesParams = z.infer + + export const GetTaxRatesResponseSchema = z.object({ + data: z.array(TaxRateSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/tax_rates')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTaxRatesResponse = z.infer + + export const PostTaxRatesParamsSchema = z.object({}) + export type PostTaxRatesParams = z.infer + + export const PostTaxRatesResponseSchema = TaxRateSchema + export type PostTaxRatesResponse = z.infer + + export const GetTaxRatesTaxRateParamsSchema = z.object({ + tax_rate: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTaxRatesTaxRateParams = z.infer< + typeof GetTaxRatesTaxRateParamsSchema + > + + export const GetTaxRatesTaxRateResponseSchema = TaxRateSchema + export type GetTaxRatesTaxRateResponse = z.infer< + typeof GetTaxRatesTaxRateResponseSchema + > + + export const PostTaxRatesTaxRateParamsSchema = z.object({ + tax_rate: z.string().max(5000) + }) + export type PostTaxRatesTaxRateParams = z.infer< + typeof PostTaxRatesTaxRateParamsSchema + > + + export const PostTaxRatesTaxRateResponseSchema = TaxRateSchema + export type PostTaxRatesTaxRateResponse = z.infer< + typeof PostTaxRatesTaxRateResponseSchema + > + + export const GetTerminalConfigurationsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** if present, only return the account default or non-default configurations. */ + is_account_default: z + .boolean() + .describe( + 'if present, only return the account default or non-default configurations.' + ) + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTerminalConfigurationsParams = z.infer< + typeof GetTerminalConfigurationsParamsSchema + > + + export const GetTerminalConfigurationsResponseSchema = z.object({ + data: z.array(TerminalConfigurationSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/terminal/configurations')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTerminalConfigurationsResponse = z.infer< + typeof GetTerminalConfigurationsResponseSchema + > + + export const PostTerminalConfigurationsParamsSchema = z.object({}) + export type PostTerminalConfigurationsParams = z.infer< + typeof PostTerminalConfigurationsParamsSchema + > + + export const PostTerminalConfigurationsResponseSchema = + TerminalConfigurationSchema + export type PostTerminalConfigurationsResponse = z.infer< + typeof PostTerminalConfigurationsResponseSchema + > + + export const GetTerminalConfigurationsConfigurationParamsSchema = z.object({ + configuration: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTerminalConfigurationsConfigurationParams = z.infer< + typeof GetTerminalConfigurationsConfigurationParamsSchema + > + + export const GetTerminalConfigurationsConfigurationResponseSchema = z.union([ + TerminalConfigurationSchema, + DeletedTerminalConfigurationSchema + ]) + export type GetTerminalConfigurationsConfigurationResponse = z.infer< + typeof GetTerminalConfigurationsConfigurationResponseSchema + > + + export const PostTerminalConfigurationsConfigurationParamsSchema = z.object({ + configuration: z.string().max(5000) + }) + export type PostTerminalConfigurationsConfigurationParams = z.infer< + typeof PostTerminalConfigurationsConfigurationParamsSchema + > + + export const PostTerminalConfigurationsConfigurationResponseSchema = z.union([ + TerminalConfigurationSchema, + DeletedTerminalConfigurationSchema + ]) + export type PostTerminalConfigurationsConfigurationResponse = z.infer< + typeof PostTerminalConfigurationsConfigurationResponseSchema + > + + export const DeleteTerminalConfigurationsConfigurationParamsSchema = z.object( + { configuration: z.string().max(5000) } + ) + export type DeleteTerminalConfigurationsConfigurationParams = z.infer< + typeof DeleteTerminalConfigurationsConfigurationParamsSchema + > + + export const DeleteTerminalConfigurationsConfigurationResponseSchema = + DeletedTerminalConfigurationSchema + export type DeleteTerminalConfigurationsConfigurationResponse = z.infer< + typeof DeleteTerminalConfigurationsConfigurationResponseSchema + > + + export const PostTerminalConnectionTokensParamsSchema = z.object({}) + export type PostTerminalConnectionTokensParams = z.infer< + typeof PostTerminalConnectionTokensParamsSchema + > + + export const PostTerminalConnectionTokensResponseSchema = + TerminalConnectionTokenSchema + export type PostTerminalConnectionTokensResponse = z.infer< + typeof PostTerminalConnectionTokensResponseSchema + > + + export const GetTerminalLocationsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTerminalLocationsParams = z.infer< + typeof GetTerminalLocationsParamsSchema + > + + export const GetTerminalLocationsResponseSchema = z.object({ + data: z.array(TerminalLocationSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/terminal/locations')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTerminalLocationsResponse = z.infer< + typeof GetTerminalLocationsResponseSchema + > + + export const PostTerminalLocationsParamsSchema = z.object({}) + export type PostTerminalLocationsParams = z.infer< + typeof PostTerminalLocationsParamsSchema + > + + export const PostTerminalLocationsResponseSchema = TerminalLocationSchema + export type PostTerminalLocationsResponse = z.infer< + typeof PostTerminalLocationsResponseSchema + > + + export const GetTerminalLocationsLocationParamsSchema = z.object({ + location: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTerminalLocationsLocationParams = z.infer< + typeof GetTerminalLocationsLocationParamsSchema + > + + export const GetTerminalLocationsLocationResponseSchema = z.union([ + TerminalLocationSchema, + DeletedTerminalLocationSchema + ]) + export type GetTerminalLocationsLocationResponse = z.infer< + typeof GetTerminalLocationsLocationResponseSchema + > + + export const PostTerminalLocationsLocationParamsSchema = z.object({ + location: z.string().max(5000) + }) + export type PostTerminalLocationsLocationParams = z.infer< + typeof PostTerminalLocationsLocationParamsSchema + > + + export const PostTerminalLocationsLocationResponseSchema = z.union([ + TerminalLocationSchema, + DeletedTerminalLocationSchema + ]) + export type PostTerminalLocationsLocationResponse = z.infer< + typeof PostTerminalLocationsLocationResponseSchema + > + + export const DeleteTerminalLocationsLocationParamsSchema = z.object({ + location: z.string().max(5000) + }) + export type DeleteTerminalLocationsLocationParams = z.infer< + typeof DeleteTerminalLocationsLocationParamsSchema + > + + export const DeleteTerminalLocationsLocationResponseSchema = + DeletedTerminalLocationSchema + export type DeleteTerminalLocationsLocationResponse = z.infer< + typeof DeleteTerminalLocationsLocationResponseSchema + > + + export const GetTerminalReadersParamsSchema = z.object({ + /** Filters readers by device type */ + device_type: z + .enum([ + 'bbpos_chipper2x', + 'bbpos_wisepad3', + 'bbpos_wisepos_e', + 'mobile_phone_reader', + 'simulated_wisepos_e', + 'stripe_m2', + 'stripe_s700', + 'verifone_P400' + ]) + .describe('Filters readers by device type') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A location ID to filter the response list to only readers at the specific location */ + location: z + .string() + .max(5000) + .describe( + 'A location ID to filter the response list to only readers at the specific location' + ) + .optional(), + /** Filters readers by serial number */ + serial_number: z + .string() + .max(5000) + .describe('Filters readers by serial number') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** A status filter to filter readers to only offline or online readers */ + status: z + .enum(['offline', 'online']) + .describe( + 'A status filter to filter readers to only offline or online readers' + ) + .optional() + }) + export type GetTerminalReadersParams = z.infer< + typeof GetTerminalReadersParamsSchema + > + + export const GetTerminalReadersResponseSchema = z.object({ + /** A list of readers */ + data: z.array(TerminalReaderSchema).describe('A list of readers'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTerminalReadersResponse = z.infer< + typeof GetTerminalReadersResponseSchema + > + + export const PostTerminalReadersParamsSchema = z.object({}) + export type PostTerminalReadersParams = z.infer< + typeof PostTerminalReadersParamsSchema + > + + export const PostTerminalReadersResponseSchema = TerminalReaderSchema + export type PostTerminalReadersResponse = z.infer< + typeof PostTerminalReadersResponseSchema + > + + export const GetTerminalReadersReaderParamsSchema = z.object({ + reader: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTerminalReadersReaderParams = z.infer< + typeof GetTerminalReadersReaderParamsSchema + > + + export const GetTerminalReadersReaderResponseSchema = z.union([ + TerminalReaderSchema, + DeletedTerminalReaderSchema + ]) + export type GetTerminalReadersReaderResponse = z.infer< + typeof GetTerminalReadersReaderResponseSchema + > + + export const PostTerminalReadersReaderParamsSchema = z.object({ + reader: z.string().max(5000) + }) + export type PostTerminalReadersReaderParams = z.infer< + typeof PostTerminalReadersReaderParamsSchema + > + + export const PostTerminalReadersReaderResponseSchema = z.union([ + TerminalReaderSchema, + DeletedTerminalReaderSchema + ]) + export type PostTerminalReadersReaderResponse = z.infer< + typeof PostTerminalReadersReaderResponseSchema + > + + export const DeleteTerminalReadersReaderParamsSchema = z.object({ + reader: z.string().max(5000) + }) + export type DeleteTerminalReadersReaderParams = z.infer< + typeof DeleteTerminalReadersReaderParamsSchema + > + + export const DeleteTerminalReadersReaderResponseSchema = + DeletedTerminalReaderSchema + export type DeleteTerminalReadersReaderResponse = z.infer< + typeof DeleteTerminalReadersReaderResponseSchema + > + + export const PostTerminalReadersReaderCancelActionParamsSchema = z.object({ + reader: z.string().max(5000) + }) + export type PostTerminalReadersReaderCancelActionParams = z.infer< + typeof PostTerminalReadersReaderCancelActionParamsSchema + > + + export const PostTerminalReadersReaderCancelActionResponseSchema = + TerminalReaderSchema + export type PostTerminalReadersReaderCancelActionResponse = z.infer< + typeof PostTerminalReadersReaderCancelActionResponseSchema + > + + export const PostTerminalReadersReaderProcessPaymentIntentParamsSchema = + z.object({ reader: z.string().max(5000) }) + export type PostTerminalReadersReaderProcessPaymentIntentParams = z.infer< + typeof PostTerminalReadersReaderProcessPaymentIntentParamsSchema + > + + export const PostTerminalReadersReaderProcessPaymentIntentResponseSchema = + TerminalReaderSchema + export type PostTerminalReadersReaderProcessPaymentIntentResponse = z.infer< + typeof PostTerminalReadersReaderProcessPaymentIntentResponseSchema + > + + export const PostTerminalReadersReaderProcessSetupIntentParamsSchema = + z.object({ reader: z.string().max(5000) }) + export type PostTerminalReadersReaderProcessSetupIntentParams = z.infer< + typeof PostTerminalReadersReaderProcessSetupIntentParamsSchema + > + + export const PostTerminalReadersReaderProcessSetupIntentResponseSchema = + TerminalReaderSchema + export type PostTerminalReadersReaderProcessSetupIntentResponse = z.infer< + typeof PostTerminalReadersReaderProcessSetupIntentResponseSchema + > + + export const PostTerminalReadersReaderRefundPaymentParamsSchema = z.object({ + reader: z.string().max(5000) + }) + export type PostTerminalReadersReaderRefundPaymentParams = z.infer< + typeof PostTerminalReadersReaderRefundPaymentParamsSchema + > + + export const PostTerminalReadersReaderRefundPaymentResponseSchema = + TerminalReaderSchema + export type PostTerminalReadersReaderRefundPaymentResponse = z.infer< + typeof PostTerminalReadersReaderRefundPaymentResponseSchema + > + + export const PostTerminalReadersReaderSetReaderDisplayParamsSchema = z.object( + { reader: z.string().max(5000) } + ) + export type PostTerminalReadersReaderSetReaderDisplayParams = z.infer< + typeof PostTerminalReadersReaderSetReaderDisplayParamsSchema + > + + export const PostTerminalReadersReaderSetReaderDisplayResponseSchema = + TerminalReaderSchema + export type PostTerminalReadersReaderSetReaderDisplayResponse = z.infer< + typeof PostTerminalReadersReaderSetReaderDisplayResponseSchema + > + + export const PostTestHelpersConfirmationTokensParamsSchema = z.object({}) + export type PostTestHelpersConfirmationTokensParams = z.infer< + typeof PostTestHelpersConfirmationTokensParamsSchema + > + + export const PostTestHelpersConfirmationTokensResponseSchema = + ConfirmationTokenSchema + export type PostTestHelpersConfirmationTokensResponse = z.infer< + typeof PostTestHelpersConfirmationTokensResponseSchema + > + + export const PostTestHelpersCustomersCustomerFundCashBalanceParamsSchema = + z.object({ customer: z.string().max(5000) }) + export type PostTestHelpersCustomersCustomerFundCashBalanceParams = z.infer< + typeof PostTestHelpersCustomersCustomerFundCashBalanceParamsSchema + > + + export const PostTestHelpersCustomersCustomerFundCashBalanceResponseSchema = + CustomerCashBalanceTransactionSchema + export type PostTestHelpersCustomersCustomerFundCashBalanceResponse = z.infer< + typeof PostTestHelpersCustomersCustomerFundCashBalanceResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsParamsSchema = z.object({}) + export type PostTestHelpersIssuingAuthorizationsParams = z.infer< + typeof PostTestHelpersIssuingAuthorizationsParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsResponse = z.infer< + typeof PostTestHelpersIssuingAuthorizationsResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationCaptureParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostTestHelpersIssuingAuthorizationsAuthorizationCaptureParams = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationCaptureParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationCaptureResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsAuthorizationCaptureResponse = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationCaptureResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationExpireParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostTestHelpersIssuingAuthorizationsAuthorizationExpireParams = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationExpireParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationExpireResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsAuthorizationExpireResponse = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationExpireResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountParams = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountResponse = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondParams = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondResponse = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationIncrementParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostTestHelpersIssuingAuthorizationsAuthorizationIncrementParams = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationIncrementParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationIncrementResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsAuthorizationIncrementResponse = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationIncrementResponseSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationReverseParamsSchema = + z.object({ authorization: z.string().max(5000) }) + export type PostTestHelpersIssuingAuthorizationsAuthorizationReverseParams = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationReverseParamsSchema + > + + export const PostTestHelpersIssuingAuthorizationsAuthorizationReverseResponseSchema = + IssuingAuthorizationSchema + export type PostTestHelpersIssuingAuthorizationsAuthorizationReverseResponse = + z.infer< + typeof PostTestHelpersIssuingAuthorizationsAuthorizationReverseResponseSchema + > + + export const PostTestHelpersIssuingCardsCardShippingDeliverParamsSchema = + z.object({ card: z.string().max(5000) }) + export type PostTestHelpersIssuingCardsCardShippingDeliverParams = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingDeliverParamsSchema + > + + export const PostTestHelpersIssuingCardsCardShippingDeliverResponseSchema = + IssuingCardSchema + export type PostTestHelpersIssuingCardsCardShippingDeliverResponse = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingDeliverResponseSchema + > + + export const PostTestHelpersIssuingCardsCardShippingFailParamsSchema = + z.object({ card: z.string().max(5000) }) + export type PostTestHelpersIssuingCardsCardShippingFailParams = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingFailParamsSchema + > + + export const PostTestHelpersIssuingCardsCardShippingFailResponseSchema = + IssuingCardSchema + export type PostTestHelpersIssuingCardsCardShippingFailResponse = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingFailResponseSchema + > + + export const PostTestHelpersIssuingCardsCardShippingReturnParamsSchema = + z.object({ card: z.string().max(5000) }) + export type PostTestHelpersIssuingCardsCardShippingReturnParams = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingReturnParamsSchema + > + + export const PostTestHelpersIssuingCardsCardShippingReturnResponseSchema = + IssuingCardSchema + export type PostTestHelpersIssuingCardsCardShippingReturnResponse = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingReturnResponseSchema + > + + export const PostTestHelpersIssuingCardsCardShippingShipParamsSchema = + z.object({ card: z.string().max(5000) }) + export type PostTestHelpersIssuingCardsCardShippingShipParams = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingShipParamsSchema + > + + export const PostTestHelpersIssuingCardsCardShippingShipResponseSchema = + IssuingCardSchema + export type PostTestHelpersIssuingCardsCardShippingShipResponse = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingShipResponseSchema + > + + export const PostTestHelpersIssuingCardsCardShippingSubmitParamsSchema = + z.object({ card: z.string().max(5000) }) + export type PostTestHelpersIssuingCardsCardShippingSubmitParams = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingSubmitParamsSchema + > + + export const PostTestHelpersIssuingCardsCardShippingSubmitResponseSchema = + IssuingCardSchema + export type PostTestHelpersIssuingCardsCardShippingSubmitResponse = z.infer< + typeof PostTestHelpersIssuingCardsCardShippingSubmitResponseSchema + > + + export const PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamsSchema = + z.object({ personalization_design: z.string().max(5000) }) + export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParams = + z.infer< + typeof PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamsSchema + > + + export const PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponseSchema = + IssuingPersonalizationDesignSchema + export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponse = + z.infer< + typeof PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponseSchema + > + + export const PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamsSchema = + z.object({ personalization_design: z.string().max(5000) }) + export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParams = + z.infer< + typeof PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamsSchema + > + + export const PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponseSchema = + IssuingPersonalizationDesignSchema + export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponse = + z.infer< + typeof PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponseSchema + > + + export const PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamsSchema = + z.object({ personalization_design: z.string().max(5000) }) + export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParams = + z.infer< + typeof PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamsSchema + > + + export const PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponseSchema = + IssuingPersonalizationDesignSchema + export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponse = + z.infer< + typeof PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponseSchema + > + + export const PostTestHelpersIssuingSettlementsParamsSchema = z.object({}) + export type PostTestHelpersIssuingSettlementsParams = z.infer< + typeof PostTestHelpersIssuingSettlementsParamsSchema + > + + export const PostTestHelpersIssuingSettlementsResponseSchema = + IssuingSettlementSchema + export type PostTestHelpersIssuingSettlementsResponse = z.infer< + typeof PostTestHelpersIssuingSettlementsResponseSchema + > + + export const PostTestHelpersIssuingSettlementsSettlementCompleteParamsSchema = + z.object({ + /** The settlement token to mark as complete. */ + settlement: z + .string() + .max(5000) + .describe('The settlement token to mark as complete.') + }) + export type PostTestHelpersIssuingSettlementsSettlementCompleteParams = + z.infer< + typeof PostTestHelpersIssuingSettlementsSettlementCompleteParamsSchema + > + + export const PostTestHelpersIssuingSettlementsSettlementCompleteResponseSchema = + IssuingSettlementSchema + export type PostTestHelpersIssuingSettlementsSettlementCompleteResponse = + z.infer< + typeof PostTestHelpersIssuingSettlementsSettlementCompleteResponseSchema + > + + export const PostTestHelpersIssuingTransactionsCreateForceCaptureParamsSchema = + z.object({}) + export type PostTestHelpersIssuingTransactionsCreateForceCaptureParams = + z.infer< + typeof PostTestHelpersIssuingTransactionsCreateForceCaptureParamsSchema + > + + export const PostTestHelpersIssuingTransactionsCreateForceCaptureResponseSchema = + IssuingTransactionSchema + export type PostTestHelpersIssuingTransactionsCreateForceCaptureResponse = + z.infer< + typeof PostTestHelpersIssuingTransactionsCreateForceCaptureResponseSchema + > + + export const PostTestHelpersIssuingTransactionsCreateUnlinkedRefundParamsSchema = + z.object({}) + export type PostTestHelpersIssuingTransactionsCreateUnlinkedRefundParams = + z.infer< + typeof PostTestHelpersIssuingTransactionsCreateUnlinkedRefundParamsSchema + > + + export const PostTestHelpersIssuingTransactionsCreateUnlinkedRefundResponseSchema = + IssuingTransactionSchema + export type PostTestHelpersIssuingTransactionsCreateUnlinkedRefundResponse = + z.infer< + typeof PostTestHelpersIssuingTransactionsCreateUnlinkedRefundResponseSchema + > + + export const PostTestHelpersIssuingTransactionsTransactionRefundParamsSchema = + z.object({ transaction: z.string().max(5000) }) + export type PostTestHelpersIssuingTransactionsTransactionRefundParams = + z.infer< + typeof PostTestHelpersIssuingTransactionsTransactionRefundParamsSchema + > + + export const PostTestHelpersIssuingTransactionsTransactionRefundResponseSchema = + IssuingTransactionSchema + export type PostTestHelpersIssuingTransactionsTransactionRefundResponse = + z.infer< + typeof PostTestHelpersIssuingTransactionsTransactionRefundResponseSchema + > + + export const PostTestHelpersRefundsRefundExpireParamsSchema = z.object({ + refund: z.string() + }) + export type PostTestHelpersRefundsRefundExpireParams = z.infer< + typeof PostTestHelpersRefundsRefundExpireParamsSchema + > + + export const PostTestHelpersRefundsRefundExpireResponseSchema = RefundSchema + export type PostTestHelpersRefundsRefundExpireResponse = z.infer< + typeof PostTestHelpersRefundsRefundExpireResponseSchema + > + + export const PostTestHelpersTerminalReadersReaderPresentPaymentMethodParamsSchema = + z.object({ reader: z.string().max(5000) }) + export type PostTestHelpersTerminalReadersReaderPresentPaymentMethodParams = + z.infer< + typeof PostTestHelpersTerminalReadersReaderPresentPaymentMethodParamsSchema + > + + export const PostTestHelpersTerminalReadersReaderPresentPaymentMethodResponseSchema = + TerminalReaderSchema + export type PostTestHelpersTerminalReadersReaderPresentPaymentMethodResponse = + z.infer< + typeof PostTestHelpersTerminalReadersReaderPresentPaymentMethodResponseSchema + > + + export const GetTestHelpersTestClocksParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTestHelpersTestClocksParams = z.infer< + typeof GetTestHelpersTestClocksParamsSchema + > + + export const GetTestHelpersTestClocksResponseSchema = z.object({ + data: z.array(TestHelpersTestClockSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/test_helpers/test_clocks')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTestHelpersTestClocksResponse = z.infer< + typeof GetTestHelpersTestClocksResponseSchema + > + + export const PostTestHelpersTestClocksParamsSchema = z.object({}) + export type PostTestHelpersTestClocksParams = z.infer< + typeof PostTestHelpersTestClocksParamsSchema + > + + export const PostTestHelpersTestClocksResponseSchema = + TestHelpersTestClockSchema + export type PostTestHelpersTestClocksResponse = z.infer< + typeof PostTestHelpersTestClocksResponseSchema + > + + export const GetTestHelpersTestClocksTestClockParamsSchema = z.object({ + test_clock: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTestHelpersTestClocksTestClockParams = z.infer< + typeof GetTestHelpersTestClocksTestClockParamsSchema + > + + export const GetTestHelpersTestClocksTestClockResponseSchema = + TestHelpersTestClockSchema + export type GetTestHelpersTestClocksTestClockResponse = z.infer< + typeof GetTestHelpersTestClocksTestClockResponseSchema + > + + export const DeleteTestHelpersTestClocksTestClockParamsSchema = z.object({ + test_clock: z.string().max(5000) + }) + export type DeleteTestHelpersTestClocksTestClockParams = z.infer< + typeof DeleteTestHelpersTestClocksTestClockParamsSchema + > + + export const DeleteTestHelpersTestClocksTestClockResponseSchema = + DeletedTestHelpersTestClockSchema + export type DeleteTestHelpersTestClocksTestClockResponse = z.infer< + typeof DeleteTestHelpersTestClocksTestClockResponseSchema + > + + export const PostTestHelpersTestClocksTestClockAdvanceParamsSchema = z.object( + { test_clock: z.string().max(5000) } + ) + export type PostTestHelpersTestClocksTestClockAdvanceParams = z.infer< + typeof PostTestHelpersTestClocksTestClockAdvanceParamsSchema + > + + export const PostTestHelpersTestClocksTestClockAdvanceResponseSchema = + TestHelpersTestClockSchema + export type PostTestHelpersTestClocksTestClockAdvanceResponse = z.infer< + typeof PostTestHelpersTestClocksTestClockAdvanceResponseSchema + > + + export const PostTestHelpersTreasuryInboundTransfersIdFailParamsSchema = + z.object({ id: z.string().max(5000) }) + export type PostTestHelpersTreasuryInboundTransfersIdFailParams = z.infer< + typeof PostTestHelpersTreasuryInboundTransfersIdFailParamsSchema + > + + export const PostTestHelpersTreasuryInboundTransfersIdFailResponseSchema = + TreasuryInboundTransferSchema + export type PostTestHelpersTreasuryInboundTransfersIdFailResponse = z.infer< + typeof PostTestHelpersTreasuryInboundTransfersIdFailResponseSchema + > + + export const PostTestHelpersTreasuryInboundTransfersIdReturnParamsSchema = + z.object({ id: z.string().max(5000) }) + export type PostTestHelpersTreasuryInboundTransfersIdReturnParams = z.infer< + typeof PostTestHelpersTreasuryInboundTransfersIdReturnParamsSchema + > + + export const PostTestHelpersTreasuryInboundTransfersIdReturnResponseSchema = + TreasuryInboundTransferSchema + export type PostTestHelpersTreasuryInboundTransfersIdReturnResponse = z.infer< + typeof PostTestHelpersTreasuryInboundTransfersIdReturnResponseSchema + > + + export const PostTestHelpersTreasuryInboundTransfersIdSucceedParamsSchema = + z.object({ id: z.string().max(5000) }) + export type PostTestHelpersTreasuryInboundTransfersIdSucceedParams = z.infer< + typeof PostTestHelpersTreasuryInboundTransfersIdSucceedParamsSchema + > + + export const PostTestHelpersTreasuryInboundTransfersIdSucceedResponseSchema = + TreasuryInboundTransferSchema + export type PostTestHelpersTreasuryInboundTransfersIdSucceedResponse = + z.infer< + typeof PostTestHelpersTreasuryInboundTransfersIdSucceedResponseSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdParamsSchema = z.object( + { id: z.string().max(5000) } + ) + export type PostTestHelpersTreasuryOutboundPaymentsIdParams = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdParamsSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdResponseSchema = + TreasuryOutboundPaymentSchema + export type PostTestHelpersTreasuryOutboundPaymentsIdResponse = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdResponseSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdFailParamsSchema = + z.object({ id: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundPaymentsIdFailParams = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdFailParamsSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdFailResponseSchema = + TreasuryOutboundPaymentSchema + export type PostTestHelpersTreasuryOutboundPaymentsIdFailResponse = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdFailResponseSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdPostParamsSchema = + z.object({ id: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundPaymentsIdPostParams = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdPostParamsSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdPostResponseSchema = + TreasuryOutboundPaymentSchema + export type PostTestHelpersTreasuryOutboundPaymentsIdPostResponse = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdPostResponseSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdReturnParamsSchema = + z.object({ id: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundPaymentsIdReturnParams = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdReturnParamsSchema + > + + export const PostTestHelpersTreasuryOutboundPaymentsIdReturnResponseSchema = + TreasuryOutboundPaymentSchema + export type PostTestHelpersTreasuryOutboundPaymentsIdReturnResponse = z.infer< + typeof PostTestHelpersTreasuryOutboundPaymentsIdReturnResponseSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferParamsSchema = + z.object({ outbound_transfer: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferParams = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferParamsSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferResponseSchema = + TreasuryOutboundTransferSchema + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferResponse = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferResponseSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailParamsSchema = + z.object({ outbound_transfer: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailParams = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailParamsSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailResponseSchema = + TreasuryOutboundTransferSchema + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailResponse = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailResponseSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostParamsSchema = + z.object({ outbound_transfer: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostParams = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostParamsSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostResponseSchema = + TreasuryOutboundTransferSchema + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostResponse = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostResponseSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnParamsSchema = + z.object({ outbound_transfer: z.string().max(5000) }) + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnParams = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnParamsSchema + > + + export const PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnResponseSchema = + TreasuryOutboundTransferSchema + export type PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnResponse = + z.infer< + typeof PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnResponseSchema + > + + export const PostTestHelpersTreasuryReceivedCreditsParamsSchema = z.object({}) + export type PostTestHelpersTreasuryReceivedCreditsParams = z.infer< + typeof PostTestHelpersTreasuryReceivedCreditsParamsSchema + > + + export const PostTestHelpersTreasuryReceivedCreditsResponseSchema = + TreasuryReceivedCreditSchema + export type PostTestHelpersTreasuryReceivedCreditsResponse = z.infer< + typeof PostTestHelpersTreasuryReceivedCreditsResponseSchema + > + + export const PostTestHelpersTreasuryReceivedDebitsParamsSchema = z.object({}) + export type PostTestHelpersTreasuryReceivedDebitsParams = z.infer< + typeof PostTestHelpersTreasuryReceivedDebitsParamsSchema + > + + export const PostTestHelpersTreasuryReceivedDebitsResponseSchema = + TreasuryReceivedDebitSchema + export type PostTestHelpersTreasuryReceivedDebitsResponse = z.infer< + typeof PostTestHelpersTreasuryReceivedDebitsResponseSchema + > + + export const PostTokensParamsSchema = z.object({}) + export type PostTokensParams = z.infer + + export const PostTokensResponseSchema = TokenSchema + export type PostTokensResponse = z.infer + + export const GetTokensTokenParamsSchema = z.object({ + token: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTokensTokenParams = z.infer + + export const GetTokensTokenResponseSchema = TokenSchema + export type GetTokensTokenResponse = z.infer< + typeof GetTokensTokenResponseSchema + > + + export const GetTopupsParamsSchema = z.object({ + /** A positive integer representing how much to transfer. */ + amount: 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() + ]) + .describe('A positive integer representing how much to transfer.') + .optional(), + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + 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() + ]) + .describe( + 'A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ + status: z + .enum(['canceled', 'failed', 'pending', 'succeeded']) + .describe( + 'Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.' + ) + .optional() + }) + export type GetTopupsParams = z.infer + + export const GetTopupsResponseSchema = z.object({ + data: z.array(TopupSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/topups')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTopupsResponse = z.infer + + export const PostTopupsParamsSchema = z.object({}) + export type PostTopupsParams = z.infer + + export const PostTopupsResponseSchema = TopupSchema + export type PostTopupsResponse = z.infer + + export const GetTopupsTopupParamsSchema = z.object({ + topup: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTopupsTopupParams = z.infer + + export const GetTopupsTopupResponseSchema = TopupSchema + export type GetTopupsTopupResponse = z.infer< + typeof GetTopupsTopupResponseSchema + > + + export const PostTopupsTopupParamsSchema = z.object({ + topup: z.string().max(5000) + }) + export type PostTopupsTopupParams = z.infer< + typeof PostTopupsTopupParamsSchema + > + + export const PostTopupsTopupResponseSchema = TopupSchema + export type PostTopupsTopupResponse = z.infer< + typeof PostTopupsTopupResponseSchema + > + + export const PostTopupsTopupCancelParamsSchema = z.object({ + topup: z.string().max(5000) + }) + export type PostTopupsTopupCancelParams = z.infer< + typeof PostTopupsTopupCancelParamsSchema + > + + export const PostTopupsTopupCancelResponseSchema = TopupSchema + export type PostTopupsTopupCancelResponse = z.infer< + typeof PostTopupsTopupCancelResponseSchema + > + + export const GetTransfersParamsSchema = z.object({ + /** Only return transfers that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return transfers that were created during the given date interval.' + ) + .optional(), + /** Only return transfers for the destination specified by this account ID. */ + destination: z + .string() + .max(5000) + .describe( + 'Only return transfers for the destination specified by this account ID.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return transfers with the specified transfer group. */ + transfer_group: z + .string() + .max(5000) + .describe('Only return transfers with the specified transfer group.') + .optional() + }) + export type GetTransfersParams = z.infer + + export const GetTransfersResponseSchema = z.object({ + /** Details about each object. */ + data: z.array(TransferSchema).describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/transfers')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTransfersResponse = z.infer + + export const PostTransfersParamsSchema = z.object({}) + export type PostTransfersParams = z.infer + + export const PostTransfersResponseSchema = TransferSchema + export type PostTransfersResponse = z.infer< + typeof PostTransfersResponseSchema + > + + export const GetTransfersIdReversalsParamsSchema = z.object({ + id: z.string().max(5000), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetTransfersIdReversalsParams = z.infer< + typeof GetTransfersIdReversalsParamsSchema + > + + export const GetTransfersIdReversalsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TransferReversalSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTransfersIdReversalsResponse = z.infer< + typeof GetTransfersIdReversalsResponseSchema + > + + export const PostTransfersIdReversalsParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostTransfersIdReversalsParams = z.infer< + typeof PostTransfersIdReversalsParamsSchema + > + + export const PostTransfersIdReversalsResponseSchema = TransferReversalSchema + export type PostTransfersIdReversalsResponse = z.infer< + typeof PostTransfersIdReversalsResponseSchema + > + + export const GetTransfersTransferParamsSchema = z.object({ + transfer: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTransfersTransferParams = z.infer< + typeof GetTransfersTransferParamsSchema + > + + export const GetTransfersTransferResponseSchema = TransferSchema + export type GetTransfersTransferResponse = z.infer< + typeof GetTransfersTransferResponseSchema + > + + export const PostTransfersTransferParamsSchema = z.object({ + transfer: z.string().max(5000) + }) + export type PostTransfersTransferParams = z.infer< + typeof PostTransfersTransferParamsSchema + > + + export const PostTransfersTransferResponseSchema = TransferSchema + export type PostTransfersTransferResponse = z.infer< + typeof PostTransfersTransferResponseSchema + > + + export const GetTransfersTransferReversalsIdParamsSchema = z.object({ + id: z.string().max(5000), + transfer: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTransfersTransferReversalsIdParams = z.infer< + typeof GetTransfersTransferReversalsIdParamsSchema + > + + export const GetTransfersTransferReversalsIdResponseSchema = + TransferReversalSchema + export type GetTransfersTransferReversalsIdResponse = z.infer< + typeof GetTransfersTransferReversalsIdResponseSchema + > + + export const PostTransfersTransferReversalsIdParamsSchema = z.object({ + id: z.string().max(5000), + transfer: z.string().max(5000) + }) + export type PostTransfersTransferReversalsIdParams = z.infer< + typeof PostTransfersTransferReversalsIdParamsSchema + > + + export const PostTransfersTransferReversalsIdResponseSchema = + TransferReversalSchema + export type PostTransfersTransferReversalsIdResponse = z.infer< + typeof PostTransfersTransferReversalsIdResponseSchema + > + + export const GetTreasuryCreditReversalsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return CreditReversals for the ReceivedCredit ID. */ + received_credit: z + .string() + .max(5000) + .describe('Only return CreditReversals for the ReceivedCredit ID.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return CreditReversals for a given status. */ + status: z + .enum(['canceled', 'posted', 'processing']) + .describe('Only return CreditReversals for a given status.') + .optional() + }) + export type GetTreasuryCreditReversalsParams = z.infer< + typeof GetTreasuryCreditReversalsParamsSchema + > + + export const GetTreasuryCreditReversalsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryCreditReversalSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryCreditReversalsResponse = z.infer< + typeof GetTreasuryCreditReversalsResponseSchema + > + + export const PostTreasuryCreditReversalsParamsSchema = z.object({}) + export type PostTreasuryCreditReversalsParams = z.infer< + typeof PostTreasuryCreditReversalsParamsSchema + > + + export const PostTreasuryCreditReversalsResponseSchema = + TreasuryCreditReversalSchema + export type PostTreasuryCreditReversalsResponse = z.infer< + typeof PostTreasuryCreditReversalsResponseSchema + > + + export const GetTreasuryCreditReversalsCreditReversalParamsSchema = z.object({ + credit_reversal: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryCreditReversalsCreditReversalParams = z.infer< + typeof GetTreasuryCreditReversalsCreditReversalParamsSchema + > + + export const GetTreasuryCreditReversalsCreditReversalResponseSchema = + TreasuryCreditReversalSchema + export type GetTreasuryCreditReversalsCreditReversalResponse = z.infer< + typeof GetTreasuryCreditReversalsCreditReversalResponseSchema + > + + export const GetTreasuryDebitReversalsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return DebitReversals for the ReceivedDebit ID. */ + received_debit: z + .string() + .max(5000) + .describe('Only return DebitReversals for the ReceivedDebit ID.') + .optional(), + /** Only return DebitReversals for a given resolution. */ + resolution: z + .enum(['lost', 'won']) + .describe('Only return DebitReversals for a given resolution.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return DebitReversals for a given status. */ + status: z + .enum(['canceled', 'completed', 'processing']) + .describe('Only return DebitReversals for a given status.') + .optional() + }) + export type GetTreasuryDebitReversalsParams = z.infer< + typeof GetTreasuryDebitReversalsParamsSchema + > + + export const GetTreasuryDebitReversalsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryDebitReversalSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryDebitReversalsResponse = z.infer< + typeof GetTreasuryDebitReversalsResponseSchema + > + + export const PostTreasuryDebitReversalsParamsSchema = z.object({}) + export type PostTreasuryDebitReversalsParams = z.infer< + typeof PostTreasuryDebitReversalsParamsSchema + > + + export const PostTreasuryDebitReversalsResponseSchema = + TreasuryDebitReversalSchema + export type PostTreasuryDebitReversalsResponse = z.infer< + typeof PostTreasuryDebitReversalsResponseSchema + > + + export const GetTreasuryDebitReversalsDebitReversalParamsSchema = z.object({ + debit_reversal: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryDebitReversalsDebitReversalParams = z.infer< + typeof GetTreasuryDebitReversalsDebitReversalParamsSchema + > + + export const GetTreasuryDebitReversalsDebitReversalResponseSchema = + TreasuryDebitReversalSchema + export type GetTreasuryDebitReversalsDebitReversalResponse = z.infer< + typeof GetTreasuryDebitReversalsDebitReversalResponseSchema + > + + export const GetTreasuryFinancialAccountsParamsSchema = z.object({ + /** Only return FinancialAccounts that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return FinancialAccounts that were created during the given date interval.' + ) + .optional(), + /** An object ID cursor for use in pagination. */ + ending_before: z + .string() + .max(5000) + .describe('An object ID cursor for use in pagination.') + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit ranging from 1 to 100 (defaults to 10). */ + limit: z + .number() + .int() + .describe('A limit ranging from 1 to 100 (defaults to 10).') + .optional(), + /** An object ID cursor for use in pagination. */ + starting_after: z + .string() + .max(5000) + .describe('An object ID cursor for use in pagination.') + .optional() + }) + export type GetTreasuryFinancialAccountsParams = z.infer< + typeof GetTreasuryFinancialAccountsParamsSchema + > + + export const GetTreasuryFinancialAccountsResponseSchema = z.object({ + data: z.array(TreasuryFinancialAccountSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/treasury/financial_accounts')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryFinancialAccountsResponse = z.infer< + typeof GetTreasuryFinancialAccountsResponseSchema + > + + export const PostTreasuryFinancialAccountsParamsSchema = z.object({}) + export type PostTreasuryFinancialAccountsParams = z.infer< + typeof PostTreasuryFinancialAccountsParamsSchema + > + + export const PostTreasuryFinancialAccountsResponseSchema = + TreasuryFinancialAccountSchema + export type PostTreasuryFinancialAccountsResponse = z.infer< + typeof PostTreasuryFinancialAccountsResponseSchema + > + + export const GetTreasuryFinancialAccountsFinancialAccountParamsSchema = + z.object({ + financial_account: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryFinancialAccountsFinancialAccountParams = z.infer< + typeof GetTreasuryFinancialAccountsFinancialAccountParamsSchema + > + + export const GetTreasuryFinancialAccountsFinancialAccountResponseSchema = + TreasuryFinancialAccountSchema + export type GetTreasuryFinancialAccountsFinancialAccountResponse = z.infer< + typeof GetTreasuryFinancialAccountsFinancialAccountResponseSchema + > + + export const PostTreasuryFinancialAccountsFinancialAccountParamsSchema = + z.object({ financial_account: z.string().max(5000) }) + export type PostTreasuryFinancialAccountsFinancialAccountParams = z.infer< + typeof PostTreasuryFinancialAccountsFinancialAccountParamsSchema + > + + export const PostTreasuryFinancialAccountsFinancialAccountResponseSchema = + TreasuryFinancialAccountSchema + export type PostTreasuryFinancialAccountsFinancialAccountResponse = z.infer< + typeof PostTreasuryFinancialAccountsFinancialAccountResponseSchema + > + + export const PostTreasuryFinancialAccountsFinancialAccountCloseParamsSchema = + z.object({ financial_account: z.string().max(5000) }) + export type PostTreasuryFinancialAccountsFinancialAccountCloseParams = + z.infer< + typeof PostTreasuryFinancialAccountsFinancialAccountCloseParamsSchema + > + + export const PostTreasuryFinancialAccountsFinancialAccountCloseResponseSchema = + TreasuryFinancialAccountSchema + export type PostTreasuryFinancialAccountsFinancialAccountCloseResponse = + z.infer< + typeof PostTreasuryFinancialAccountsFinancialAccountCloseResponseSchema + > + + export const GetTreasuryFinancialAccountsFinancialAccountFeaturesParamsSchema = + z.object({ + financial_account: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryFinancialAccountsFinancialAccountFeaturesParams = + z.infer< + typeof GetTreasuryFinancialAccountsFinancialAccountFeaturesParamsSchema + > + + export const GetTreasuryFinancialAccountsFinancialAccountFeaturesResponseSchema = + TreasuryFinancialAccountFeaturesSchema + export type GetTreasuryFinancialAccountsFinancialAccountFeaturesResponse = + z.infer< + typeof GetTreasuryFinancialAccountsFinancialAccountFeaturesResponseSchema + > + + export const PostTreasuryFinancialAccountsFinancialAccountFeaturesParamsSchema = + z.object({ financial_account: z.string().max(5000) }) + export type PostTreasuryFinancialAccountsFinancialAccountFeaturesParams = + z.infer< + typeof PostTreasuryFinancialAccountsFinancialAccountFeaturesParamsSchema + > + + export const PostTreasuryFinancialAccountsFinancialAccountFeaturesResponseSchema = + TreasuryFinancialAccountFeaturesSchema + export type PostTreasuryFinancialAccountsFinancialAccountFeaturesResponse = + z.infer< + typeof PostTreasuryFinancialAccountsFinancialAccountFeaturesResponseSchema + > + + export const GetTreasuryInboundTransfersParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + status: z + .enum(['canceled', 'failed', 'processing', 'succeeded']) + .describe( + 'Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.' + ) + .optional() + }) + export type GetTreasuryInboundTransfersParams = z.infer< + typeof GetTreasuryInboundTransfersParamsSchema + > + + export const GetTreasuryInboundTransfersResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryInboundTransferSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryInboundTransfersResponse = z.infer< + typeof GetTreasuryInboundTransfersResponseSchema + > + + export const PostTreasuryInboundTransfersParamsSchema = z.object({}) + export type PostTreasuryInboundTransfersParams = z.infer< + typeof PostTreasuryInboundTransfersParamsSchema + > + + export const PostTreasuryInboundTransfersResponseSchema = + TreasuryInboundTransferSchema + export type PostTreasuryInboundTransfersResponse = z.infer< + typeof PostTreasuryInboundTransfersResponseSchema + > + + export const GetTreasuryInboundTransfersIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryInboundTransfersIdParams = z.infer< + typeof GetTreasuryInboundTransfersIdParamsSchema + > + + export const GetTreasuryInboundTransfersIdResponseSchema = + TreasuryInboundTransferSchema + export type GetTreasuryInboundTransfersIdResponse = z.infer< + typeof GetTreasuryInboundTransfersIdResponseSchema + > + + export const PostTreasuryInboundTransfersInboundTransferCancelParamsSchema = + z.object({ inbound_transfer: z.string().max(5000) }) + export type PostTreasuryInboundTransfersInboundTransferCancelParams = z.infer< + typeof PostTreasuryInboundTransfersInboundTransferCancelParamsSchema + > + + export const PostTreasuryInboundTransfersInboundTransferCancelResponseSchema = + TreasuryInboundTransferSchema + export type PostTreasuryInboundTransfersInboundTransferCancelResponse = + z.infer< + typeof PostTreasuryInboundTransfersInboundTransferCancelResponseSchema + > + + export const GetTreasuryOutboundPaymentsParamsSchema = z.object({ + /** Only return OutboundPayments that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return OutboundPayments that were created during the given date interval.' + ) + .optional(), + /** Only return OutboundPayments sent to this customer. */ + customer: z + .string() + .max(5000) + .describe('Only return OutboundPayments sent to this customer.') + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + status: z + .enum(['canceled', 'failed', 'posted', 'processing', 'returned']) + .describe( + 'Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.' + ) + .optional() + }) + export type GetTreasuryOutboundPaymentsParams = z.infer< + typeof GetTreasuryOutboundPaymentsParamsSchema + > + + export const GetTreasuryOutboundPaymentsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryOutboundPaymentSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/treasury/outbound_payments')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryOutboundPaymentsResponse = z.infer< + typeof GetTreasuryOutboundPaymentsResponseSchema + > + + export const PostTreasuryOutboundPaymentsParamsSchema = z.object({}) + export type PostTreasuryOutboundPaymentsParams = z.infer< + typeof PostTreasuryOutboundPaymentsParamsSchema + > + + export const PostTreasuryOutboundPaymentsResponseSchema = + TreasuryOutboundPaymentSchema + export type PostTreasuryOutboundPaymentsResponse = z.infer< + typeof PostTreasuryOutboundPaymentsResponseSchema + > + + export const GetTreasuryOutboundPaymentsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryOutboundPaymentsIdParams = z.infer< + typeof GetTreasuryOutboundPaymentsIdParamsSchema + > + + export const GetTreasuryOutboundPaymentsIdResponseSchema = + TreasuryOutboundPaymentSchema + export type GetTreasuryOutboundPaymentsIdResponse = z.infer< + typeof GetTreasuryOutboundPaymentsIdResponseSchema + > + + export const PostTreasuryOutboundPaymentsIdCancelParamsSchema = z.object({ + id: z.string().max(5000) + }) + export type PostTreasuryOutboundPaymentsIdCancelParams = z.infer< + typeof PostTreasuryOutboundPaymentsIdCancelParamsSchema + > + + export const PostTreasuryOutboundPaymentsIdCancelResponseSchema = + TreasuryOutboundPaymentSchema + export type PostTreasuryOutboundPaymentsIdCancelResponse = z.infer< + typeof PostTreasuryOutboundPaymentsIdCancelResponseSchema + > + + export const GetTreasuryOutboundTransfersParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + status: z + .enum(['canceled', 'failed', 'posted', 'processing', 'returned']) + .describe( + 'Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.' + ) + .optional() + }) + export type GetTreasuryOutboundTransfersParams = z.infer< + typeof GetTreasuryOutboundTransfersParamsSchema + > + + export const GetTreasuryOutboundTransfersResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryOutboundTransferSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryOutboundTransfersResponse = z.infer< + typeof GetTreasuryOutboundTransfersResponseSchema + > + + export const PostTreasuryOutboundTransfersParamsSchema = z.object({}) + export type PostTreasuryOutboundTransfersParams = z.infer< + typeof PostTreasuryOutboundTransfersParamsSchema + > + + export const PostTreasuryOutboundTransfersResponseSchema = + TreasuryOutboundTransferSchema + export type PostTreasuryOutboundTransfersResponse = z.infer< + typeof PostTreasuryOutboundTransfersResponseSchema + > + + export const GetTreasuryOutboundTransfersOutboundTransferParamsSchema = + z.object({ + outbound_transfer: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryOutboundTransfersOutboundTransferParams = z.infer< + typeof GetTreasuryOutboundTransfersOutboundTransferParamsSchema + > + + export const GetTreasuryOutboundTransfersOutboundTransferResponseSchema = + TreasuryOutboundTransferSchema + export type GetTreasuryOutboundTransfersOutboundTransferResponse = z.infer< + typeof GetTreasuryOutboundTransfersOutboundTransferResponseSchema + > + + export const PostTreasuryOutboundTransfersOutboundTransferCancelParamsSchema = + z.object({ outbound_transfer: z.string().max(5000) }) + export type PostTreasuryOutboundTransfersOutboundTransferCancelParams = + z.infer< + typeof PostTreasuryOutboundTransfersOutboundTransferCancelParamsSchema + > + + export const PostTreasuryOutboundTransfersOutboundTransferCancelResponseSchema = + TreasuryOutboundTransferSchema + export type PostTreasuryOutboundTransfersOutboundTransferCancelResponse = + z.infer< + typeof PostTreasuryOutboundTransfersOutboundTransferCancelResponseSchema + > + + export const GetTreasuryReceivedCreditsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** The FinancialAccount that received the funds. */ + financial_account: z + .string() + .describe('The FinancialAccount that received the funds.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** Only return ReceivedCredits described by the flow. */ + linked_flows: z + .object({ + source_flow_type: z.enum([ + 'credit_reversal', + 'other', + 'outbound_payment', + 'outbound_transfer', + 'payout' + ]) + }) + .describe('Only return ReceivedCredits described by the flow.') + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + status: z + .enum(['failed', 'succeeded']) + .describe( + 'Only return ReceivedCredits that have the given status: `succeeded` or `failed`.' + ) + .optional() + }) + export type GetTreasuryReceivedCreditsParams = z.infer< + typeof GetTreasuryReceivedCreditsParamsSchema + > + + export const GetTreasuryReceivedCreditsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryReceivedCreditSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryReceivedCreditsResponse = z.infer< + typeof GetTreasuryReceivedCreditsResponseSchema + > + + export const GetTreasuryReceivedCreditsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryReceivedCreditsIdParams = z.infer< + typeof GetTreasuryReceivedCreditsIdParamsSchema + > + + export const GetTreasuryReceivedCreditsIdResponseSchema = + TreasuryReceivedCreditSchema + export type GetTreasuryReceivedCreditsIdResponse = z.infer< + typeof GetTreasuryReceivedCreditsIdResponseSchema + > + + export const GetTreasuryReceivedDebitsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** The FinancialAccount that funds were pulled from. */ + financial_account: z + .string() + .describe('The FinancialAccount that funds were pulled from.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return ReceivedDebits that have the given status: `succeeded` or `failed`. */ + status: z + .enum(['failed', 'succeeded']) + .describe( + 'Only return ReceivedDebits that have the given status: `succeeded` or `failed`.' + ) + .optional() + }) + export type GetTreasuryReceivedDebitsParams = z.infer< + typeof GetTreasuryReceivedDebitsParamsSchema + > + + export const GetTreasuryReceivedDebitsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryReceivedDebitSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryReceivedDebitsResponse = z.infer< + typeof GetTreasuryReceivedDebitsResponseSchema + > + + export const GetTreasuryReceivedDebitsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryReceivedDebitsIdParams = z.infer< + typeof GetTreasuryReceivedDebitsIdParamsSchema + > + + export const GetTreasuryReceivedDebitsIdResponseSchema = + TreasuryReceivedDebitSchema + export type GetTreasuryReceivedDebitsIdResponse = z.infer< + typeof GetTreasuryReceivedDebitsIdResponseSchema + > + + export const GetTreasuryTransactionEntriesParamsSchema = z.object({ + /** Only return TransactionEntries that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return TransactionEntries that were created during the given date interval.' + ) + .optional(), + effective_at: 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(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + order_by: z + .enum(['created', 'effective_at']) + .describe( + 'The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return TransactionEntries associated with this Transaction. */ + transaction: z + .string() + .max(5000) + .describe( + 'Only return TransactionEntries associated with this Transaction.' + ) + .optional() + }) + export type GetTreasuryTransactionEntriesParams = z.infer< + typeof GetTreasuryTransactionEntriesParamsSchema + > + + export const GetTreasuryTransactionEntriesResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryTransactionEntrySchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/treasury/transaction_entries')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryTransactionEntriesResponse = z.infer< + typeof GetTreasuryTransactionEntriesResponseSchema + > + + export const GetTreasuryTransactionEntriesIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryTransactionEntriesIdParams = z.infer< + typeof GetTreasuryTransactionEntriesIdParamsSchema + > + + export const GetTreasuryTransactionEntriesIdResponseSchema = + TreasuryTransactionEntrySchema + export type GetTreasuryTransactionEntriesIdResponse = z.infer< + typeof GetTreasuryTransactionEntriesIdResponseSchema + > + + export const GetTreasuryTransactionsParamsSchema = z.object({ + /** Only return Transactions that were created during the given date interval. */ + 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() + ]) + .describe( + 'Only return Transactions that were created during the given date interval.' + ) + .optional(), + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** Returns objects associated with this FinancialAccount. */ + financial_account: z + .string() + .describe('Returns objects associated with this FinancialAccount.'), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + order_by: z + .enum(['created', 'posted_at']) + .describe( + 'The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional(), + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + status: z + .enum(['open', 'posted', 'void']) + .describe( + 'Only return Transactions that have the given status: `open`, `posted`, or `void`.' + ) + .optional(), + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + status_transitions: z + .object({ + posted_at: 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() + }) + .describe( + 'A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.' + ) + .optional() + }) + export type GetTreasuryTransactionsParams = z.infer< + typeof GetTreasuryTransactionsParamsSchema + > + + export const GetTreasuryTransactionsResponseSchema = z.object({ + /** Details about each object. */ + data: z + .array(TreasuryTransactionSchema) + .describe('Details about each object.'), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetTreasuryTransactionsResponse = z.infer< + typeof GetTreasuryTransactionsResponseSchema + > + + export const GetTreasuryTransactionsIdParamsSchema = z.object({ + id: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetTreasuryTransactionsIdParams = z.infer< + typeof GetTreasuryTransactionsIdParamsSchema + > + + export const GetTreasuryTransactionsIdResponseSchema = + TreasuryTransactionSchema + export type GetTreasuryTransactionsIdResponse = z.infer< + typeof GetTreasuryTransactionsIdResponseSchema + > + + export const GetWebhookEndpointsParamsSchema = z.object({ + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.' + ) + .optional(), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional(), + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit: z + .number() + .int() + .describe( + 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.' + ) + .optional(), + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after: z + .string() + .max(5000) + .describe( + 'A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.' + ) + .optional() + }) + export type GetWebhookEndpointsParams = z.infer< + typeof GetWebhookEndpointsParamsSchema + > + + export const GetWebhookEndpointsResponseSchema = z.object({ + data: z.array(WebhookEndpointSchema), + /** True if this list has another page of items after this one that can be fetched. */ + has_more: z + .boolean() + .describe( + 'True if this list has another page of items after this one that can be fetched.' + ), + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: z + .literal('list') + .describe( + "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." + ), + /** The URL where this list can be accessed. */ + url: z + .string() + .regex(new RegExp('^/v1/webhook_endpoints')) + .max(5000) + .describe('The URL where this list can be accessed.') + }) + export type GetWebhookEndpointsResponse = z.infer< + typeof GetWebhookEndpointsResponseSchema + > + + export const PostWebhookEndpointsParamsSchema = z.object({}) + export type PostWebhookEndpointsParams = z.infer< + typeof PostWebhookEndpointsParamsSchema + > + + export const PostWebhookEndpointsResponseSchema = WebhookEndpointSchema + export type PostWebhookEndpointsResponse = z.infer< + typeof PostWebhookEndpointsResponseSchema + > + + export const GetWebhookEndpointsWebhookEndpointParamsSchema = z.object({ + webhook_endpoint: z.string().max(5000), + /** Specifies which fields in the response should be expanded. */ + expand: z + .array(z.string().max(5000)) + .describe('Specifies which fields in the response should be expanded.') + .optional() + }) + export type GetWebhookEndpointsWebhookEndpointParams = z.infer< + typeof GetWebhookEndpointsWebhookEndpointParamsSchema + > + + export const GetWebhookEndpointsWebhookEndpointResponseSchema = + WebhookEndpointSchema + export type GetWebhookEndpointsWebhookEndpointResponse = z.infer< + typeof GetWebhookEndpointsWebhookEndpointResponseSchema + > + + export const PostWebhookEndpointsWebhookEndpointParamsSchema = z.object({ + webhook_endpoint: z.string().max(5000) + }) + export type PostWebhookEndpointsWebhookEndpointParams = z.infer< + typeof PostWebhookEndpointsWebhookEndpointParamsSchema + > + + export const PostWebhookEndpointsWebhookEndpointResponseSchema = + WebhookEndpointSchema + export type PostWebhookEndpointsWebhookEndpointResponse = z.infer< + typeof PostWebhookEndpointsWebhookEndpointResponseSchema + > + + export const DeleteWebhookEndpointsWebhookEndpointParamsSchema = z.object({ + webhook_endpoint: z.string().max(5000) + }) + export type DeleteWebhookEndpointsWebhookEndpointParams = z.infer< + typeof DeleteWebhookEndpointsWebhookEndpointParamsSchema + > + + export const DeleteWebhookEndpointsWebhookEndpointResponseSchema = + DeletedWebhookEndpointSchema + export type DeleteWebhookEndpointsWebhookEndpointResponse = z.infer< + typeof DeleteWebhookEndpointsWebhookEndpointResponseSchema + > +} + +/** + * Agentic Stripe client. + * + * The Stripe REST API. Please see https://stripe.com/docs/api for more details. + */ +export class StripeClient extends AIFunctionsProvider { + protected readonly ky: KyInstance + protected readonly apiKey: string + protected readonly apiBaseUrl: string + + constructor({ + apiKey = getEnv('STRIPE_API_KEY'), + apiBaseUrl = stripe.apiBaseUrl, + ky = defaultKy + }: { + apiKey?: string + apiBaseUrl?: string + ky?: KyInstance + } = {}) { + assert( + apiKey, + 'StripeClient missing required "apiKey" (defaults to "STRIPE_API_KEY")' + ) + super() + + this.apiKey = apiKey + this.apiBaseUrl = apiBaseUrl + + this.ky = ky.extend({ + prefixUrl: apiBaseUrl, + headers: { + Authorization: apiKey + } + }) + } + + /** + *

Retrieves the details of an account.

. + */ + @aiFunction({ + name: 'get_account', + description: '

Retrieves the details of an account.

.', + inputSchema: stripe.GetAccountParamsSchema + }) + async GetAccount( + params: stripe.GetAccountParams + ): Promise { + return this.ky + .get('/v1/account', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_account_links', + description: + '

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.

.', + inputSchema: stripe.PostAccountLinksParamsSchema + }) + async PostAccountLinks( + _params: stripe.PostAccountLinksParams + ): Promise { + return this.ky + .post('/v1/account_links') + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_account_sessions', + description: + '

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.

.', + inputSchema: stripe.PostAccountSessionsParamsSchema + }) + async PostAccountSessions( + _params: stripe.PostAccountSessionsParams + ): Promise { + return this.ky + .post('/v1/account_sessions') + .json() + } + + /** + *

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

. + */ + @aiFunction({ + name: 'get_accounts', + description: + '

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

.', + inputSchema: stripe.GetAccountsParamsSchema + }) + async GetAccounts( + params: stripe.GetAccountsParams + ): Promise { + return this.ky + .get('/v1/accounts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

With Connect, you can create Stripe accounts for your users. +To do this, you’ll first need to register your platform.

+ +

If you’ve already collected information for your connected accounts, you can prefill that information when +creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. +You can prefill any information on the account.

. + */ + @aiFunction({ + name: 'post_accounts', + description: `

With Connect, you can create Stripe accounts for your users. +To do this, you’ll first need to register your platform.

+ +

If you’ve already collected information for your connected accounts, you can prefill that information when +creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. +You can prefill any information on the account.

.`, + inputSchema: stripe.PostAccountsParamsSchema + }) + async PostAccounts( + _params: stripe.PostAccountsParams + ): Promise { + return this.ky.post('/v1/accounts').json() + } + + /** + *

Retrieves the details of an account.

. + */ + @aiFunction({ + name: 'get_accounts_account', + description: '

Retrieves the details of an account.

.', + inputSchema: stripe.GetAccountsAccountParamsSchema + }) + async GetAccountsAccount( + params: stripe.GetAccountsAccountParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are +left unchanged.

+ +

For accounts where controller.requirement_collection +is application, which includes Custom accounts, you can update any information on the account.

+ +

For accounts where controller.requirement_collection +is stripe, which includes Standard and Express accounts, you can update all information until you create +an Account Link or Account Session to start Connect onboarding, +after which some properties can no longer be updated.

+ +

To update your own account, use the Dashboard. Refer to our +Connect documentation to learn more about updating accounts.

. + */ + @aiFunction({ + name: 'post_accounts_account', + description: `

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are +left unchanged.

+ +

For accounts where controller.requirement_collection +is application, which includes Custom accounts, you can update any information on the account.

+ +

For accounts where controller.requirement_collection +is stripe, which includes Standard and Express accounts, you can update all information until you create +an Account Link or Account Session to start Connect onboarding, +after which some properties can no longer be updated.

+ +

To update your own account, use the Dashboard. Refer to our +Connect documentation to learn more about updating accounts.

.`, + inputSchema: stripe.PostAccountsAccountParamsSchema + }) + async PostAccountsAccount( + params: stripe.PostAccountsAccountParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}`) + .json() + } + + /** + *

With Connect, you can delete accounts you manage.

+ +

Test-mode accounts can be deleted at any time.

+ +

Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all balances are zero.

+ +

If you want to delete your own account, use the account information tab in your account settings instead.

. + */ + @aiFunction({ + name: 'delete_accounts_account', + description: `

With Connect, you can delete accounts you manage.

+ +

Test-mode accounts can be deleted at any time.

+ +

Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all balances are zero.

+ +

If you want to delete your own account, use the account information tab in your account settings instead.

.`, + inputSchema: stripe.DeleteAccountsAccountParamsSchema + }) + async DeleteAccountsAccount( + params: stripe.DeleteAccountsAccountParams + ): Promise { + return this.ky + .delete(`/v1/accounts/${params.account}`) + .json() + } + + /** + *

Create an external account for a given account.

. + */ + @aiFunction({ + name: 'post_accounts_account_bank_accounts', + description: '

Create an external account for a given account.

.', + inputSchema: stripe.PostAccountsAccountBankAccountsParamsSchema + }) + async PostAccountsAccountBankAccounts( + params: stripe.PostAccountsAccountBankAccountsParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/bank_accounts`) + .json() + } + + /** + *

Retrieve a specified external account for a given account.

. + */ + @aiFunction({ + name: 'get_accounts_account_bank_accounts_id', + description: + '

Retrieve a specified external account for a given account.

.', + inputSchema: stripe.GetAccountsAccountBankAccountsIdParamsSchema + }) + async GetAccountsAccountBankAccountsId( + params: stripe.GetAccountsAccountBankAccountsIdParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/bank_accounts/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .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 is application, which includes Custom accounts.

+ +

You can re-enable a disabled bank account by performing an update call without providing any +arguments or changes.

. + */ + @aiFunction({ + name: 'post_accounts_account_bank_accounts_id', + description: `

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 is application, which includes Custom accounts.

+ +

You can re-enable a disabled bank account by performing an update call without providing any +arguments or changes.

.`, + inputSchema: stripe.PostAccountsAccountBankAccountsIdParamsSchema + }) + async PostAccountsAccountBankAccountsId( + params: stripe.PostAccountsAccountBankAccountsIdParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/bank_accounts/${params.id}`) + .json() + } + + /** + *

Delete a specified external account for a given account.

. + */ + @aiFunction({ + name: 'delete_accounts_account_bank_accounts_id', + description: + '

Delete a specified external account for a given account.

.', + inputSchema: stripe.DeleteAccountsAccountBankAccountsIdParamsSchema + }) + async DeleteAccountsAccountBankAccountsId( + params: stripe.DeleteAccountsAccountBankAccountsIdParams + ): Promise { + return this.ky + .delete(`/v1/accounts/${params.account}/bank_accounts/${params.id}`) + .json() + } + + /** + *

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

. + */ + @aiFunction({ + name: 'get_accounts_account_capabilities', + description: + '

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

.', + inputSchema: stripe.GetAccountsAccountCapabilitiesParamsSchema + }) + async GetAccountsAccountCapabilities( + params: stripe.GetAccountsAccountCapabilitiesParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/capabilities`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves information about the specified Account Capability.

. + */ + @aiFunction({ + name: 'get_accounts_account_capabilities_capability', + description: + '

Retrieves information about the specified Account Capability.

.', + inputSchema: stripe.GetAccountsAccountCapabilitiesCapabilityParamsSchema + }) + async GetAccountsAccountCapabilitiesCapability( + params: stripe.GetAccountsAccountCapabilitiesCapabilityParams + ): Promise { + return this.ky + .get( + `/v1/accounts/${params.account}/capabilities/${params.capability}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.

. + */ + @aiFunction({ + name: 'post_accounts_account_capabilities_capability', + description: + '

Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.

.', + inputSchema: stripe.PostAccountsAccountCapabilitiesCapabilityParamsSchema + }) + async PostAccountsAccountCapabilitiesCapability( + params: stripe.PostAccountsAccountCapabilitiesCapabilityParams + ): Promise { + return this.ky + .post( + `/v1/accounts/${params.account}/capabilities/${params.capability}` + ) + .json() + } + + /** + *

List external accounts for an account.

. + */ + @aiFunction({ + name: 'get_accounts_account_external_accounts', + description: '

List external accounts for an account.

.', + inputSchema: stripe.GetAccountsAccountExternalAccountsParamsSchema + }) + async GetAccountsAccountExternalAccounts( + params: stripe.GetAccountsAccountExternalAccountsParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/external_accounts`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'ending_before', + 'expand', + 'limit', + 'object', + 'starting_after' + ) + ) + }) + .json() + } + + /** + *

Create an external account for a given account.

. + */ + @aiFunction({ + name: 'post_accounts_account_external_accounts', + description: '

Create an external account for a given account.

.', + inputSchema: stripe.PostAccountsAccountExternalAccountsParamsSchema + }) + async PostAccountsAccountExternalAccounts( + params: stripe.PostAccountsAccountExternalAccountsParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/external_accounts`) + .json() + } + + /** + *

Retrieve a specified external account for a given account.

. + */ + @aiFunction({ + name: 'get_accounts_account_external_accounts_id', + description: + '

Retrieve a specified external account for a given account.

.', + inputSchema: stripe.GetAccountsAccountExternalAccountsIdParamsSchema + }) + async GetAccountsAccountExternalAccountsId( + params: stripe.GetAccountsAccountExternalAccountsIdParams + ): Promise { + return this.ky + .get( + `/v1/accounts/${params.account}/external_accounts/${params.id}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .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 is application, which includes Custom accounts.

+ +

You can re-enable a disabled bank account by performing an update call without providing any +arguments or changes.

. + */ + @aiFunction({ + name: 'post_accounts_account_external_accounts_id', + description: `

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 is application, which includes Custom accounts.

+ +

You can re-enable a disabled bank account by performing an update call without providing any +arguments or changes.

.`, + inputSchema: stripe.PostAccountsAccountExternalAccountsIdParamsSchema + }) + async PostAccountsAccountExternalAccountsId( + params: stripe.PostAccountsAccountExternalAccountsIdParams + ): Promise { + return this.ky + .post( + `/v1/accounts/${params.account}/external_accounts/${params.id}` + ) + .json() + } + + /** + *

Delete a specified external account for a given account.

. + */ + @aiFunction({ + name: 'delete_accounts_account_external_accounts_id', + description: + '

Delete a specified external account for a given account.

.', + inputSchema: stripe.DeleteAccountsAccountExternalAccountsIdParamsSchema + }) + async DeleteAccountsAccountExternalAccountsId( + params: stripe.DeleteAccountsAccountExternalAccountsIdParams + ): Promise { + return this.ky + .delete( + `/v1/accounts/${params.account}/external_accounts/${params.id}` + ) + .json() + } + + /** + *

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 and are connected to your platform.

. + */ + @aiFunction({ + name: 'post_accounts_account_login_links', + description: `

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 and are connected to your platform.

.`, + inputSchema: stripe.PostAccountsAccountLoginLinksParamsSchema + }) + async PostAccountsAccountLoginLinks( + params: stripe.PostAccountsAccountLoginLinksParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/login_links`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_accounts_account_people', + description: + '

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.

.', + inputSchema: stripe.GetAccountsAccountPeopleParamsSchema + }) + async GetAccountsAccountPeople( + params: stripe.GetAccountsAccountPeopleParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/people`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'ending_before', + 'expand', + 'limit', + 'relationship', + 'starting_after' + ) + ) + }) + .json() + } + + /** + *

Creates a new person.

. + */ + @aiFunction({ + name: 'post_accounts_account_people', + description: '

Creates a new person.

.', + inputSchema: stripe.PostAccountsAccountPeopleParamsSchema + }) + async PostAccountsAccountPeople( + params: stripe.PostAccountsAccountPeopleParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/people`) + .json() + } + + /** + *

Retrieves an existing person.

. + */ + @aiFunction({ + name: 'get_accounts_account_people_person', + description: '

Retrieves an existing person.

.', + inputSchema: stripe.GetAccountsAccountPeoplePersonParamsSchema + }) + async GetAccountsAccountPeoplePerson( + params: stripe.GetAccountsAccountPeoplePersonParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/people/${params.person}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing person.

. + */ + @aiFunction({ + name: 'post_accounts_account_people_person', + description: '

Updates an existing person.

.', + inputSchema: stripe.PostAccountsAccountPeoplePersonParamsSchema + }) + async PostAccountsAccountPeoplePerson( + params: stripe.PostAccountsAccountPeoplePersonParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/people/${params.person}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'delete_accounts_account_people_person', + description: + '

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.

.', + inputSchema: stripe.DeleteAccountsAccountPeoplePersonParamsSchema + }) + async DeleteAccountsAccountPeoplePerson( + params: stripe.DeleteAccountsAccountPeoplePersonParams + ): Promise { + return this.ky + .delete(`/v1/accounts/${params.account}/people/${params.person}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_accounts_account_persons', + description: + '

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.

.', + inputSchema: stripe.GetAccountsAccountPersonsParamsSchema + }) + async GetAccountsAccountPersons( + params: stripe.GetAccountsAccountPersonsParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/persons`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'ending_before', + 'expand', + 'limit', + 'relationship', + 'starting_after' + ) + ) + }) + .json() + } + + /** + *

Creates a new person.

. + */ + @aiFunction({ + name: 'post_accounts_account_persons', + description: '

Creates a new person.

.', + inputSchema: stripe.PostAccountsAccountPersonsParamsSchema + }) + async PostAccountsAccountPersons( + params: stripe.PostAccountsAccountPersonsParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/persons`) + .json() + } + + /** + *

Retrieves an existing person.

. + */ + @aiFunction({ + name: 'get_accounts_account_persons_person', + description: '

Retrieves an existing person.

.', + inputSchema: stripe.GetAccountsAccountPersonsPersonParamsSchema + }) + async GetAccountsAccountPersonsPerson( + params: stripe.GetAccountsAccountPersonsPersonParams + ): Promise { + return this.ky + .get(`/v1/accounts/${params.account}/persons/${params.person}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing person.

. + */ + @aiFunction({ + name: 'post_accounts_account_persons_person', + description: '

Updates an existing person.

.', + inputSchema: stripe.PostAccountsAccountPersonsPersonParamsSchema + }) + async PostAccountsAccountPersonsPerson( + params: stripe.PostAccountsAccountPersonsPersonParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/persons/${params.person}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'delete_accounts_account_persons_person', + description: + '

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.

.', + inputSchema: stripe.DeleteAccountsAccountPersonsPersonParamsSchema + }) + async DeleteAccountsAccountPersonsPerson( + params: stripe.DeleteAccountsAccountPersonsPersonParams + ): Promise { + return this.ky + .delete(`/v1/accounts/${params.account}/persons/${params.person}`) + .json() + } + + /** + *

With 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.

. + */ + @aiFunction({ + name: 'post_accounts_account_reject', + description: `

With 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.

.`, + inputSchema: stripe.PostAccountsAccountRejectParamsSchema + }) + async PostAccountsAccountReject( + params: stripe.PostAccountsAccountRejectParams + ): Promise { + return this.ky + .post(`/v1/accounts/${params.account}/reject`) + .json() + } + + /** + *

List apple pay domains.

. + */ + @aiFunction({ + name: 'get_apple_pay_domains', + description: '

List apple pay domains.

.', + inputSchema: stripe.GetApplePayDomainsParamsSchema + }) + async GetApplePayDomains( + params: stripe.GetApplePayDomainsParams + ): Promise { + return this.ky + .get('/v1/apple_pay/domains', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Create an apple pay domain.

. + */ + @aiFunction({ + name: 'post_apple_pay_domains', + description: '

Create an apple pay domain.

.', + inputSchema: stripe.PostApplePayDomainsParamsSchema + }) + async PostApplePayDomains( + _params: stripe.PostApplePayDomainsParams + ): Promise { + return this.ky + .post('/v1/apple_pay/domains') + .json() + } + + /** + *

Retrieve an apple pay domain.

. + */ + @aiFunction({ + name: 'get_apple_pay_domains_domain', + description: '

Retrieve an apple pay domain.

.', + inputSchema: stripe.GetApplePayDomainsDomainParamsSchema + }) + async GetApplePayDomainsDomain( + params: stripe.GetApplePayDomainsDomainParams + ): Promise { + return this.ky + .get(`/v1/apple_pay/domains/${params.domain}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Delete an apple pay domain.

. + */ + @aiFunction({ + name: 'delete_apple_pay_domains_domain', + description: '

Delete an apple pay domain.

.', + inputSchema: stripe.DeleteApplePayDomainsDomainParamsSchema + }) + async DeleteApplePayDomainsDomain( + params: stripe.DeleteApplePayDomainsDomainParams + ): Promise { + return this.ky + .delete(`/v1/apple_pay/domains/${params.domain}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_application_fees', + description: + '

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.

.', + inputSchema: stripe.GetApplicationFeesParamsSchema + }) + async GetApplicationFees( + params: stripe.GetApplicationFeesParams + ): Promise { + return this.ky + .get('/v1/application_fees', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_application_fees_fee_refunds_id', + description: + '

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.

.', + inputSchema: stripe.GetApplicationFeesFeeRefundsIdParamsSchema + }) + async GetApplicationFeesFeeRefundsId( + params: stripe.GetApplicationFeesFeeRefundsIdParams + ): Promise { + return this.ky + .get(`/v1/application_fees/${params.fee}/refunds/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_application_fees_fee_refunds_id', + description: `

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.

.`, + inputSchema: stripe.PostApplicationFeesFeeRefundsIdParamsSchema + }) + async PostApplicationFeesFeeRefundsId( + params: stripe.PostApplicationFeesFeeRefundsIdParams + ): Promise { + return this.ky + .post(`/v1/application_fees/${params.fee}/refunds/${params.id}`) + .json() + } + + /** + *

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

. + */ + @aiFunction({ + name: 'get_application_fees_id', + description: + '

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

.', + inputSchema: stripe.GetApplicationFeesIdParamsSchema + }) + async GetApplicationFeesId( + params: stripe.GetApplicationFeesIdParams + ): Promise { + return this.ky + .get(`/v1/application_fees/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + @aiFunction({ + name: 'post_application_fees_id_refund', + + inputSchema: stripe.PostApplicationFeesIdRefundParamsSchema + }) + async PostApplicationFeesIdRefund( + params: stripe.PostApplicationFeesIdRefundParams + ): Promise { + return this.ky + .post(`/v1/application_fees/${params.id}/refund`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_application_fees_id_refunds', + description: + '

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.

.', + inputSchema: stripe.GetApplicationFeesIdRefundsParamsSchema + }) + async GetApplicationFeesIdRefunds( + params: stripe.GetApplicationFeesIdRefundsParams + ): Promise { + return this.ky + .get(`/v1/application_fees/${params.id}/refunds`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_application_fees_id_refunds', + description: `

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.

.`, + inputSchema: stripe.PostApplicationFeesIdRefundsParamsSchema + }) + async PostApplicationFeesIdRefunds( + params: stripe.PostApplicationFeesIdRefundsParams + ): Promise { + return this.ky + .post(`/v1/application_fees/${params.id}/refunds`) + .json() + } + + /** + *

List all secrets stored on the given scope.

. + */ + @aiFunction({ + name: 'get_apps_secrets', + description: '

List all secrets stored on the given scope.

.', + inputSchema: stripe.GetAppsSecretsParamsSchema + }) + async GetAppsSecrets( + params: stripe.GetAppsSecretsParams + ): Promise { + return this.ky + .get('/v1/apps/secrets', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Create or replace a secret in the secret store.

. + */ + @aiFunction({ + name: 'post_apps_secrets', + description: '

Create or replace a secret in the secret store.

.', + inputSchema: stripe.PostAppsSecretsParamsSchema + }) + async PostAppsSecrets( + _params: stripe.PostAppsSecretsParams + ): Promise { + return this.ky + .post('/v1/apps/secrets') + .json() + } + + /** + *

Deletes a secret from the secret store by name and scope.

. + */ + @aiFunction({ + name: 'post_apps_secrets_delete', + description: + '

Deletes a secret from the secret store by name and scope.

.', + inputSchema: stripe.PostAppsSecretsDeleteParamsSchema + }) + async PostAppsSecretsDelete( + _params: stripe.PostAppsSecretsDeleteParams + ): Promise { + return this.ky + .post('/v1/apps/secrets/delete') + .json() + } + + /** + *

Finds a secret in the secret store by name and scope.

. + */ + @aiFunction({ + name: 'get_apps_secrets_find', + description: + '

Finds a secret in the secret store by name and scope.

.', + inputSchema: stripe.GetAppsSecretsFindParamsSchema + }) + async GetAppsSecretsFind( + params: stripe.GetAppsSecretsFindParams + ): Promise { + return this.ky + .get('/v1/apps/secrets/find', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_balance', + description: `

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.

.`, + inputSchema: stripe.GetBalanceParamsSchema + }) + async GetBalance( + params: stripe.GetBalanceParams + ): Promise { + return this.ky + .get('/v1/balance', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_balance_history', + description: `

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.

.`, + inputSchema: stripe.GetBalanceHistoryParamsSchema + }) + async GetBalanceHistory( + params: stripe.GetBalanceHistoryParams + ): Promise { + return this.ky + .get('/v1/balance/history', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the balance transaction with the given ID.

+ +

Note that this endpoint previously used the path /v1/balance/history/:id.

. + */ + @aiFunction({ + name: 'get_balance_history_id', + description: `

Retrieves the balance transaction with the given ID.

+ +

Note that this endpoint previously used the path /v1/balance/history/:id.

.`, + inputSchema: stripe.GetBalanceHistoryIdParamsSchema + }) + async GetBalanceHistoryId( + params: stripe.GetBalanceHistoryIdParams + ): Promise { + return this.ky + .get(`/v1/balance/history/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_balance_transactions', + description: `

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.

.`, + inputSchema: stripe.GetBalanceTransactionsParamsSchema + }) + async GetBalanceTransactions( + params: stripe.GetBalanceTransactionsParams + ): Promise { + return this.ky + .get('/v1/balance_transactions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the balance transaction with the given ID.

+ +

Note that this endpoint previously used the path /v1/balance/history/:id.

. + */ + @aiFunction({ + name: 'get_balance_transactions_id', + description: `

Retrieves the balance transaction with the given ID.

+ +

Note that this endpoint previously used the path /v1/balance/history/:id.

.`, + inputSchema: stripe.GetBalanceTransactionsIdParamsSchema + }) + async GetBalanceTransactionsId( + params: stripe.GetBalanceTransactionsIdParams + ): Promise { + return this.ky + .get(`/v1/balance_transactions/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Lists billing active and inactive alerts

. + */ + @aiFunction({ + name: 'get_billing_alerts', + description: '

Lists billing active and inactive alerts

.', + inputSchema: stripe.GetBillingAlertsParamsSchema + }) + async GetBillingAlerts( + params: stripe.GetBillingAlertsParams + ): Promise { + return this.ky + .get('/v1/billing/alerts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a billing alert

. + */ + @aiFunction({ + name: 'post_billing_alerts', + description: '

Creates a billing alert

.', + inputSchema: stripe.PostBillingAlertsParamsSchema + }) + async PostBillingAlerts( + _params: stripe.PostBillingAlertsParams + ): Promise { + return this.ky + .post('/v1/billing/alerts') + .json() + } + + /** + *

Retrieves a billing alert given an ID

. + */ + @aiFunction({ + name: 'get_billing_alerts_id', + description: '

Retrieves a billing alert given an ID

.', + inputSchema: stripe.GetBillingAlertsIdParamsSchema + }) + async GetBillingAlertsId( + params: stripe.GetBillingAlertsIdParams + ): Promise { + return this.ky + .get(`/v1/billing/alerts/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Reactivates this alert, allowing it to trigger again.

. + */ + @aiFunction({ + name: 'post_billing_alerts_id_activate', + description: + '

Reactivates this alert, allowing it to trigger again.

.', + inputSchema: stripe.PostBillingAlertsIdActivateParamsSchema + }) + async PostBillingAlertsIdActivate( + params: stripe.PostBillingAlertsIdActivateParams + ): Promise { + return this.ky + .post(`/v1/billing/alerts/${params.id}/activate`) + .json() + } + + /** + *

Archives this alert, removing it from the list view and APIs. This is non-reversible.

. + */ + @aiFunction({ + name: 'post_billing_alerts_id_archive', + description: + '

Archives this alert, removing it from the list view and APIs. This is non-reversible.

.', + inputSchema: stripe.PostBillingAlertsIdArchiveParamsSchema + }) + async PostBillingAlertsIdArchive( + params: stripe.PostBillingAlertsIdArchiveParams + ): Promise { + return this.ky + .post(`/v1/billing/alerts/${params.id}/archive`) + .json() + } + + /** + *

Deactivates this alert, preventing it from triggering.

. + */ + @aiFunction({ + name: 'post_billing_alerts_id_deactivate', + description: + '

Deactivates this alert, preventing it from triggering.

.', + inputSchema: stripe.PostBillingAlertsIdDeactivateParamsSchema + }) + async PostBillingAlertsIdDeactivate( + params: stripe.PostBillingAlertsIdDeactivateParams + ): Promise { + return this.ky + .post(`/v1/billing/alerts/${params.id}/deactivate`) + .json() + } + + /** + *

Retrieves the credit balance summary for a customer.

. + */ + @aiFunction({ + name: 'get_billing_credit_balance_summary', + description: '

Retrieves the credit balance summary for a customer.

.', + inputSchema: stripe.GetBillingCreditBalanceSummaryParamsSchema + }) + async GetBillingCreditBalanceSummary( + params: stripe.GetBillingCreditBalanceSummaryParams + ): Promise { + return this.ky + .get('/v1/billing/credit_balance_summary', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieve a list of credit balance transactions.

. + */ + @aiFunction({ + name: 'get_billing_credit_balance_transactions', + description: '

Retrieve a list of credit balance transactions.

.', + inputSchema: stripe.GetBillingCreditBalanceTransactionsParamsSchema + }) + async GetBillingCreditBalanceTransactions( + params: stripe.GetBillingCreditBalanceTransactionsParams + ): Promise { + return this.ky + .get('/v1/billing/credit_balance_transactions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves a credit balance transaction.

. + */ + @aiFunction({ + name: 'get_billing_credit_balance_transactions_id', + description: '

Retrieves a credit balance transaction.

.', + inputSchema: stripe.GetBillingCreditBalanceTransactionsIdParamsSchema + }) + async GetBillingCreditBalanceTransactionsId( + params: stripe.GetBillingCreditBalanceTransactionsIdParams + ): Promise { + return this.ky + .get(`/v1/billing/credit_balance_transactions/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieve a list of credit grants.

. + */ + @aiFunction({ + name: 'get_billing_credit_grants', + description: '

Retrieve a list of credit grants.

.', + inputSchema: stripe.GetBillingCreditGrantsParamsSchema + }) + async GetBillingCreditGrants( + params: stripe.GetBillingCreditGrantsParams + ): Promise { + return this.ky + .get('/v1/billing/credit_grants', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a credit grant.

. + */ + @aiFunction({ + name: 'post_billing_credit_grants', + description: '

Creates a credit grant.

.', + inputSchema: stripe.PostBillingCreditGrantsParamsSchema + }) + async PostBillingCreditGrants( + _params: stripe.PostBillingCreditGrantsParams + ): Promise { + return this.ky + .post('/v1/billing/credit_grants') + .json() + } + + /** + *

Retrieves a credit grant.

. + */ + @aiFunction({ + name: 'get_billing_credit_grants_id', + description: '

Retrieves a credit grant.

.', + inputSchema: stripe.GetBillingCreditGrantsIdParamsSchema + }) + async GetBillingCreditGrantsId( + params: stripe.GetBillingCreditGrantsIdParams + ): Promise { + return this.ky + .get(`/v1/billing/credit_grants/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a credit grant.

. + */ + @aiFunction({ + name: 'post_billing_credit_grants_id', + description: '

Updates a credit grant.

.', + inputSchema: stripe.PostBillingCreditGrantsIdParamsSchema + }) + async PostBillingCreditGrantsId( + params: stripe.PostBillingCreditGrantsIdParams + ): Promise { + return this.ky + .post(`/v1/billing/credit_grants/${params.id}`) + .json() + } + + /** + *

Expires a credit grant.

. + */ + @aiFunction({ + name: 'post_billing_credit_grants_id_expire', + description: '

Expires a credit grant.

.', + inputSchema: stripe.PostBillingCreditGrantsIdExpireParamsSchema + }) + async PostBillingCreditGrantsIdExpire( + params: stripe.PostBillingCreditGrantsIdExpireParams + ): Promise { + return this.ky + .post(`/v1/billing/credit_grants/${params.id}/expire`) + .json() + } + + /** + *

Voids a credit grant.

. + */ + @aiFunction({ + name: 'post_billing_credit_grants_id_void', + description: '

Voids a credit grant.

.', + inputSchema: stripe.PostBillingCreditGrantsIdVoidParamsSchema + }) + async PostBillingCreditGrantsIdVoid( + params: stripe.PostBillingCreditGrantsIdVoidParams + ): Promise { + return this.ky + .post(`/v1/billing/credit_grants/${params.id}/void`) + .json() + } + + /** + *

Creates a billing meter event adjustment.

. + */ + @aiFunction({ + name: 'post_billing_meter_event_adjustments', + description: '

Creates a billing meter event adjustment.

.', + inputSchema: stripe.PostBillingMeterEventAdjustmentsParamsSchema + }) + async PostBillingMeterEventAdjustments( + _params: stripe.PostBillingMeterEventAdjustmentsParams + ): Promise { + return this.ky + .post('/v1/billing/meter_event_adjustments') + .json() + } + + /** + *

Creates a billing meter event.

. + */ + @aiFunction({ + name: 'post_billing_meter_events', + description: '

Creates a billing meter event.

.', + inputSchema: stripe.PostBillingMeterEventsParamsSchema + }) + async PostBillingMeterEvents( + _params: stripe.PostBillingMeterEventsParams + ): Promise { + return this.ky + .post('/v1/billing/meter_events') + .json() + } + + /** + *

Retrieve a list of billing meters.

. + */ + @aiFunction({ + name: 'get_billing_meters', + description: '

Retrieve a list of billing meters.

.', + inputSchema: stripe.GetBillingMetersParamsSchema + }) + async GetBillingMeters( + params: stripe.GetBillingMetersParams + ): Promise { + return this.ky + .get('/v1/billing/meters', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a billing meter.

. + */ + @aiFunction({ + name: 'post_billing_meters', + description: '

Creates a billing meter.

.', + inputSchema: stripe.PostBillingMetersParamsSchema + }) + async PostBillingMeters( + _params: stripe.PostBillingMetersParams + ): Promise { + return this.ky + .post('/v1/billing/meters') + .json() + } + + /** + *

Retrieves a billing meter given an ID.

. + */ + @aiFunction({ + name: 'get_billing_meters_id', + description: '

Retrieves a billing meter given an ID.

.', + inputSchema: stripe.GetBillingMetersIdParamsSchema + }) + async GetBillingMetersId( + params: stripe.GetBillingMetersIdParams + ): Promise { + return this.ky + .get(`/v1/billing/meters/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a billing meter.

. + */ + @aiFunction({ + name: 'post_billing_meters_id', + description: '

Updates a billing meter.

.', + inputSchema: stripe.PostBillingMetersIdParamsSchema + }) + async PostBillingMetersId( + params: stripe.PostBillingMetersIdParams + ): Promise { + return this.ky + .post(`/v1/billing/meters/${params.id}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_billing_meters_id_deactivate', + description: + '

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.

.', + inputSchema: stripe.PostBillingMetersIdDeactivateParamsSchema + }) + async PostBillingMetersIdDeactivate( + params: stripe.PostBillingMetersIdDeactivateParams + ): Promise { + return this.ky + .post(`/v1/billing/meters/${params.id}/deactivate`) + .json() + } + + /** + *

Retrieve a list of billing meter event summaries.

. + */ + @aiFunction({ + name: 'get_billing_meters_id_event_summaries', + description: '

Retrieve a list of billing meter event summaries.

.', + inputSchema: stripe.GetBillingMetersIdEventSummariesParamsSchema + }) + async GetBillingMetersIdEventSummaries( + params: stripe.GetBillingMetersIdEventSummariesParams + ): Promise { + return this.ky + .get(`/v1/billing/meters/${params.id}/event_summaries`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'customer', + 'end_time', + 'ending_before', + 'expand', + 'limit', + 'start_time', + 'starting_after', + 'value_grouping_window' + ) + ) + }) + .json() + } + + /** + *

When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.

. + */ + @aiFunction({ + name: 'post_billing_meters_id_reactivate', + description: + '

When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.

.', + inputSchema: stripe.PostBillingMetersIdReactivateParamsSchema + }) + async PostBillingMetersIdReactivate( + params: stripe.PostBillingMetersIdReactivateParams + ): Promise { + return this.ky + .post(`/v1/billing/meters/${params.id}/reactivate`) + .json() + } + + /** + *

Returns a list of configurations that describe the functionality of the customer portal.

. + */ + @aiFunction({ + name: 'get_billing_portal_configurations', + description: + '

Returns a list of configurations that describe the functionality of the customer portal.

.', + inputSchema: stripe.GetBillingPortalConfigurationsParamsSchema + }) + async GetBillingPortalConfigurations( + params: stripe.GetBillingPortalConfigurationsParams + ): Promise { + return this.ky + .get('/v1/billing_portal/configurations', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a configuration that describes the functionality and behavior of a PortalSession

. + */ + @aiFunction({ + name: 'post_billing_portal_configurations', + description: + '

Creates a configuration that describes the functionality and behavior of a PortalSession

.', + inputSchema: stripe.PostBillingPortalConfigurationsParamsSchema + }) + async PostBillingPortalConfigurations( + _params: stripe.PostBillingPortalConfigurationsParams + ): Promise { + return this.ky + .post('/v1/billing_portal/configurations') + .json() + } + + /** + *

Retrieves a configuration that describes the functionality of the customer portal.

. + */ + @aiFunction({ + name: 'get_billing_portal_configurations_configuration', + description: + '

Retrieves a configuration that describes the functionality of the customer portal.

.', + inputSchema: stripe.GetBillingPortalConfigurationsConfigurationParamsSchema + }) + async GetBillingPortalConfigurationsConfiguration( + params: stripe.GetBillingPortalConfigurationsConfigurationParams + ): Promise { + return this.ky + .get(`/v1/billing_portal/configurations/${params.configuration}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a configuration that describes the functionality of the customer portal.

. + */ + @aiFunction({ + name: 'post_billing_portal_configurations_configuration', + description: + '

Updates a configuration that describes the functionality of the customer portal.

.', + inputSchema: stripe.PostBillingPortalConfigurationsConfigurationParamsSchema + }) + async PostBillingPortalConfigurationsConfiguration( + params: stripe.PostBillingPortalConfigurationsConfigurationParams + ): Promise { + return this.ky + .post(`/v1/billing_portal/configurations/${params.configuration}`) + .json() + } + + /** + *

Creates a session of the customer portal.

. + */ + @aiFunction({ + name: 'post_billing_portal_sessions', + description: '

Creates a session of the customer portal.

.', + inputSchema: stripe.PostBillingPortalSessionsParamsSchema + }) + async PostBillingPortalSessions( + _params: stripe.PostBillingPortalSessionsParams + ): Promise { + return this.ky + .post('/v1/billing_portal/sessions') + .json() + } + + /** + *

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

. + */ + @aiFunction({ + name: 'get_charges', + description: + '

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

.', + inputSchema: stripe.GetChargesParamsSchema + }) + async GetCharges( + params: stripe.GetChargesParams + ): Promise { + return this.ky + .get('/v1/charges', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

This method is no longer recommended—use the Payment Intents API +to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge +object used to request payment.

. + */ + @aiFunction({ + name: 'post_charges', + description: `

This method is no longer recommended—use the Payment Intents API +to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge +object used to request payment.

.`, + inputSchema: stripe.PostChargesParamsSchema + }) + async PostCharges( + _params: stripe.PostChargesParams + ): Promise { + return this.ky.post('/v1/charges').json() + } + + /** + *

Search for charges you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_charges_search', + description: `

Search for charges you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetChargesSearchParamsSchema + }) + async GetChargesSearch( + params: stripe.GetChargesSearchParams + ): Promise { + return this.ky + .get('/v1/charges/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_charges_charge', + description: + '

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.

.', + inputSchema: stripe.GetChargesChargeParamsSchema + }) + async GetChargesCharge( + params: stripe.GetChargesChargeParams + ): Promise { + return this.ky + .get(`/v1/charges/${params.charge}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_charges_charge', + description: + '

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostChargesChargeParamsSchema + }) + async PostChargesCharge( + params: stripe.PostChargesChargeParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}`) + .json() + } + + /** + *

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), 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.

. + */ + @aiFunction({ + name: 'post_charges_charge_capture', + description: `

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), 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.

.`, + inputSchema: stripe.PostChargesChargeCaptureParamsSchema + }) + async PostChargesChargeCapture( + params: stripe.PostChargesChargeCaptureParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}/capture`) + .json() + } + + /** + *

Retrieve a dispute for a specified charge.

. + */ + @aiFunction({ + name: 'get_charges_charge_dispute', + description: '

Retrieve a dispute for a specified charge.

.', + inputSchema: stripe.GetChargesChargeDisputeParamsSchema + }) + async GetChargesChargeDispute( + params: stripe.GetChargesChargeDisputeParams + ): Promise { + return this.ky + .get(`/v1/charges/${params.charge}/dispute`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + @aiFunction({ + name: 'post_charges_charge_dispute', + + inputSchema: stripe.PostChargesChargeDisputeParamsSchema + }) + async PostChargesChargeDispute( + params: stripe.PostChargesChargeDisputeParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}/dispute`) + .json() + } + + @aiFunction({ + name: 'post_charges_charge_dispute_close', + + inputSchema: stripe.PostChargesChargeDisputeCloseParamsSchema + }) + async PostChargesChargeDisputeClose( + params: stripe.PostChargesChargeDisputeCloseParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}/dispute/close`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_charges_charge_refund', + description: `

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.

.`, + inputSchema: stripe.PostChargesChargeRefundParamsSchema + }) + async PostChargesChargeRefund( + params: stripe.PostChargesChargeRefundParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}/refund`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_charges_charge_refunds', + description: + '

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.

.', + inputSchema: stripe.GetChargesChargeRefundsParamsSchema + }) + async GetChargesChargeRefunds( + params: stripe.GetChargesChargeRefundsParams + ): Promise { + return this.ky + .get(`/v1/charges/${params.charge}/refunds`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_charges_charge_refunds', + description: `

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.

.`, + inputSchema: stripe.PostChargesChargeRefundsParamsSchema + }) + async PostChargesChargeRefunds( + params: stripe.PostChargesChargeRefundsParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}/refunds`) + .json() + } + + /** + *

Retrieves the details of an existing refund.

. + */ + @aiFunction({ + name: 'get_charges_charge_refunds_refund', + description: '

Retrieves the details of an existing refund.

.', + inputSchema: stripe.GetChargesChargeRefundsRefundParamsSchema + }) + async GetChargesChargeRefundsRefund( + params: stripe.GetChargesChargeRefundsRefundParams + ): Promise { + return this.ky + .get(`/v1/charges/${params.charge}/refunds/${params.refund}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Update a specified refund.

. + */ + @aiFunction({ + name: 'post_charges_charge_refunds_refund', + description: '

Update a specified refund.

.', + inputSchema: stripe.PostChargesChargeRefundsRefundParamsSchema + }) + async PostChargesChargeRefundsRefund( + params: stripe.PostChargesChargeRefundsRefundParams + ): Promise { + return this.ky + .post(`/v1/charges/${params.charge}/refunds/${params.refund}`) + .json() + } + + /** + *

Returns a list of Checkout Sessions.

. + */ + @aiFunction({ + name: 'get_checkout_sessions', + description: '

Returns a list of Checkout Sessions.

.', + inputSchema: stripe.GetCheckoutSessionsParamsSchema + }) + async GetCheckoutSessions( + params: stripe.GetCheckoutSessionsParams + ): Promise { + return this.ky + .get('/v1/checkout/sessions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a Session object.

. + */ + @aiFunction({ + name: 'post_checkout_sessions', + description: '

Creates a Session object.

.', + inputSchema: stripe.PostCheckoutSessionsParamsSchema + }) + async PostCheckoutSessions( + _params: stripe.PostCheckoutSessionsParams + ): Promise { + return this.ky + .post('/v1/checkout/sessions') + .json() + } + + /** + *

Retrieves a Session object.

. + */ + @aiFunction({ + name: 'get_checkout_sessions_session', + description: '

Retrieves a Session object.

.', + inputSchema: stripe.GetCheckoutSessionsSessionParamsSchema + }) + async GetCheckoutSessionsSession( + params: stripe.GetCheckoutSessionsSessionParams + ): Promise { + return this.ky + .get(`/v1/checkout/sessions/${params.session}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a Session object.

. + */ + @aiFunction({ + name: 'post_checkout_sessions_session', + description: '

Updates a Session object.

.', + inputSchema: stripe.PostCheckoutSessionsSessionParamsSchema + }) + async PostCheckoutSessionsSession( + params: stripe.PostCheckoutSessionsSessionParams + ): Promise { + return this.ky + .post(`/v1/checkout/sessions/${params.session}`) + .json() + } + + /** + *

A Session can be expired when it is in one of these statuses: open

+ +

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

. + */ + @aiFunction({ + name: 'post_checkout_sessions_session_expire', + description: `

A Session can be expired when it is in one of these statuses: open

+ +

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

.`, + inputSchema: stripe.PostCheckoutSessionsSessionExpireParamsSchema + }) + async PostCheckoutSessionsSessionExpire( + params: stripe.PostCheckoutSessionsSessionExpireParams + ): Promise { + return this.ky + .post(`/v1/checkout/sessions/${params.session}/expire`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_checkout_sessions_session_line_items', + description: + '

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.

.', + inputSchema: stripe.GetCheckoutSessionsSessionLineItemsParamsSchema + }) + async GetCheckoutSessionsSessionLineItems( + params: stripe.GetCheckoutSessionsSessionLineItemsParams + ): Promise { + return this.ky + .get(`/v1/checkout/sessions/${params.session}/line_items`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Lists all Climate order objects. The orders are returned sorted by creation date, with the +most recently created orders appearing first.

. + */ + @aiFunction({ + name: 'get_climate_orders', + description: `

Lists all Climate order objects. The orders are returned sorted by creation date, with the +most recently created orders appearing first.

.`, + inputSchema: stripe.GetClimateOrdersParamsSchema + }) + async GetClimateOrders( + params: stripe.GetClimateOrdersParams + ): Promise { + return this.ky + .get('/v1/climate/orders', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_climate_orders', + description: `

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.

.`, + inputSchema: stripe.PostClimateOrdersParamsSchema + }) + async PostClimateOrders( + _params: stripe.PostClimateOrdersParams + ): Promise { + return this.ky + .post('/v1/climate/orders') + .json() + } + + /** + *

Retrieves the details of a Climate order object with the given ID.

. + */ + @aiFunction({ + name: 'get_climate_orders_order', + description: + '

Retrieves the details of a Climate order object with the given ID.

.', + inputSchema: stripe.GetClimateOrdersOrderParamsSchema + }) + async GetClimateOrdersOrder( + params: stripe.GetClimateOrdersOrderParams + ): Promise { + return this.ky + .get(`/v1/climate/orders/${params.order}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified order by setting the values of the parameters passed.

. + */ + @aiFunction({ + name: 'post_climate_orders_order', + description: + '

Updates the specified order by setting the values of the parameters passed.

.', + inputSchema: stripe.PostClimateOrdersOrderParamsSchema + }) + async PostClimateOrdersOrder( + params: stripe.PostClimateOrdersOrderParams + ): Promise { + return this.ky + .post(`/v1/climate/orders/${params.order}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_climate_orders_order_cancel', + description: `

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.

.`, + inputSchema: stripe.PostClimateOrdersOrderCancelParamsSchema + }) + async PostClimateOrdersOrderCancel( + params: stripe.PostClimateOrdersOrderCancelParams + ): Promise { + return this.ky + .post(`/v1/climate/orders/${params.order}/cancel`) + .json() + } + + /** + *

Lists all available Climate product objects.

. + */ + @aiFunction({ + name: 'get_climate_products', + description: '

Lists all available Climate product objects.

.', + inputSchema: stripe.GetClimateProductsParamsSchema + }) + async GetClimateProducts( + params: stripe.GetClimateProductsParams + ): Promise { + return this.ky + .get('/v1/climate/products', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of a Climate product with the given ID.

. + */ + @aiFunction({ + name: 'get_climate_products_product', + description: + '

Retrieves the details of a Climate product with the given ID.

.', + inputSchema: stripe.GetClimateProductsProductParamsSchema + }) + async GetClimateProductsProduct( + params: stripe.GetClimateProductsProductParams + ): Promise { + return this.ky + .get(`/v1/climate/products/${params.product}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Lists all available Climate supplier objects.

. + */ + @aiFunction({ + name: 'get_climate_suppliers', + description: '

Lists all available Climate supplier objects.

.', + inputSchema: stripe.GetClimateSuppliersParamsSchema + }) + async GetClimateSuppliers( + params: stripe.GetClimateSuppliersParams + ): Promise { + return this.ky + .get('/v1/climate/suppliers', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves a Climate supplier object.

. + */ + @aiFunction({ + name: 'get_climate_suppliers_supplier', + description: '

Retrieves a Climate supplier object.

.', + inputSchema: stripe.GetClimateSuppliersSupplierParamsSchema + }) + async GetClimateSuppliersSupplier( + params: stripe.GetClimateSuppliersSupplierParams + ): Promise { + return this.ky + .get(`/v1/climate/suppliers/${params.supplier}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves an existing ConfirmationToken object

. + */ + @aiFunction({ + name: 'get_confirmation_tokens_confirmation_token', + description: '

Retrieves an existing ConfirmationToken object

.', + inputSchema: stripe.GetConfirmationTokensConfirmationTokenParamsSchema + }) + async GetConfirmationTokensConfirmationToken( + params: stripe.GetConfirmationTokensConfirmationTokenParams + ): Promise { + return this.ky + .get(`/v1/confirmation_tokens/${params.confirmation_token}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Lists all Country Spec objects available in the API.

. + */ + @aiFunction({ + name: 'get_country_specs', + description: '

Lists all Country Spec objects available in the API.

.', + inputSchema: stripe.GetCountrySpecsParamsSchema + }) + async GetCountrySpecs( + params: stripe.GetCountrySpecsParams + ): Promise { + return this.ky + .get('/v1/country_specs', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Returns a Country Spec for a given Country code.

. + */ + @aiFunction({ + name: 'get_country_specs_country', + description: '

Returns a Country Spec for a given Country code.

.', + inputSchema: stripe.GetCountrySpecsCountryParamsSchema + }) + async GetCountrySpecsCountry( + params: stripe.GetCountrySpecsCountryParams + ): Promise { + return this.ky + .get(`/v1/country_specs/${params.country}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of your coupons.

. + */ + @aiFunction({ + name: 'get_coupons', + description: '

Returns a list of your coupons.

.', + inputSchema: stripe.GetCouponsParamsSchema + }) + async GetCoupons( + params: stripe.GetCouponsParams + ): Promise { + return this.ky + .get('/v1/coupons', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

You can create coupons easily via the coupon management 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.

. + */ + @aiFunction({ + name: 'post_coupons', + description: `

You can create coupons easily via the coupon management 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.

.`, + inputSchema: stripe.PostCouponsParamsSchema + }) + async PostCoupons( + _params: stripe.PostCouponsParams + ): Promise { + return this.ky.post('/v1/coupons').json() + } + + /** + *

Retrieves the coupon with the given ID.

. + */ + @aiFunction({ + name: 'get_coupons_coupon', + description: '

Retrieves the coupon with the given ID.

.', + inputSchema: stripe.GetCouponsCouponParamsSchema + }) + async GetCouponsCoupon( + params: stripe.GetCouponsCouponParams + ): Promise { + return this.ky + .get(`/v1/coupons/${params.coupon}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

. + */ + @aiFunction({ + name: 'post_coupons_coupon', + description: + '

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

.', + inputSchema: stripe.PostCouponsCouponParamsSchema + }) + async PostCouponsCoupon( + params: stripe.PostCouponsCouponParams + ): Promise { + return this.ky + .post(`/v1/coupons/${params.coupon}`) + .json() + } + + /** + *

You can delete coupons via the coupon management 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.

. + */ + @aiFunction({ + name: 'delete_coupons_coupon', + description: + '

You can delete coupons via the coupon management 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.

.', + inputSchema: stripe.DeleteCouponsCouponParamsSchema + }) + async DeleteCouponsCoupon( + params: stripe.DeleteCouponsCouponParams + ): Promise { + return this.ky + .delete(`/v1/coupons/${params.coupon}`) + .json() + } + + /** + *

Returns a list of credit notes.

. + */ + @aiFunction({ + name: 'get_credit_notes', + description: '

Returns a list of credit notes.

.', + inputSchema: stripe.GetCreditNotesParamsSchema + }) + async GetCreditNotes( + params: stripe.GetCreditNotesParams + ): Promise { + return this.ky + .get('/v1/credit_notes', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces +its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result +in any combination of the following:

+ +
    +
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • +
  • 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).
  • +
+ +

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

+ +

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount +or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

. + */ + @aiFunction({ + name: 'post_credit_notes', + description: `

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces +its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result +in any combination of the following:

+ +
    +
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • +
  • 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).
  • +
+ +

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

+ +

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount +or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

.`, + inputSchema: stripe.PostCreditNotesParamsSchema + }) + async PostCreditNotes( + _params: stripe.PostCreditNotesParams + ): Promise { + return this.ky + .post('/v1/credit_notes') + .json() + } + + /** + *

Get a preview of a credit note without creating it.

. + */ + @aiFunction({ + name: 'get_credit_notes_preview', + description: '

Get a preview of a credit note without creating it.

.', + inputSchema: stripe.GetCreditNotesPreviewParamsSchema + }) + async GetCreditNotesPreview( + params: stripe.GetCreditNotesPreviewParams + ): Promise { + return this.ky + .get('/v1/credit_notes/preview', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_credit_notes_preview_lines', + description: + '

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.

.', + inputSchema: stripe.GetCreditNotesPreviewLinesParamsSchema + }) + async GetCreditNotesPreviewLines( + params: stripe.GetCreditNotesPreviewLinesParams + ): Promise { + return this.ky + .get('/v1/credit_notes/preview/lines', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_credit_notes_credit_note_lines', + description: + '

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.

.', + inputSchema: stripe.GetCreditNotesCreditNoteLinesParamsSchema + }) + async GetCreditNotesCreditNoteLines( + params: stripe.GetCreditNotesCreditNoteLinesParams + ): Promise { + return this.ky + .get(`/v1/credit_notes/${params.credit_note}/lines`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Retrieves the credit note object with the given identifier.

. + */ + @aiFunction({ + name: 'get_credit_notes_id', + description: + '

Retrieves the credit note object with the given identifier.

.', + inputSchema: stripe.GetCreditNotesIdParamsSchema + }) + async GetCreditNotesId( + params: stripe.GetCreditNotesIdParams + ): Promise { + return this.ky + .get(`/v1/credit_notes/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing credit note.

. + */ + @aiFunction({ + name: 'post_credit_notes_id', + description: '

Updates an existing credit note.

.', + inputSchema: stripe.PostCreditNotesIdParamsSchema + }) + async PostCreditNotesId( + params: stripe.PostCreditNotesIdParams + ): Promise { + return this.ky + .post(`/v1/credit_notes/${params.id}`) + .json() + } + + /** + *

Marks a credit note as void. Learn more about voiding credit notes.

. + */ + @aiFunction({ + name: 'post_credit_notes_id_void', + description: + '

Marks a credit note as void. Learn more about voiding credit notes.

.', + inputSchema: stripe.PostCreditNotesIdVoidParamsSchema + }) + async PostCreditNotesIdVoid( + params: stripe.PostCreditNotesIdVoidParams + ): Promise { + return this.ky + .post(`/v1/credit_notes/${params.id}/void`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_customer_sessions', + description: + '

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.

.', + inputSchema: stripe.PostCustomerSessionsParamsSchema + }) + async PostCustomerSessions( + _params: stripe.PostCustomerSessionsParams + ): Promise { + return this.ky + .post('/v1/customer_sessions') + .json() + } + + /** + *

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

. + */ + @aiFunction({ + name: 'get_customers', + description: + '

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

.', + inputSchema: stripe.GetCustomersParamsSchema + }) + async GetCustomers( + params: stripe.GetCustomersParams + ): Promise { + return this.ky + .get('/v1/customers', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new customer object.

. + */ + @aiFunction({ + name: 'post_customers', + description: '

Creates a new customer object.

.', + inputSchema: stripe.PostCustomersParamsSchema + }) + async PostCustomers( + _params: stripe.PostCustomersParams + ): Promise { + return this.ky.post('/v1/customers').json() + } + + /** + *

Search for customers you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_customers_search', + description: `

Search for customers you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetCustomersSearchParamsSchema + }) + async GetCustomersSearch( + params: stripe.GetCustomersSearchParams + ): Promise { + return this.ky + .get('/v1/customers/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves a Customer object.

. + */ + @aiFunction({ + name: 'get_customers_customer', + description: '

Retrieves a Customer object.

.', + inputSchema: stripe.GetCustomersCustomerParamsSchema + }) + async GetCustomersCustomer( + params: stripe.GetCustomersCustomerParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_customers_customer', + description: `

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.

.`, + inputSchema: stripe.PostCustomersCustomerParamsSchema + }) + async PostCustomersCustomer( + params: stripe.PostCustomersCustomerParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}`) + .json() + } + + /** + *

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

. + */ + @aiFunction({ + name: 'delete_customers_customer', + description: + '

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

.', + inputSchema: stripe.DeleteCustomersCustomerParamsSchema + }) + async DeleteCustomersCustomer( + params: stripe.DeleteCustomersCustomerParams + ): Promise { + return this.ky + .delete(`/v1/customers/${params.customer}`) + .json() + } + + /** + *

Returns a list of transactions that updated the customer’s balances.

. + */ + @aiFunction({ + name: 'get_customers_customer_balance_transactions', + description: + '

Returns a list of transactions that updated the customer’s balances.

.', + inputSchema: stripe.GetCustomersCustomerBalanceTransactionsParamsSchema + }) + async GetCustomersCustomerBalanceTransactions( + params: stripe.GetCustomersCustomerBalanceTransactionsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/balance_transactions`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Creates an immutable transaction that updates the customer’s credit balance.

. + */ + @aiFunction({ + name: 'post_customers_customer_balance_transactions', + description: + '

Creates an immutable transaction that updates the customer’s credit balance.

.', + inputSchema: stripe.PostCustomersCustomerBalanceTransactionsParamsSchema + }) + async PostCustomersCustomerBalanceTransactions( + params: stripe.PostCustomersCustomerBalanceTransactionsParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/balance_transactions`) + .json() + } + + /** + *

Retrieves a specific customer balance transaction that updated the customer’s balances.

. + */ + @aiFunction({ + name: 'get_customers_customer_balance_transactions_transaction', + description: + '

Retrieves a specific customer balance transaction that updated the customer’s balances.

.', + inputSchema: + stripe.GetCustomersCustomerBalanceTransactionsTransactionParamsSchema + }) + async GetCustomersCustomerBalanceTransactionsTransaction( + params: stripe.GetCustomersCustomerBalanceTransactionsTransactionParams + ): Promise { + return this.ky + .get( + `/v1/customers/${params.customer}/balance_transactions/${params.transaction}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Most credit balance transaction fields are immutable, but you may update its description and metadata.

. + */ + @aiFunction({ + name: 'post_customers_customer_balance_transactions_transaction', + description: + '

Most credit balance transaction fields are immutable, but you may update its description and metadata.

.', + inputSchema: + stripe.PostCustomersCustomerBalanceTransactionsTransactionParamsSchema + }) + async PostCustomersCustomerBalanceTransactionsTransaction( + params: stripe.PostCustomersCustomerBalanceTransactionsTransactionParams + ): Promise { + return this.ky + .post( + `/v1/customers/${params.customer}/balance_transactions/${params.transaction}` + ) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_customers_customer_bank_accounts', + description: + '

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.

.', + inputSchema: stripe.GetCustomersCustomerBankAccountsParamsSchema + }) + async GetCustomersCustomerBankAccounts( + params: stripe.GetCustomersCustomerBankAccountsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/bank_accounts`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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 to have a new default_source.

. + */ + @aiFunction({ + name: 'post_customers_customer_bank_accounts', + description: `

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 to have a new default_source.

.`, + inputSchema: stripe.PostCustomersCustomerBankAccountsParamsSchema + }) + async PostCustomersCustomerBankAccounts( + params: stripe.PostCustomersCustomerBankAccountsParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/bank_accounts`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_customers_customer_bank_accounts_id', + description: + '

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.

.', + inputSchema: stripe.GetCustomersCustomerBankAccountsIdParamsSchema + }) + async GetCustomersCustomerBankAccountsId( + params: stripe.GetCustomersCustomerBankAccountsIdParams + ): Promise { + return this.ky + .get( + `/v1/customers/${params.customer}/bank_accounts/${params.id}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Update a specified source for a given customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_bank_accounts_id', + description: '

Update a specified source for a given customer.

.', + inputSchema: stripe.PostCustomersCustomerBankAccountsIdParamsSchema + }) + async PostCustomersCustomerBankAccountsId( + params: stripe.PostCustomersCustomerBankAccountsIdParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/bank_accounts/${params.id}`) + .json() + } + + /** + *

Delete a specified source for a given customer.

. + */ + @aiFunction({ + name: 'delete_customers_customer_bank_accounts_id', + description: '

Delete a specified source for a given customer.

.', + inputSchema: stripe.DeleteCustomersCustomerBankAccountsIdParamsSchema + }) + async DeleteCustomersCustomerBankAccountsId( + params: stripe.DeleteCustomersCustomerBankAccountsIdParams + ): Promise { + return this.ky + .delete( + `/v1/customers/${params.customer}/bank_accounts/${params.id}` + ) + .json() + } + + /** + *

Verify a specified bank account for a given customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_bank_accounts_id_verify', + description: + '

Verify a specified bank account for a given customer.

.', + inputSchema: stripe.PostCustomersCustomerBankAccountsIdVerifyParamsSchema + }) + async PostCustomersCustomerBankAccountsIdVerify( + params: stripe.PostCustomersCustomerBankAccountsIdVerifyParams + ): Promise { + return this.ky + .post( + `/v1/customers/${params.customer}/bank_accounts/${params.id}/verify` + ) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_customers_customer_cards', + description: `

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.

.`, + inputSchema: stripe.GetCustomersCustomerCardsParamsSchema + }) + async GetCustomersCustomerCards( + params: stripe.GetCustomersCustomerCardsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/cards`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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 to have a new default_source.

. + */ + @aiFunction({ + name: 'post_customers_customer_cards', + description: `

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 to have a new default_source.

.`, + inputSchema: stripe.PostCustomersCustomerCardsParamsSchema + }) + async PostCustomersCustomerCards( + params: stripe.PostCustomersCustomerCardsParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/cards`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_customers_customer_cards_id', + description: + '

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.

.', + inputSchema: stripe.GetCustomersCustomerCardsIdParamsSchema + }) + async GetCustomersCustomerCardsId( + params: stripe.GetCustomersCustomerCardsIdParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/cards/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Update a specified source for a given customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_cards_id', + description: '

Update a specified source for a given customer.

.', + inputSchema: stripe.PostCustomersCustomerCardsIdParamsSchema + }) + async PostCustomersCustomerCardsId( + params: stripe.PostCustomersCustomerCardsIdParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/cards/${params.id}`) + .json() + } + + /** + *

Delete a specified source for a given customer.

. + */ + @aiFunction({ + name: 'delete_customers_customer_cards_id', + description: '

Delete a specified source for a given customer.

.', + inputSchema: stripe.DeleteCustomersCustomerCardsIdParamsSchema + }) + async DeleteCustomersCustomerCardsId( + params: stripe.DeleteCustomersCustomerCardsIdParams + ): Promise { + return this.ky + .delete(`/v1/customers/${params.customer}/cards/${params.id}`) + .json() + } + + /** + *

Retrieves a customer’s cash balance.

. + */ + @aiFunction({ + name: 'get_customers_customer_cash_balance', + description: '

Retrieves a customer’s cash balance.

.', + inputSchema: stripe.GetCustomersCustomerCashBalanceParamsSchema + }) + async GetCustomersCustomerCashBalance( + params: stripe.GetCustomersCustomerCashBalanceParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/cash_balance`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Changes the settings on a customer’s cash balance.

. + */ + @aiFunction({ + name: 'post_customers_customer_cash_balance', + description: '

Changes the settings on a customer’s cash balance.

.', + inputSchema: stripe.PostCustomersCustomerCashBalanceParamsSchema + }) + async PostCustomersCustomerCashBalance( + params: stripe.PostCustomersCustomerCashBalanceParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/cash_balance`) + .json() + } + + /** + *

Returns a list of transactions that modified the customer’s cash balance.

. + */ + @aiFunction({ + name: 'get_customers_customer_cash_balance_transactions', + description: + '

Returns a list of transactions that modified the customer’s cash balance.

.', + inputSchema: stripe.GetCustomersCustomerCashBalanceTransactionsParamsSchema + }) + async GetCustomersCustomerCashBalanceTransactions( + params: stripe.GetCustomersCustomerCashBalanceTransactionsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/cash_balance_transactions`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

. + */ + @aiFunction({ + name: 'get_customers_customer_cash_balance_transactions_transaction', + description: + '

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

.', + inputSchema: + stripe.GetCustomersCustomerCashBalanceTransactionsTransactionParamsSchema + }) + async GetCustomersCustomerCashBalanceTransactionsTransaction( + params: stripe.GetCustomersCustomerCashBalanceTransactionsTransactionParams + ): Promise { + return this.ky + .get( + `/v1/customers/${params.customer}/cash_balance_transactions/${params.transaction}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + @aiFunction({ + name: 'get_customers_customer_discount', + + inputSchema: stripe.GetCustomersCustomerDiscountParamsSchema + }) + async GetCustomersCustomerDiscount( + params: stripe.GetCustomersCustomerDiscountParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/discount`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Removes the currently applied discount on a customer.

. + */ + @aiFunction({ + name: 'delete_customers_customer_discount', + description: + '

Removes the currently applied discount on a customer.

.', + inputSchema: stripe.DeleteCustomersCustomerDiscountParamsSchema + }) + async DeleteCustomersCustomerDiscount( + params: stripe.DeleteCustomersCustomerDiscountParams + ): Promise { + return this.ky + .delete(`/v1/customers/${params.customer}/discount`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_customers_customer_funding_instructions', + description: `

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.

.`, + inputSchema: stripe.PostCustomersCustomerFundingInstructionsParamsSchema + }) + async PostCustomersCustomerFundingInstructions( + params: stripe.PostCustomersCustomerFundingInstructionsParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/funding_instructions`) + .json() + } + + /** + *

Returns a list of PaymentMethods for a given Customer

. + */ + @aiFunction({ + name: 'get_customers_customer_payment_methods', + description: + '

Returns a list of PaymentMethods for a given Customer

.', + inputSchema: stripe.GetCustomersCustomerPaymentMethodsParamsSchema + }) + async GetCustomersCustomerPaymentMethods( + params: stripe.GetCustomersCustomerPaymentMethodsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/payment_methods`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'allow_redisplay', + 'ending_before', + 'expand', + 'limit', + 'starting_after', + 'type' + ) + ) + }) + .json() + } + + /** + *

Retrieves a PaymentMethod object for a given Customer.

. + */ + @aiFunction({ + name: 'get_customers_customer_payment_methods_payment_method', + description: + '

Retrieves a PaymentMethod object for a given Customer.

.', + inputSchema: + stripe.GetCustomersCustomerPaymentMethodsPaymentMethodParamsSchema + }) + async GetCustomersCustomerPaymentMethodsPaymentMethod( + params: stripe.GetCustomersCustomerPaymentMethodsPaymentMethodParams + ): Promise { + return this.ky + .get( + `/v1/customers/${params.customer}/payment_methods/${params.payment_method}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

List sources for a specified customer.

. + */ + @aiFunction({ + name: 'get_customers_customer_sources', + description: '

List sources for a specified customer.

.', + inputSchema: stripe.GetCustomersCustomerSourcesParamsSchema + }) + async GetCustomersCustomerSources( + params: stripe.GetCustomersCustomerSourcesParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/sources`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'ending_before', + 'expand', + 'limit', + 'object', + 'starting_after' + ) + ) + }) + .json() + } + + /** + *

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 to have a new default_source.

. + */ + @aiFunction({ + name: 'post_customers_customer_sources', + description: `

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 to have a new default_source.

.`, + inputSchema: stripe.PostCustomersCustomerSourcesParamsSchema + }) + async PostCustomersCustomerSources( + params: stripe.PostCustomersCustomerSourcesParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/sources`) + .json() + } + + /** + *

Retrieve a specified source for a given customer.

. + */ + @aiFunction({ + name: 'get_customers_customer_sources_id', + description: '

Retrieve a specified source for a given customer.

.', + inputSchema: stripe.GetCustomersCustomerSourcesIdParamsSchema + }) + async GetCustomersCustomerSourcesId( + params: stripe.GetCustomersCustomerSourcesIdParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/sources/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Update a specified source for a given customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_sources_id', + description: '

Update a specified source for a given customer.

.', + inputSchema: stripe.PostCustomersCustomerSourcesIdParamsSchema + }) + async PostCustomersCustomerSourcesId( + params: stripe.PostCustomersCustomerSourcesIdParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/sources/${params.id}`) + .json() + } + + /** + *

Delete a specified source for a given customer.

. + */ + @aiFunction({ + name: 'delete_customers_customer_sources_id', + description: '

Delete a specified source for a given customer.

.', + inputSchema: stripe.DeleteCustomersCustomerSourcesIdParamsSchema + }) + async DeleteCustomersCustomerSourcesId( + params: stripe.DeleteCustomersCustomerSourcesIdParams + ): Promise { + return this.ky + .delete(`/v1/customers/${params.customer}/sources/${params.id}`) + .json() + } + + /** + *

Verify a specified bank account for a given customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_sources_id_verify', + description: + '

Verify a specified bank account for a given customer.

.', + inputSchema: stripe.PostCustomersCustomerSourcesIdVerifyParamsSchema + }) + async PostCustomersCustomerSourcesIdVerify( + params: stripe.PostCustomersCustomerSourcesIdVerifyParams + ): Promise { + return this.ky + .post( + `/v1/customers/${params.customer}/sources/${params.id}/verify` + ) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_customers_customer_subscriptions', + description: + '

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.

.', + inputSchema: stripe.GetCustomersCustomerSubscriptionsParamsSchema + }) + async GetCustomersCustomerSubscriptions( + params: stripe.GetCustomersCustomerSubscriptionsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/subscriptions`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Creates a new subscription on an existing customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_subscriptions', + description: '

Creates a new subscription on an existing customer.

.', + inputSchema: stripe.PostCustomersCustomerSubscriptionsParamsSchema + }) + async PostCustomersCustomerSubscriptions( + params: stripe.PostCustomersCustomerSubscriptionsParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/subscriptions`) + .json() + } + + /** + *

Retrieves the subscription with the given ID.

. + */ + @aiFunction({ + name: 'get_customers_customer_subscriptions_subscription_exposed_id', + description: '

Retrieves the subscription with the given ID.

.', + inputSchema: + stripe.GetCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema + }) + async GetCustomersCustomerSubscriptionsSubscriptionExposedId( + params: stripe.GetCustomersCustomerSubscriptionsSubscriptionExposedIdParams + ): Promise { + return this.ky + .get( + `/v1/customers/${params.customer}/subscriptions/${params.subscription_exposed_id}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

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 endpoint.

. + */ + @aiFunction({ + name: 'post_customers_customer_subscriptions_subscription_exposed_id', + description: + '

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 endpoint.

.', + inputSchema: + stripe.PostCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema + }) + async PostCustomersCustomerSubscriptionsSubscriptionExposedId( + params: stripe.PostCustomersCustomerSubscriptionsSubscriptionExposedIdParams + ): Promise { + return this.ky + .post( + `/v1/customers/${params.customer}/subscriptions/${params.subscription_exposed_id}` + ) + .json() + } + + /** + *

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. 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.

. + */ + @aiFunction({ + name: 'delete_customers_customer_subscriptions_subscription_exposed_id', + description: `

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. 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.

.`, + inputSchema: + stripe.DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParamsSchema + }) + async DeleteCustomersCustomerSubscriptionsSubscriptionExposedId( + params: stripe.DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParams + ): Promise { + return this.ky + .delete( + `/v1/customers/${params.customer}/subscriptions/${params.subscription_exposed_id}` + ) + .json() + } + + @aiFunction({ + name: 'get_customers_customer_subscriptions_subscription_exposed_id_discount', + + inputSchema: + stripe.GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParamsSchema + }) + async GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount( + params: stripe.GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParams + ): Promise { + return this.ky + .get( + `/v1/customers/${params.customer}/subscriptions/${params.subscription_exposed_id}/discount`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Removes the currently applied discount on a customer.

. + */ + @aiFunction({ + name: 'delete_customers_customer_subscriptions_subscription_exposed_id_discount', + description: + '

Removes the currently applied discount on a customer.

.', + inputSchema: + stripe.DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParamsSchema + }) + async DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount( + params: stripe.DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountParams + ): Promise { + return this.ky + .delete( + `/v1/customers/${params.customer}/subscriptions/${params.subscription_exposed_id}/discount` + ) + .json() + } + + /** + *

Returns a list of tax IDs for a customer.

. + */ + @aiFunction({ + name: 'get_customers_customer_tax_ids', + description: '

Returns a list of tax IDs for a customer.

.', + inputSchema: stripe.GetCustomersCustomerTaxIdsParamsSchema + }) + async GetCustomersCustomerTaxIds( + params: stripe.GetCustomersCustomerTaxIdsParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/tax_ids`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Creates a new tax_id object for a customer.

. + */ + @aiFunction({ + name: 'post_customers_customer_tax_ids', + description: + '

Creates a new tax_id object for a customer.

.', + inputSchema: stripe.PostCustomersCustomerTaxIdsParamsSchema + }) + async PostCustomersCustomerTaxIds( + params: stripe.PostCustomersCustomerTaxIdsParams + ): Promise { + return this.ky + .post(`/v1/customers/${params.customer}/tax_ids`) + .json() + } + + /** + *

Retrieves the tax_id object with the given identifier.

. + */ + @aiFunction({ + name: 'get_customers_customer_tax_ids_id', + description: + '

Retrieves the tax_id object with the given identifier.

.', + inputSchema: stripe.GetCustomersCustomerTaxIdsIdParamsSchema + }) + async GetCustomersCustomerTaxIdsId( + params: stripe.GetCustomersCustomerTaxIdsIdParams + ): Promise { + return this.ky + .get(`/v1/customers/${params.customer}/tax_ids/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Deletes an existing tax_id object.

. + */ + @aiFunction({ + name: 'delete_customers_customer_tax_ids_id', + description: '

Deletes an existing tax_id object.

.', + inputSchema: stripe.DeleteCustomersCustomerTaxIdsIdParamsSchema + }) + async DeleteCustomersCustomerTaxIdsId( + params: stripe.DeleteCustomersCustomerTaxIdsIdParams + ): Promise { + return this.ky + .delete(`/v1/customers/${params.customer}/tax_ids/${params.id}`) + .json() + } + + /** + *

Returns a list of your disputes.

. + */ + @aiFunction({ + name: 'get_disputes', + description: '

Returns a list of your disputes.

.', + inputSchema: stripe.GetDisputesParamsSchema + }) + async GetDisputes( + params: stripe.GetDisputesParams + ): Promise { + return this.ky + .get('/v1/disputes', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the dispute with the given ID.

. + */ + @aiFunction({ + name: 'get_disputes_dispute', + description: '

Retrieves the dispute with the given ID.

.', + inputSchema: stripe.GetDisputesDisputeParamsSchema + }) + async GetDisputesDispute( + params: stripe.GetDisputesDisputeParams + ): Promise { + return this.ky + .get(`/v1/disputes/${params.dispute}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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, 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.

. + */ + @aiFunction({ + name: 'post_disputes_dispute', + description: `

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, 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.

.`, + inputSchema: stripe.PostDisputesDisputeParamsSchema + }) + async PostDisputesDispute( + params: stripe.PostDisputesDisputeParams + ): Promise { + return this.ky + .post(`/v1/disputes/${params.dispute}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_disputes_dispute_close', + description: `

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.

.`, + inputSchema: stripe.PostDisputesDisputeCloseParamsSchema + }) + async PostDisputesDisputeClose( + params: stripe.PostDisputesDisputeCloseParams + ): Promise { + return this.ky + .post(`/v1/disputes/${params.dispute}/close`) + .json() + } + + /** + *

Retrieve a list of active entitlements for a customer

. + */ + @aiFunction({ + name: 'get_entitlements_active_entitlements', + description: + '

Retrieve a list of active entitlements for a customer

.', + inputSchema: stripe.GetEntitlementsActiveEntitlementsParamsSchema + }) + async GetEntitlementsActiveEntitlements( + params: stripe.GetEntitlementsActiveEntitlementsParams + ): Promise { + return this.ky + .get('/v1/entitlements/active_entitlements', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieve an active entitlement

. + */ + @aiFunction({ + name: 'get_entitlements_active_entitlements_id', + description: '

Retrieve an active entitlement

.', + inputSchema: stripe.GetEntitlementsActiveEntitlementsIdParamsSchema + }) + async GetEntitlementsActiveEntitlementsId( + params: stripe.GetEntitlementsActiveEntitlementsIdParams + ): Promise { + return this.ky + .get(`/v1/entitlements/active_entitlements/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieve a list of features

. + */ + @aiFunction({ + name: 'get_entitlements_features', + description: '

Retrieve a list of features

.', + inputSchema: stripe.GetEntitlementsFeaturesParamsSchema + }) + async GetEntitlementsFeatures( + params: stripe.GetEntitlementsFeaturesParams + ): Promise { + return this.ky + .get('/v1/entitlements/features', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a feature

. + */ + @aiFunction({ + name: 'post_entitlements_features', + description: '

Creates a feature

.', + inputSchema: stripe.PostEntitlementsFeaturesParamsSchema + }) + async PostEntitlementsFeatures( + _params: stripe.PostEntitlementsFeaturesParams + ): Promise { + return this.ky + .post('/v1/entitlements/features') + .json() + } + + /** + *

Retrieves a feature

. + */ + @aiFunction({ + name: 'get_entitlements_features_id', + description: '

Retrieves a feature

.', + inputSchema: stripe.GetEntitlementsFeaturesIdParamsSchema + }) + async GetEntitlementsFeaturesId( + params: stripe.GetEntitlementsFeaturesIdParams + ): Promise { + return this.ky + .get(`/v1/entitlements/features/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Update a feature’s metadata or permanently deactivate it.

. + */ + @aiFunction({ + name: 'post_entitlements_features_id', + description: + '

Update a feature’s metadata or permanently deactivate it.

.', + inputSchema: stripe.PostEntitlementsFeaturesIdParamsSchema + }) + async PostEntitlementsFeaturesId( + params: stripe.PostEntitlementsFeaturesIdParams + ): Promise { + return this.ky + .post(`/v1/entitlements/features/${params.id}`) + .json() + } + + /** + *

Creates a short-lived API key for a given resource.

. + */ + @aiFunction({ + name: 'post_ephemeral_keys', + description: '

Creates a short-lived API key for a given resource.

.', + inputSchema: stripe.PostEphemeralKeysParamsSchema + }) + async PostEphemeralKeys( + _params: stripe.PostEphemeralKeysParams + ): Promise { + return this.ky + .post('/v1/ephemeral_keys') + .json() + } + + /** + *

Invalidates a short-lived API key for a given resource.

. + */ + @aiFunction({ + name: 'delete_ephemeral_keys_key', + description: + '

Invalidates a short-lived API key for a given resource.

.', + inputSchema: stripe.DeleteEphemeralKeysKeyParamsSchema + }) + async DeleteEphemeralKeysKey( + params: stripe.DeleteEphemeralKeysKeyParams + ): Promise { + return this.ky + .delete(`/v1/ephemeral_keys/${params.key}`) + .json() + } + + /** + *

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 api_version attribute (not according to your current Stripe API version or Stripe-Version header).

. + */ + @aiFunction({ + name: 'get_events', + description: + '

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 api_version attribute (not according to your current Stripe API version or Stripe-Version header).

.', + inputSchema: stripe.GetEventsParamsSchema + }) + async GetEvents( + params: stripe.GetEventsParams + ): Promise { + return this.ky + .get('/v1/events', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_events_id', + description: + '

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.

.', + inputSchema: stripe.GetEventsIdParamsSchema + }) + async GetEventsId( + params: stripe.GetEventsIdParams + ): Promise { + return this.ky + .get(`/v1/events/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_exchange_rates', + description: + '

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.

.', + inputSchema: stripe.GetExchangeRatesParamsSchema + }) + async GetExchangeRates( + params: stripe.GetExchangeRatesParams + ): Promise { + return this.ky + .get('/v1/exchange_rates', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the exchange rates from the given currency to every supported currency.

. + */ + @aiFunction({ + name: 'get_exchange_rates_rate_id', + description: + '

Retrieves the exchange rates from the given currency to every supported currency.

.', + inputSchema: stripe.GetExchangeRatesRateIdParamsSchema + }) + async GetExchangeRatesRateId( + params: stripe.GetExchangeRatesRateIdParams + ): Promise { + return this.ky + .get(`/v1/exchange_rates/${params.rate_id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of file links.

. + */ + @aiFunction({ + name: 'get_file_links', + description: '

Returns a list of file links.

.', + inputSchema: stripe.GetFileLinksParamsSchema + }) + async GetFileLinks( + params: stripe.GetFileLinksParams + ): Promise { + return this.ky + .get('/v1/file_links', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new file link object.

. + */ + @aiFunction({ + name: 'post_file_links', + description: '

Creates a new file link object.

.', + inputSchema: stripe.PostFileLinksParamsSchema + }) + async PostFileLinks( + _params: stripe.PostFileLinksParams + ): Promise { + return this.ky.post('/v1/file_links').json() + } + + /** + *

Retrieves the file link with the given ID.

. + */ + @aiFunction({ + name: 'get_file_links_link', + description: '

Retrieves the file link with the given ID.

.', + inputSchema: stripe.GetFileLinksLinkParamsSchema + }) + async GetFileLinksLink( + params: stripe.GetFileLinksLinkParams + ): Promise { + return this.ky + .get(`/v1/file_links/${params.link}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing file link object. Expired links can no longer be updated.

. + */ + @aiFunction({ + name: 'post_file_links_link', + description: + '

Updates an existing file link object. Expired links can no longer be updated.

.', + inputSchema: stripe.PostFileLinksLinkParamsSchema + }) + async PostFileLinksLink( + params: stripe.PostFileLinksLinkParams + ): Promise { + return this.ky + .post(`/v1/file_links/${params.link}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_files', + description: + '

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.

.', + inputSchema: stripe.GetFilesParamsSchema + }) + async GetFiles( + params: stripe.GetFilesParams + ): Promise { + return this.ky + .get('/v1/files', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_files', + description: `

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.

.`, + inputSchema: stripe.PostFilesParamsSchema + }) + async PostFiles( + params: stripe.PostFilesParams + ): Promise { + return this.ky + .post('/v1/files', { + form: params + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_files_file', + description: + '

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.

.', + inputSchema: stripe.GetFilesFileParamsSchema + }) + async GetFilesFile( + params: stripe.GetFilesFileParams + ): Promise { + return this.ky + .get(`/v1/files/${params.file}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of Financial Connections Account objects.

. + */ + @aiFunction({ + name: 'get_financial_connections_accounts', + description: + '

Returns a list of Financial Connections Account objects.

.', + inputSchema: stripe.GetFinancialConnectionsAccountsParamsSchema + }) + async GetFinancialConnectionsAccounts( + params: stripe.GetFinancialConnectionsAccountsParams + ): Promise { + return this.ky + .get('/v1/financial_connections/accounts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an Financial Connections Account.

. + */ + @aiFunction({ + name: 'get_financial_connections_accounts_account', + description: + '

Retrieves the details of an Financial Connections Account.

.', + inputSchema: stripe.GetFinancialConnectionsAccountsAccountParamsSchema + }) + async GetFinancialConnectionsAccountsAccount( + params: stripe.GetFinancialConnectionsAccountsAccountParams + ): Promise { + return this.ky + .get(`/v1/financial_connections/accounts/${params.account}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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).

. + */ + @aiFunction({ + name: 'post_financial_connections_accounts_account_disconnect', + description: + '

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).

.', + inputSchema: + stripe.PostFinancialConnectionsAccountsAccountDisconnectParamsSchema + }) + async PostFinancialConnectionsAccountsAccountDisconnect( + params: stripe.PostFinancialConnectionsAccountsAccountDisconnectParams + ): Promise { + return this.ky + .post( + `/v1/financial_connections/accounts/${params.account}/disconnect` + ) + .json() + } + + /** + *

Lists all owners for a given Account

. + */ + @aiFunction({ + name: 'get_financial_connections_accounts_account_owners', + description: '

Lists all owners for a given Account

.', + inputSchema: stripe.GetFinancialConnectionsAccountsAccountOwnersParamsSchema + }) + async GetFinancialConnectionsAccountsAccountOwners( + params: stripe.GetFinancialConnectionsAccountsAccountOwnersParams + ): Promise { + return this.ky + .get(`/v1/financial_connections/accounts/${params.account}/owners`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'ending_before', + 'expand', + 'limit', + 'ownership', + 'starting_after' + ) + ) + }) + .json() + } + + /** + *

Refreshes the data associated with a Financial Connections Account.

. + */ + @aiFunction({ + name: 'post_financial_connections_accounts_account_refresh', + description: + '

Refreshes the data associated with a Financial Connections Account.

.', + inputSchema: + stripe.PostFinancialConnectionsAccountsAccountRefreshParamsSchema + }) + async PostFinancialConnectionsAccountsAccountRefresh( + params: stripe.PostFinancialConnectionsAccountsAccountRefreshParams + ): Promise { + return this.ky + .post(`/v1/financial_connections/accounts/${params.account}/refresh`) + .json() + } + + /** + *

Subscribes to periodic refreshes of data associated with a Financial Connections Account.

. + */ + @aiFunction({ + name: 'post_financial_connections_accounts_account_subscribe', + description: + '

Subscribes to periodic refreshes of data associated with a Financial Connections Account.

.', + inputSchema: + stripe.PostFinancialConnectionsAccountsAccountSubscribeParamsSchema + }) + async PostFinancialConnectionsAccountsAccountSubscribe( + params: stripe.PostFinancialConnectionsAccountsAccountSubscribeParams + ): Promise { + return this.ky + .post(`/v1/financial_connections/accounts/${params.account}/subscribe`) + .json() + } + + /** + *

Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.

. + */ + @aiFunction({ + name: 'post_financial_connections_accounts_account_unsubscribe', + description: + '

Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.

.', + inputSchema: + stripe.PostFinancialConnectionsAccountsAccountUnsubscribeParamsSchema + }) + async PostFinancialConnectionsAccountsAccountUnsubscribe( + params: stripe.PostFinancialConnectionsAccountsAccountUnsubscribeParams + ): Promise { + return this.ky + .post( + `/v1/financial_connections/accounts/${params.account}/unsubscribe` + ) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_financial_connections_sessions', + description: + '

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.

.', + inputSchema: stripe.PostFinancialConnectionsSessionsParamsSchema + }) + async PostFinancialConnectionsSessions( + _params: stripe.PostFinancialConnectionsSessionsParams + ): Promise { + return this.ky + .post('/v1/financial_connections/sessions') + .json() + } + + /** + *

Retrieves the details of a Financial Connections Session

. + */ + @aiFunction({ + name: 'get_financial_connections_sessions_session', + description: + '

Retrieves the details of a Financial Connections Session

.', + inputSchema: stripe.GetFinancialConnectionsSessionsSessionParamsSchema + }) + async GetFinancialConnectionsSessionsSession( + params: stripe.GetFinancialConnectionsSessionsSessionParams + ): Promise { + return this.ky + .get(`/v1/financial_connections/sessions/${params.session}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of Financial Connections Transaction objects.

. + */ + @aiFunction({ + name: 'get_financial_connections_transactions', + description: + '

Returns a list of Financial Connections Transaction objects.

.', + inputSchema: stripe.GetFinancialConnectionsTransactionsParamsSchema + }) + async GetFinancialConnectionsTransactions( + params: stripe.GetFinancialConnectionsTransactionsParams + ): Promise { + return this.ky + .get('/v1/financial_connections/transactions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of a Financial Connections Transaction

. + */ + @aiFunction({ + name: 'get_financial_connections_transactions_transaction', + description: + '

Retrieves the details of a Financial Connections Transaction

.', + inputSchema: + stripe.GetFinancialConnectionsTransactionsTransactionParamsSchema + }) + async GetFinancialConnectionsTransactionsTransaction( + params: stripe.GetFinancialConnectionsTransactionsTransactionParams + ): Promise { + return this.ky + .get(`/v1/financial_connections/transactions/${params.transaction}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Lists all ForwardingRequest objects.

. + */ + @aiFunction({ + name: 'get_forwarding_requests', + description: '

Lists all ForwardingRequest objects.

.', + inputSchema: stripe.GetForwardingRequestsParamsSchema + }) + async GetForwardingRequests( + params: stripe.GetForwardingRequestsParams + ): Promise { + return this.ky + .get('/v1/forwarding/requests', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a ForwardingRequest object.

. + */ + @aiFunction({ + name: 'post_forwarding_requests', + description: '

Creates a ForwardingRequest object.

.', + inputSchema: stripe.PostForwardingRequestsParamsSchema + }) + async PostForwardingRequests( + _params: stripe.PostForwardingRequestsParams + ): Promise { + return this.ky + .post('/v1/forwarding/requests') + .json() + } + + /** + *

Retrieves a ForwardingRequest object.

. + */ + @aiFunction({ + name: 'get_forwarding_requests_id', + description: '

Retrieves a ForwardingRequest object.

.', + inputSchema: stripe.GetForwardingRequestsIdParamsSchema + }) + async GetForwardingRequestsId( + params: stripe.GetForwardingRequestsIdParams + ): Promise { + return this.ky + .get(`/v1/forwarding/requests/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

List all verification reports.

. + */ + @aiFunction({ + name: 'get_identity_verification_reports', + description: '

List all verification reports.

.', + inputSchema: stripe.GetIdentityVerificationReportsParamsSchema + }) + async GetIdentityVerificationReports( + params: stripe.GetIdentityVerificationReportsParams + ): Promise { + return this.ky + .get('/v1/identity/verification_reports', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves an existing VerificationReport

. + */ + @aiFunction({ + name: 'get_identity_verification_reports_report', + description: '

Retrieves an existing VerificationReport

.', + inputSchema: stripe.GetIdentityVerificationReportsReportParamsSchema + }) + async GetIdentityVerificationReportsReport( + params: stripe.GetIdentityVerificationReportsReportParams + ): Promise { + return this.ky + .get(`/v1/identity/verification_reports/${params.report}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of VerificationSessions

. + */ + @aiFunction({ + name: 'get_identity_verification_sessions', + description: '

Returns a list of VerificationSessions

.', + inputSchema: stripe.GetIdentityVerificationSessionsParamsSchema + }) + async GetIdentityVerificationSessions( + params: stripe.GetIdentityVerificationSessionsParams + ): Promise { + return this.ky + .get('/v1/identity/verification_sessions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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

. + */ + @aiFunction({ + name: 'post_identity_verification_sessions', + description: `

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

.`, + inputSchema: stripe.PostIdentityVerificationSessionsParamsSchema + }) + async PostIdentityVerificationSessions( + _params: stripe.PostIdentityVerificationSessionsParams + ): Promise { + return this.ky + .post('/v1/identity/verification_sessions') + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_identity_verification_sessions_session', + description: `

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.

.`, + inputSchema: stripe.GetIdentityVerificationSessionsSessionParamsSchema + }) + async GetIdentityVerificationSessionsSession( + params: stripe.GetIdentityVerificationSessionsSessionParams + ): Promise { + return this.ky + .get(`/v1/identity/verification_sessions/${params.session}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a VerificationSession object.

+ +

When the session status is requires_input, you can use this method to update the +verification check and options.

. + */ + @aiFunction({ + name: 'post_identity_verification_sessions_session', + description: `

Updates a VerificationSession object.

+ +

When the session status is requires_input, you can use this method to update the +verification check and options.

.`, + inputSchema: stripe.PostIdentityVerificationSessionsSessionParamsSchema + }) + async PostIdentityVerificationSessionsSession( + params: stripe.PostIdentityVerificationSessionsSessionParams + ): Promise { + return this.ky + .post(`/v1/identity/verification_sessions/${params.session}`) + .json() + } + + /** + *

A VerificationSession object can be canceled when it is in requires_input status.

+ +

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

. + */ + @aiFunction({ + name: 'post_identity_verification_sessions_session_cancel', + description: `

A VerificationSession object can be canceled when it is in requires_input status.

+ +

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

.`, + inputSchema: + stripe.PostIdentityVerificationSessionsSessionCancelParamsSchema + }) + async PostIdentityVerificationSessionsSessionCancel( + params: stripe.PostIdentityVerificationSessionsSessionCancelParams + ): Promise { + return this.ky + .post(`/v1/identity/verification_sessions/${params.session}/cancel`) + .json() + } + + /** + *

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. 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.

. + */ + @aiFunction({ + name: 'post_identity_verification_sessions_session_redact', + description: `

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. 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.

.`, + inputSchema: + stripe.PostIdentityVerificationSessionsSessionRedactParamsSchema + }) + async PostIdentityVerificationSessionsSessionRedact( + params: stripe.PostIdentityVerificationSessionsSessionRedactParams + ): Promise { + return this.ky + .post(`/v1/identity/verification_sessions/${params.session}/redact`) + .json() + } + + /** + *

List all templates, ordered by creation date, with the most recently created template appearing first.

. + */ + @aiFunction({ + name: 'get_invoice_rendering_templates', + description: + '

List all templates, ordered by creation date, with the most recently created template appearing first.

.', + inputSchema: stripe.GetInvoiceRenderingTemplatesParamsSchema + }) + async GetInvoiceRenderingTemplates( + params: stripe.GetInvoiceRenderingTemplatesParams + ): Promise { + return this.ky + .get('/v1/invoice_rendering_templates', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_invoice_rendering_templates_template', + description: + '

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.

.', + inputSchema: stripe.GetInvoiceRenderingTemplatesTemplateParamsSchema + }) + async GetInvoiceRenderingTemplatesTemplate( + params: stripe.GetInvoiceRenderingTemplatesTemplateParams + ): Promise { + return this.ky + .get(`/v1/invoice_rendering_templates/${params.template}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand', 'version')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_invoice_rendering_templates_template_archive', + description: + '

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.

.', + inputSchema: stripe.PostInvoiceRenderingTemplatesTemplateArchiveParamsSchema + }) + async PostInvoiceRenderingTemplatesTemplateArchive( + params: stripe.PostInvoiceRenderingTemplatesTemplateArchiveParams + ): Promise { + return this.ky + .post(`/v1/invoice_rendering_templates/${params.template}/archive`) + .json() + } + + /** + *

Unarchive an invoice rendering template so it can be used on new Stripe objects again.

. + */ + @aiFunction({ + name: 'post_invoice_rendering_templates_template_unarchive', + description: + '

Unarchive an invoice rendering template so it can be used on new Stripe objects again.

.', + inputSchema: + stripe.PostInvoiceRenderingTemplatesTemplateUnarchiveParamsSchema + }) + async PostInvoiceRenderingTemplatesTemplateUnarchive( + params: stripe.PostInvoiceRenderingTemplatesTemplateUnarchiveParams + ): Promise { + return this.ky + .post(`/v1/invoice_rendering_templates/${params.template}/unarchive`) + .json() + } + + /** + *

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

. + */ + @aiFunction({ + name: 'get_invoiceitems', + description: + '

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

.', + inputSchema: stripe.GetInvoiceitemsParamsSchema + }) + async GetInvoiceitems( + params: stripe.GetInvoiceitemsParams + ): Promise { + return this.ky + .get('/v1/invoiceitems', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_invoiceitems', + description: + '

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.

.', + inputSchema: stripe.PostInvoiceitemsParamsSchema + }) + async PostInvoiceitems( + _params: stripe.PostInvoiceitemsParams + ): Promise { + return this.ky + .post('/v1/invoiceitems') + .json() + } + + /** + *

Retrieves the invoice item with the given ID.

. + */ + @aiFunction({ + name: 'get_invoiceitems_invoiceitem', + description: '

Retrieves the invoice item with the given ID.

.', + inputSchema: stripe.GetInvoiceitemsInvoiceitemParamsSchema + }) + async GetInvoiceitemsInvoiceitem( + params: stripe.GetInvoiceitemsInvoiceitemParams + ): Promise { + return this.ky + .get(`/v1/invoiceitems/${params.invoiceitem}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_invoiceitems_invoiceitem', + description: + '

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.

.', + inputSchema: stripe.PostInvoiceitemsInvoiceitemParamsSchema + }) + async PostInvoiceitemsInvoiceitem( + params: stripe.PostInvoiceitemsInvoiceitemParams + ): Promise { + return this.ky + .post(`/v1/invoiceitems/${params.invoiceitem}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'delete_invoiceitems_invoiceitem', + description: + '

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.

.', + inputSchema: stripe.DeleteInvoiceitemsInvoiceitemParamsSchema + }) + async DeleteInvoiceitemsInvoiceitem( + params: stripe.DeleteInvoiceitemsInvoiceitemParams + ): Promise { + return this.ky + .delete(`/v1/invoiceitems/${params.invoiceitem}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_invoices', + description: + '

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.

.', + inputSchema: stripe.GetInvoicesParamsSchema + }) + async GetInvoices( + params: stripe.GetInvoicesParams + ): Promise { + return this.ky + .get('/v1/invoices', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

. + */ + @aiFunction({ + name: 'post_invoices', + description: + '

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

.', + inputSchema: stripe.PostInvoicesParamsSchema + }) + async PostInvoices( + _params: stripe.PostInvoicesParams + ): Promise { + return this.ky.post('/v1/invoices').json() + } + + /** + *

At any time, you can preview the upcoming invoice for a customer. 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.

+ +

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.

+ +

You can preview the effects of updating a subscription, including a preview of what proration 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 is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.

+ +

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

. + */ + @aiFunction({ + name: 'post_invoices_create_preview', + description: `

At any time, you can preview the upcoming invoice for a customer. 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.

+ +

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.

+ +

You can preview the effects of updating a subscription, including a preview of what proration 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 is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.

+ +

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

.`, + inputSchema: stripe.PostInvoicesCreatePreviewParamsSchema + }) + async PostInvoicesCreatePreview( + _params: stripe.PostInvoicesCreatePreviewParams + ): Promise { + return this.ky + .post('/v1/invoices/create_preview') + .json() + } + + /** + *

Search for invoices you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_invoices_search', + description: `

Search for invoices you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetInvoicesSearchParamsSchema + }) + async GetInvoicesSearch( + params: stripe.GetInvoicesSearchParams + ): Promise { + return this.ky + .get('/v1/invoices/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

At any time, you can preview the upcoming invoice for a customer. 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.

+ +

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.

+ +

You can preview the effects of updating a subscription, including a preview of what proration 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 is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.

+ +

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

. + */ + @aiFunction({ + name: 'get_invoices_upcoming', + description: `

At any time, you can preview the upcoming invoice for a customer. 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.

+ +

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.

+ +

You can preview the effects of updating a subscription, including a preview of what proration 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 is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.

+ +

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

.`, + inputSchema: stripe.GetInvoicesUpcomingParamsSchema + }) + async GetInvoicesUpcoming( + params: stripe.GetInvoicesUpcomingParams + ): Promise { + return this.ky + .get('/v1/invoices/upcoming', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

When retrieving an upcoming 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.

. + */ + @aiFunction({ + name: 'get_invoices_upcoming_lines', + description: + '

When retrieving an upcoming 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.

.', + inputSchema: stripe.GetInvoicesUpcomingLinesParamsSchema + }) + async GetInvoicesUpcomingLines( + params: stripe.GetInvoicesUpcomingLinesParams + ): Promise { + return this.ky + .get('/v1/invoices/upcoming/lines', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the invoice with the given ID.

. + */ + @aiFunction({ + name: 'get_invoices_invoice', + description: '

Retrieves the invoice with the given ID.

.', + inputSchema: stripe.GetInvoicesInvoiceParamsSchema + }) + async GetInvoicesInvoice( + params: stripe.GetInvoicesInvoiceParams + ): Promise { + return this.ky + .get(`/v1/invoices/${params.invoice}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Draft invoices are fully editable. Once an invoice is 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 invoices, pass +auto_advance=false.

. + */ + @aiFunction({ + name: 'post_invoices_invoice', + description: `

Draft invoices are fully editable. Once an invoice is 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 invoices, pass +auto_advance=false.

.`, + inputSchema: stripe.PostInvoicesInvoiceParamsSchema + }) + async PostInvoicesInvoice( + params: stripe.PostInvoicesInvoiceParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'delete_invoices_invoice', + description: + '

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.

.', + inputSchema: stripe.DeleteInvoicesInvoiceParamsSchema + }) + async DeleteInvoicesInvoice( + params: stripe.DeleteInvoicesInvoiceParams + ): Promise { + return this.ky + .delete(`/v1/invoices/${params.invoice}`) + .json() + } + + /** + *

Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_add_lines', + description: + '

Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.

.', + inputSchema: stripe.PostInvoicesInvoiceAddLinesParamsSchema + }) + async PostInvoicesInvoiceAddLines( + params: stripe.PostInvoicesInvoiceAddLinesParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/add_lines`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_finalize', + description: + '

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.

.', + inputSchema: stripe.PostInvoicesInvoiceFinalizeParamsSchema + }) + async PostInvoicesInvoiceFinalize( + params: stripe.PostInvoicesInvoiceFinalizeParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/finalize`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_invoices_invoice_lines', + description: + '

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.

.', + inputSchema: stripe.GetInvoicesInvoiceLinesParamsSchema + }) + async GetInvoicesInvoiceLines( + params: stripe.GetInvoicesInvoiceLinesParams + ): Promise { + return this.ky + .get(`/v1/invoices/${params.invoice}/lines`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_lines_line_item_id', + description: `

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.

.`, + inputSchema: stripe.PostInvoicesInvoiceLinesLineItemIdParamsSchema + }) + async PostInvoicesInvoiceLinesLineItemId( + params: stripe.PostInvoicesInvoiceLinesLineItemIdParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/lines/${params.line_item_id}`) + .json() + } + + /** + *

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_mark_uncollectible', + description: + '

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

.', + inputSchema: stripe.PostInvoicesInvoiceMarkUncollectibleParamsSchema + }) + async PostInvoicesInvoiceMarkUncollectible( + params: stripe.PostInvoicesInvoiceMarkUncollectibleParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/mark_uncollectible`) + .json() + } + + /** + *

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. 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.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_pay', + description: + '

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. 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.

.', + inputSchema: stripe.PostInvoicesInvoicePayParamsSchema + }) + async PostInvoicesInvoicePay( + params: stripe.PostInvoicesInvoicePayParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/pay`) + .json() + } + + /** + *

Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_remove_lines', + description: + '

Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.

.', + inputSchema: stripe.PostInvoicesInvoiceRemoveLinesParamsSchema + }) + async PostInvoicesInvoiceRemoveLines( + params: stripe.PostInvoicesInvoiceRemoveLinesParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/remove_lines`) + .json() + } + + /** + *

Stripe will automatically send invoices to customers according to your subscriptions settings. 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.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_send', + description: `

Stripe will automatically send invoices to customers according to your subscriptions settings. 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.

.`, + inputSchema: stripe.PostInvoicesInvoiceSendParamsSchema + }) + async PostInvoicesInvoiceSend( + params: stripe.PostInvoicesInvoiceSendParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/send`) + .json() + } + + /** + *

Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_update_lines', + description: + '

Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.

.', + inputSchema: stripe.PostInvoicesInvoiceUpdateLinesParamsSchema + }) + async PostInvoicesInvoiceUpdateLines( + params: stripe.PostInvoicesInvoiceUpdateLinesParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/update_lines`) + .json() + } + + /** + *

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, 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 or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.

. + */ + @aiFunction({ + name: 'post_invoices_invoice_void', + description: `

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, 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 or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.

.`, + inputSchema: stripe.PostInvoicesInvoiceVoidParamsSchema + }) + async PostInvoicesInvoiceVoid( + params: stripe.PostInvoicesInvoiceVoidParams + ): Promise { + return this.ky + .post(`/v1/invoices/${params.invoice}/void`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_authorizations', + description: + '

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.

.', + inputSchema: stripe.GetIssuingAuthorizationsParamsSchema + }) + async GetIssuingAuthorizations( + params: stripe.GetIssuingAuthorizationsParams + ): Promise { + return this.ky + .get('/v1/issuing/authorizations', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves an Issuing Authorization object.

. + */ + @aiFunction({ + name: 'get_issuing_authorizations_authorization', + description: + '

Retrieves an Issuing Authorization object.

.', + inputSchema: stripe.GetIssuingAuthorizationsAuthorizationParamsSchema + }) + async GetIssuingAuthorizationsAuthorization( + params: stripe.GetIssuingAuthorizationsAuthorizationParams + ): Promise { + return this.ky + .get(`/v1/issuing/authorizations/${params.authorization}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_issuing_authorizations_authorization', + description: + '

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostIssuingAuthorizationsAuthorizationParamsSchema + }) + async PostIssuingAuthorizationsAuthorization( + params: stripe.PostIssuingAuthorizationsAuthorizationParams + ): Promise { + return this.ky + .post(`/v1/issuing/authorizations/${params.authorization}`) + .json() + } + + /** + *

[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow. +This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.

. + */ + @aiFunction({ + name: 'post_issuing_authorizations_authorization_approve', + description: `

[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow. +This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.

.`, + inputSchema: + stripe.PostIssuingAuthorizationsAuthorizationApproveParamsSchema + }) + async PostIssuingAuthorizationsAuthorizationApprove( + params: stripe.PostIssuingAuthorizationsAuthorizationApproveParams + ): Promise { + return this.ky + .post(`/v1/issuing/authorizations/${params.authorization}/approve`) + .json() + } + + /** + *

[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow. +This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.

. + */ + @aiFunction({ + name: 'post_issuing_authorizations_authorization_decline', + description: `

[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow. +This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.

.`, + inputSchema: + stripe.PostIssuingAuthorizationsAuthorizationDeclineParamsSchema + }) + async PostIssuingAuthorizationsAuthorizationDecline( + params: stripe.PostIssuingAuthorizationsAuthorizationDeclineParams + ): Promise { + return this.ky + .post(`/v1/issuing/authorizations/${params.authorization}/decline`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_cardholders', + description: + '

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.

.', + inputSchema: stripe.GetIssuingCardholdersParamsSchema + }) + async GetIssuingCardholders( + params: stripe.GetIssuingCardholdersParams + ): Promise { + return this.ky + .get('/v1/issuing/cardholders', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new Issuing Cardholder object that can be issued cards.

. + */ + @aiFunction({ + name: 'post_issuing_cardholders', + description: + '

Creates a new Issuing Cardholder object that can be issued cards.

.', + inputSchema: stripe.PostIssuingCardholdersParamsSchema + }) + async PostIssuingCardholders( + _params: stripe.PostIssuingCardholdersParams + ): Promise { + return this.ky + .post('/v1/issuing/cardholders') + .json() + } + + /** + *

Retrieves an Issuing Cardholder object.

. + */ + @aiFunction({ + name: 'get_issuing_cardholders_cardholder', + description: '

Retrieves an Issuing Cardholder object.

.', + inputSchema: stripe.GetIssuingCardholdersCardholderParamsSchema + }) + async GetIssuingCardholdersCardholder( + params: stripe.GetIssuingCardholdersCardholderParams + ): Promise { + return this.ky + .get(`/v1/issuing/cardholders/${params.cardholder}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_issuing_cardholders_cardholder', + description: + '

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostIssuingCardholdersCardholderParamsSchema + }) + async PostIssuingCardholdersCardholder( + params: stripe.PostIssuingCardholdersCardholderParams + ): Promise { + return this.ky + .post(`/v1/issuing/cardholders/${params.cardholder}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_cards', + description: + '

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.

.', + inputSchema: stripe.GetIssuingCardsParamsSchema + }) + async GetIssuingCards( + params: stripe.GetIssuingCardsParams + ): Promise { + return this.ky + .get('/v1/issuing/cards', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates an Issuing Card object.

. + */ + @aiFunction({ + name: 'post_issuing_cards', + description: '

Creates an Issuing Card object.

.', + inputSchema: stripe.PostIssuingCardsParamsSchema + }) + async PostIssuingCards( + _params: stripe.PostIssuingCardsParams + ): Promise { + return this.ky + .post('/v1/issuing/cards') + .json() + } + + /** + *

Retrieves an Issuing Card object.

. + */ + @aiFunction({ + name: 'get_issuing_cards_card', + description: '

Retrieves an Issuing Card object.

.', + inputSchema: stripe.GetIssuingCardsCardParamsSchema + }) + async GetIssuingCardsCard( + params: stripe.GetIssuingCardsCardParams + ): Promise { + return this.ky + .get(`/v1/issuing/cards/${params.card}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_issuing_cards_card', + description: + '

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostIssuingCardsCardParamsSchema + }) + async PostIssuingCardsCard( + params: stripe.PostIssuingCardsCardParams + ): Promise { + return this.ky + .post(`/v1/issuing/cards/${params.card}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_disputes', + description: + '

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.

.', + inputSchema: stripe.GetIssuingDisputesParamsSchema + }) + async GetIssuingDisputes( + params: stripe.GetIssuingDisputesParams + ): Promise { + return this.ky + .get('/v1/issuing/disputes', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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 for more details about evidence requirements.

. + */ + @aiFunction({ + name: 'post_issuing_disputes', + description: + '

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 for more details about evidence requirements.

.', + inputSchema: stripe.PostIssuingDisputesParamsSchema + }) + async PostIssuingDisputes( + _params: stripe.PostIssuingDisputesParams + ): Promise { + return this.ky + .post('/v1/issuing/disputes') + .json() + } + + /** + *

Retrieves an Issuing Dispute object.

. + */ + @aiFunction({ + name: 'get_issuing_disputes_dispute', + description: '

Retrieves an Issuing Dispute object.

.', + inputSchema: stripe.GetIssuingDisputesDisputeParamsSchema + }) + async GetIssuingDisputesDispute( + params: stripe.GetIssuingDisputesDisputeParams + ): Promise { + return this.ky + .get(`/v1/issuing/disputes/${params.dispute}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_issuing_disputes_dispute', + description: + '

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.

.', + inputSchema: stripe.PostIssuingDisputesDisputeParamsSchema + }) + async PostIssuingDisputesDispute( + params: stripe.PostIssuingDisputesDisputeParams + ): Promise { + return this.ky + .post(`/v1/issuing/disputes/${params.dispute}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_issuing_disputes_dispute_submit', + description: + '

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.

.', + inputSchema: stripe.PostIssuingDisputesDisputeSubmitParamsSchema + }) + async PostIssuingDisputesDisputeSubmit( + params: stripe.PostIssuingDisputesDisputeSubmitParams + ): Promise { + return this.ky + .post(`/v1/issuing/disputes/${params.dispute}/submit`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_personalization_designs', + description: + '

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.

.', + inputSchema: stripe.GetIssuingPersonalizationDesignsParamsSchema + }) + async GetIssuingPersonalizationDesigns( + params: stripe.GetIssuingPersonalizationDesignsParams + ): Promise { + return this.ky + .get('/v1/issuing/personalization_designs', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a personalization design object.

. + */ + @aiFunction({ + name: 'post_issuing_personalization_designs', + description: '

Creates a personalization design object.

.', + inputSchema: stripe.PostIssuingPersonalizationDesignsParamsSchema + }) + async PostIssuingPersonalizationDesigns( + _params: stripe.PostIssuingPersonalizationDesignsParams + ): Promise { + return this.ky + .post('/v1/issuing/personalization_designs') + .json() + } + + /** + *

Retrieves a personalization design object.

. + */ + @aiFunction({ + name: 'get_issuing_personalization_designs_personalization_design', + description: '

Retrieves a personalization design object.

.', + inputSchema: + stripe.GetIssuingPersonalizationDesignsPersonalizationDesignParamsSchema + }) + async GetIssuingPersonalizationDesignsPersonalizationDesign( + params: stripe.GetIssuingPersonalizationDesignsPersonalizationDesignParams + ): Promise { + return this.ky + .get( + `/v1/issuing/personalization_designs/${params.personalization_design}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Updates a card personalization object.

. + */ + @aiFunction({ + name: 'post_issuing_personalization_designs_personalization_design', + description: '

Updates a card personalization object.

.', + inputSchema: + stripe.PostIssuingPersonalizationDesignsPersonalizationDesignParamsSchema + }) + async PostIssuingPersonalizationDesignsPersonalizationDesign( + params: stripe.PostIssuingPersonalizationDesignsPersonalizationDesignParams + ): Promise { + return this.ky + .post( + `/v1/issuing/personalization_designs/${params.personalization_design}` + ) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_physical_bundles', + description: + '

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.

.', + inputSchema: stripe.GetIssuingPhysicalBundlesParamsSchema + }) + async GetIssuingPhysicalBundles( + params: stripe.GetIssuingPhysicalBundlesParams + ): Promise { + return this.ky + .get('/v1/issuing/physical_bundles', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves a physical bundle object.

. + */ + @aiFunction({ + name: 'get_issuing_physical_bundles_physical_bundle', + description: '

Retrieves a physical bundle object.

.', + inputSchema: stripe.GetIssuingPhysicalBundlesPhysicalBundleParamsSchema + }) + async GetIssuingPhysicalBundlesPhysicalBundle( + params: stripe.GetIssuingPhysicalBundlesPhysicalBundleParams + ): Promise { + return this.ky + .get(`/v1/issuing/physical_bundles/${params.physical_bundle}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves an Issuing Settlement object.

. + */ + @aiFunction({ + name: 'get_issuing_settlements_settlement', + description: '

Retrieves an Issuing Settlement object.

.', + inputSchema: stripe.GetIssuingSettlementsSettlementParamsSchema + }) + async GetIssuingSettlementsSettlement( + params: stripe.GetIssuingSettlementsSettlementParams + ): Promise { + return this.ky + .get(`/v1/issuing/settlements/${params.settlement}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_issuing_settlements_settlement', + description: + '

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostIssuingSettlementsSettlementParamsSchema + }) + async PostIssuingSettlementsSettlement( + params: stripe.PostIssuingSettlementsSettlementParams + ): Promise { + return this.ky + .post(`/v1/issuing/settlements/${params.settlement}`) + .json() + } + + /** + *

Lists all Issuing Token objects for a given card.

. + */ + @aiFunction({ + name: 'get_issuing_tokens', + description: + '

Lists all Issuing Token objects for a given card.

.', + inputSchema: stripe.GetIssuingTokensParamsSchema + }) + async GetIssuingTokens( + params: stripe.GetIssuingTokensParams + ): Promise { + return this.ky + .get('/v1/issuing/tokens', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves an Issuing Token object.

. + */ + @aiFunction({ + name: 'get_issuing_tokens_token', + description: '

Retrieves an Issuing Token object.

.', + inputSchema: stripe.GetIssuingTokensTokenParamsSchema + }) + async GetIssuingTokensToken( + params: stripe.GetIssuingTokensTokenParams + ): Promise { + return this.ky + .get(`/v1/issuing/tokens/${params.token}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Attempts to update the specified Issuing Token object to the status specified.

. + */ + @aiFunction({ + name: 'post_issuing_tokens_token', + description: + '

Attempts to update the specified Issuing Token object to the status specified.

.', + inputSchema: stripe.PostIssuingTokensTokenParamsSchema + }) + async PostIssuingTokensToken( + params: stripe.PostIssuingTokensTokenParams + ): Promise { + return this.ky + .post(`/v1/issuing/tokens/${params.token}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_issuing_transactions', + description: + '

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.

.', + inputSchema: stripe.GetIssuingTransactionsParamsSchema + }) + async GetIssuingTransactions( + params: stripe.GetIssuingTransactionsParams + ): Promise { + return this.ky + .get('/v1/issuing/transactions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves an Issuing Transaction object.

. + */ + @aiFunction({ + name: 'get_issuing_transactions_transaction', + description: + '

Retrieves an Issuing Transaction object.

.', + inputSchema: stripe.GetIssuingTransactionsTransactionParamsSchema + }) + async GetIssuingTransactionsTransaction( + params: stripe.GetIssuingTransactionsTransactionParams + ): Promise { + return this.ky + .get(`/v1/issuing/transactions/${params.transaction}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_issuing_transactions_transaction', + description: + '

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostIssuingTransactionsTransactionParamsSchema + }) + async PostIssuingTransactionsTransaction( + params: stripe.PostIssuingTransactionsTransactionParams + ): Promise { + return this.ky + .post(`/v1/issuing/transactions/${params.transaction}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_link_account_sessions', + description: + '

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.

.', + inputSchema: stripe.PostLinkAccountSessionsParamsSchema + }) + async PostLinkAccountSessions( + _params: stripe.PostLinkAccountSessionsParams + ): Promise { + return this.ky + .post('/v1/link_account_sessions') + .json() + } + + /** + *

Retrieves the details of a Financial Connections Session

. + */ + @aiFunction({ + name: 'get_link_account_sessions_session', + description: + '

Retrieves the details of a Financial Connections Session

.', + inputSchema: stripe.GetLinkAccountSessionsSessionParamsSchema + }) + async GetLinkAccountSessionsSession( + params: stripe.GetLinkAccountSessionsSessionParams + ): Promise { + return this.ky + .get(`/v1/link_account_sessions/${params.session}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of Financial Connections Account objects.

. + */ + @aiFunction({ + name: 'get_linked_accounts', + description: + '

Returns a list of Financial Connections Account objects.

.', + inputSchema: stripe.GetLinkedAccountsParamsSchema + }) + async GetLinkedAccounts( + params: stripe.GetLinkedAccountsParams + ): Promise { + return this.ky + .get('/v1/linked_accounts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an Financial Connections Account.

. + */ + @aiFunction({ + name: 'get_linked_accounts_account', + description: + '

Retrieves the details of an Financial Connections Account.

.', + inputSchema: stripe.GetLinkedAccountsAccountParamsSchema + }) + async GetLinkedAccountsAccount( + params: stripe.GetLinkedAccountsAccountParams + ): Promise { + return this.ky + .get(`/v1/linked_accounts/${params.account}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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).

. + */ + @aiFunction({ + name: 'post_linked_accounts_account_disconnect', + description: + '

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).

.', + inputSchema: stripe.PostLinkedAccountsAccountDisconnectParamsSchema + }) + async PostLinkedAccountsAccountDisconnect( + params: stripe.PostLinkedAccountsAccountDisconnectParams + ): Promise { + return this.ky + .post(`/v1/linked_accounts/${params.account}/disconnect`) + .json() + } + + /** + *

Lists all owners for a given Account

. + */ + @aiFunction({ + name: 'get_linked_accounts_account_owners', + description: '

Lists all owners for a given Account

.', + inputSchema: stripe.GetLinkedAccountsAccountOwnersParamsSchema + }) + async GetLinkedAccountsAccountOwners( + params: stripe.GetLinkedAccountsAccountOwnersParams + ): Promise { + return this.ky + .get(`/v1/linked_accounts/${params.account}/owners`, { + searchParams: sanitizeSearchParams( + pick( + params, + 'ending_before', + 'expand', + 'limit', + 'ownership', + 'starting_after' + ) + ) + }) + .json() + } + + /** + *

Refreshes the data associated with a Financial Connections Account.

. + */ + @aiFunction({ + name: 'post_linked_accounts_account_refresh', + description: + '

Refreshes the data associated with a Financial Connections Account.

.', + inputSchema: stripe.PostLinkedAccountsAccountRefreshParamsSchema + }) + async PostLinkedAccountsAccountRefresh( + params: stripe.PostLinkedAccountsAccountRefreshParams + ): Promise { + return this.ky + .post(`/v1/linked_accounts/${params.account}/refresh`) + .json() + } + + /** + *

Retrieves a Mandate object.

. + */ + @aiFunction({ + name: 'get_mandates_mandate', + description: '

Retrieves a Mandate object.

.', + inputSchema: stripe.GetMandatesMandateParamsSchema + }) + async GetMandatesMandate( + params: stripe.GetMandatesMandateParams + ): Promise { + return this.ky + .get(`/v1/mandates/${params.mandate}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of PaymentIntents.

. + */ + @aiFunction({ + name: 'get_payment_intents', + description: '

Returns a list of PaymentIntents.

.', + inputSchema: stripe.GetPaymentIntentsParamsSchema + }) + async GetPaymentIntents( + params: stripe.GetPaymentIntentsParams + ): Promise { + return this.ky + .get('/v1/payment_intents', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a PaymentIntent object.

+ +

After the PaymentIntent is created, attach a payment method and 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 when you supply +confirm=true.

. + */ + @aiFunction({ + name: 'post_payment_intents', + description: `

Creates a PaymentIntent object.

+ +

After the PaymentIntent is created, attach a payment method and 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 when you supply +confirm=true.

.`, + inputSchema: stripe.PostPaymentIntentsParamsSchema + }) + async PostPaymentIntents( + _params: stripe.PostPaymentIntentsParams + ): Promise { + return this.ky + .post('/v1/payment_intents') + .json() + } + + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_payment_intents_search', + description: `

Search for PaymentIntents you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetPaymentIntentsSearchParamsSchema + }) + async GetPaymentIntentsSearch( + params: stripe.GetPaymentIntentsSearchParams + ): Promise { + return this.ky + .get('/v1/payment_intents/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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 object reference for more details.

. + */ + @aiFunction({ + name: 'get_payment_intents_intent', + description: `

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 object reference for more details.

.`, + inputSchema: stripe.GetPaymentIntentsIntentParamsSchema + }) + async GetPaymentIntentsIntent( + params: stripe.GetPaymentIntentsIntentParams + ): Promise { + return this.ky + .get(`/v1/payment_intents/${params.intent}`, { + searchParams: sanitizeSearchParams( + pick(params, 'client_secret', 'expand') + ) + }) + .json() + } + + /** + *

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 instead.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent', + description: `

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 instead.

.`, + inputSchema: stripe.PostPaymentIntentsIntentParamsSchema + }) + async PostPaymentIntentsIntent( + params: stripe.PostPaymentIntentsIntentParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}`) + .json() + } + + /** + *

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent_apply_customer_balance', + description: + '

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

.', + inputSchema: stripe.PostPaymentIntentsIntentApplyCustomerBalanceParamsSchema + }) + async PostPaymentIntentsIntentApplyCustomerBalance( + params: stripe.PostPaymentIntentsIntentApplyCustomerBalanceParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}/apply_customer_balance`) + .json() + } + + /** + *

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, 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 instead.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent_cancel', + description: `

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, 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 instead.

.`, + inputSchema: stripe.PostPaymentIntentsIntentCancelParamsSchema + }) + async PostPaymentIntentsIntentCancel( + params: stripe.PostPaymentIntentsIntentCancelParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}/cancel`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent_capture', + description: `

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.

.`, + inputSchema: stripe.PostPaymentIntentsIntentCaptureParamsSchema + }) + async PostPaymentIntentsIntentCapture( + params: stripe.PostPaymentIntentsIntentCaptureParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}/capture`) + .json() + } + + /** + *

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 +and the PaymentIntent’s client_secret. +After next_actions 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.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent_confirm', + description: `

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 +and the PaymentIntent’s client_secret. +After next_actions 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.

.`, + inputSchema: stripe.PostPaymentIntentsIntentConfirmParamsSchema + }) + async PostPaymentIntentsIntentConfirm( + params: stripe.PostPaymentIntentsIntentConfirmParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}/confirm`) + .json() + } + + /** + *

Perform an incremental authorization on an eligible +PaymentIntent. To be eligible, the +PaymentIntent’s status must be requires_capture and +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. +If the incremental authorization fails, a +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.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent_increment_authorization', + description: `

Perform an incremental authorization on an eligible +PaymentIntent. To be eligible, the +PaymentIntent’s status must be requires_capture and +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. +If the incremental authorization fails, a +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.

.`, + inputSchema: + stripe.PostPaymentIntentsIntentIncrementAuthorizationParamsSchema + }) + async PostPaymentIntentsIntentIncrementAuthorization( + params: stripe.PostPaymentIntentsIntentIncrementAuthorizationParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}/increment_authorization`) + .json() + } + + /** + *

Verifies microdeposits on a PaymentIntent object.

. + */ + @aiFunction({ + name: 'post_payment_intents_intent_verify_microdeposits', + description: '

Verifies microdeposits on a PaymentIntent object.

.', + inputSchema: stripe.PostPaymentIntentsIntentVerifyMicrodepositsParamsSchema + }) + async PostPaymentIntentsIntentVerifyMicrodeposits( + params: stripe.PostPaymentIntentsIntentVerifyMicrodepositsParams + ): Promise { + return this.ky + .post(`/v1/payment_intents/${params.intent}/verify_microdeposits`) + .json() + } + + /** + *

Returns a list of your payment links.

. + */ + @aiFunction({ + name: 'get_payment_links', + description: '

Returns a list of your payment links.

.', + inputSchema: stripe.GetPaymentLinksParamsSchema + }) + async GetPaymentLinks( + params: stripe.GetPaymentLinksParams + ): Promise { + return this.ky + .get('/v1/payment_links', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a payment link.

. + */ + @aiFunction({ + name: 'post_payment_links', + description: '

Creates a payment link.

.', + inputSchema: stripe.PostPaymentLinksParamsSchema + }) + async PostPaymentLinks( + _params: stripe.PostPaymentLinksParams + ): Promise { + return this.ky + .post('/v1/payment_links') + .json() + } + + /** + *

Retrieve a payment link.

. + */ + @aiFunction({ + name: 'get_payment_links_payment_link', + description: '

Retrieve a payment link.

.', + inputSchema: stripe.GetPaymentLinksPaymentLinkParamsSchema + }) + async GetPaymentLinksPaymentLink( + params: stripe.GetPaymentLinksPaymentLinkParams + ): Promise { + return this.ky + .get(`/v1/payment_links/${params.payment_link}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a payment link.

. + */ + @aiFunction({ + name: 'post_payment_links_payment_link', + description: '

Updates a payment link.

.', + inputSchema: stripe.PostPaymentLinksPaymentLinkParamsSchema + }) + async PostPaymentLinksPaymentLink( + params: stripe.PostPaymentLinksPaymentLinkParams + ): Promise { + return this.ky + .post(`/v1/payment_links/${params.payment_link}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_payment_links_payment_link_line_items', + description: + '

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.

.', + inputSchema: stripe.GetPaymentLinksPaymentLinkLineItemsParamsSchema + }) + async GetPaymentLinksPaymentLinkLineItems( + params: stripe.GetPaymentLinksPaymentLinkLineItemsParams + ): Promise { + return this.ky + .get(`/v1/payment_links/${params.payment_link}/line_items`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

List payment method configurations

. + */ + @aiFunction({ + name: 'get_payment_method_configurations', + description: '

List payment method configurations

.', + inputSchema: stripe.GetPaymentMethodConfigurationsParamsSchema + }) + async GetPaymentMethodConfigurations( + params: stripe.GetPaymentMethodConfigurationsParams + ): Promise { + return this.ky + .get('/v1/payment_method_configurations', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a payment method configuration

. + */ + @aiFunction({ + name: 'post_payment_method_configurations', + description: '

Creates a payment method configuration

.', + inputSchema: stripe.PostPaymentMethodConfigurationsParamsSchema + }) + async PostPaymentMethodConfigurations( + _params: stripe.PostPaymentMethodConfigurationsParams + ): Promise { + return this.ky + .post('/v1/payment_method_configurations') + .json() + } + + /** + *

Retrieve payment method configuration

. + */ + @aiFunction({ + name: 'get_payment_method_configurations_configuration', + description: '

Retrieve payment method configuration

.', + inputSchema: stripe.GetPaymentMethodConfigurationsConfigurationParamsSchema + }) + async GetPaymentMethodConfigurationsConfiguration( + params: stripe.GetPaymentMethodConfigurationsConfigurationParams + ): Promise { + return this.ky + .get(`/v1/payment_method_configurations/${params.configuration}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Update payment method configuration

. + */ + @aiFunction({ + name: 'post_payment_method_configurations_configuration', + description: '

Update payment method configuration

.', + inputSchema: stripe.PostPaymentMethodConfigurationsConfigurationParamsSchema + }) + async PostPaymentMethodConfigurationsConfiguration( + params: stripe.PostPaymentMethodConfigurationsConfigurationParams + ): Promise { + return this.ky + .post(`/v1/payment_method_configurations/${params.configuration}`) + .json() + } + + /** + *

Lists the details of existing payment method domains.

. + */ + @aiFunction({ + name: 'get_payment_method_domains', + description: + '

Lists the details of existing payment method domains.

.', + inputSchema: stripe.GetPaymentMethodDomainsParamsSchema + }) + async GetPaymentMethodDomains( + params: stripe.GetPaymentMethodDomainsParams + ): Promise { + return this.ky + .get('/v1/payment_method_domains', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a payment method domain.

. + */ + @aiFunction({ + name: 'post_payment_method_domains', + description: '

Creates a payment method domain.

.', + inputSchema: stripe.PostPaymentMethodDomainsParamsSchema + }) + async PostPaymentMethodDomains( + _params: stripe.PostPaymentMethodDomainsParams + ): Promise { + return this.ky + .post('/v1/payment_method_domains') + .json() + } + + /** + *

Retrieves the details of an existing payment method domain.

. + */ + @aiFunction({ + name: 'get_payment_method_domains_payment_method_domain', + description: + '

Retrieves the details of an existing payment method domain.

.', + inputSchema: stripe.GetPaymentMethodDomainsPaymentMethodDomainParamsSchema + }) + async GetPaymentMethodDomainsPaymentMethodDomain( + params: stripe.GetPaymentMethodDomainsPaymentMethodDomainParams + ): Promise { + return this.ky + .get(`/v1/payment_method_domains/${params.payment_method_domain}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing payment method domain.

. + */ + @aiFunction({ + name: 'post_payment_method_domains_payment_method_domain', + description: '

Updates an existing payment method domain.

.', + inputSchema: stripe.PostPaymentMethodDomainsPaymentMethodDomainParamsSchema + }) + async PostPaymentMethodDomainsPaymentMethodDomain( + params: stripe.PostPaymentMethodDomainsPaymentMethodDomainParams + ): Promise { + return this.ky + .post(`/v1/payment_method_domains/${params.payment_method_domain}`) + .json() + } + + /** + *

Some payment methods such as Apple Pay require additional steps to verify 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 for this domain until it is active.

+ +

To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.

+ +

Related guides: Payment method domains.

. + */ + @aiFunction({ + name: 'post_payment_method_domains_payment_method_domain_validate', + description: `

Some payment methods such as Apple Pay require additional steps to verify 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 for this domain until it is active.

+ +

To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.

+ +

Related guides: Payment method domains.

.`, + inputSchema: + stripe.PostPaymentMethodDomainsPaymentMethodDomainValidateParamsSchema + }) + async PostPaymentMethodDomainsPaymentMethodDomainValidate( + params: stripe.PostPaymentMethodDomainsPaymentMethodDomainValidateParams + ): Promise { + return this.ky + .post( + `/v1/payment_method_domains/${params.payment_method_domain}/validate` + ) + .json() + } + + /** + *

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 API instead.

. + */ + @aiFunction({ + name: 'get_payment_methods', + description: + '

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 API instead.

.', + inputSchema: stripe.GetPaymentMethodsParamsSchema + }) + async GetPaymentMethods( + params: stripe.GetPaymentMethodsParams + ): Promise { + return this.ky + .get('/v1/payment_methods', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ +

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

. + */ + @aiFunction({ + name: 'post_payment_methods', + description: `

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ +

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

.`, + inputSchema: stripe.PostPaymentMethodsParamsSchema + }) + async PostPaymentMethods( + _params: stripe.PostPaymentMethodsParams + ): Promise { + return this.ky + .post('/v1/payment_methods') + .json() + } + + /** + *

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

. + */ + @aiFunction({ + name: 'get_payment_methods_payment_method', + description: + '

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

.', + inputSchema: stripe.GetPaymentMethodsPaymentMethodParamsSchema + }) + async GetPaymentMethodsPaymentMethod( + params: stripe.GetPaymentMethodsPaymentMethodParams + ): Promise { + return this.ky + .get(`/v1/payment_methods/${params.payment_method}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

. + */ + @aiFunction({ + name: 'post_payment_methods_payment_method', + description: + '

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

.', + inputSchema: stripe.PostPaymentMethodsPaymentMethodParamsSchema + }) + async PostPaymentMethodsPaymentMethod( + params: stripe.PostPaymentMethodsPaymentMethodParams + ): Promise { + return this.ky + .post(`/v1/payment_methods/${params.payment_method}`) + .json() + } + + /** + *

Attaches a PaymentMethod object to a Customer.

+ +

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent +or a PaymentIntent with 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 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, +on the Customer to the PaymentMethod’s ID.

. + */ + @aiFunction({ + name: 'post_payment_methods_payment_method_attach', + description: `

Attaches a PaymentMethod object to a Customer.

+ +

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent +or a PaymentIntent with 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 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, +on the Customer to the PaymentMethod’s ID.

.`, + inputSchema: stripe.PostPaymentMethodsPaymentMethodAttachParamsSchema + }) + async PostPaymentMethodsPaymentMethodAttach( + params: stripe.PostPaymentMethodsPaymentMethodAttachParams + ): Promise { + return this.ky + .post(`/v1/payment_methods/${params.payment_method}/attach`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_payment_methods_payment_method_detach', + description: + '

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.

.', + inputSchema: stripe.PostPaymentMethodsPaymentMethodDetachParamsSchema + }) + async PostPaymentMethodsPaymentMethodDetach( + params: stripe.PostPaymentMethodsPaymentMethodDetachParams + ): Promise { + return this.ky + .post(`/v1/payment_methods/${params.payment_method}/detach`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_payouts', + description: + '

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.

.', + inputSchema: stripe.GetPayoutsParamsSchema + }) + async GetPayouts( + params: stripe.GetPayoutsParams + ): Promise { + return this.ky + .get('/v1/payouts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

To send funds to your own bank account, create a new payout object. Your Stripe 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 details available and pending amounts by source type.

. + */ + @aiFunction({ + name: 'post_payouts', + description: `

To send funds to your own bank account, create a new payout object. Your Stripe 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 details available and pending amounts by source type.

.`, + inputSchema: stripe.PostPayoutsParamsSchema + }) + async PostPayouts( + _params: stripe.PostPayoutsParams + ): Promise { + return this.ky.post('/v1/payouts').json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_payouts_payout', + description: + '

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.

.', + inputSchema: stripe.GetPayoutsPayoutParamsSchema + }) + async GetPayoutsPayout( + params: stripe.GetPayoutsPayoutParams + ): Promise { + return this.ky + .get(`/v1/payouts/${params.payout}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_payouts_payout', + description: + '

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.

.', + inputSchema: stripe.PostPayoutsPayoutParamsSchema + }) + async PostPayoutsPayout( + params: stripe.PostPayoutsPayoutParams + ): Promise { + return this.ky + .post(`/v1/payouts/${params.payout}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_payouts_payout_cancel', + description: + '

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.

.', + inputSchema: stripe.PostPayoutsPayoutCancelParamsSchema + }) + async PostPayoutsPayoutCancel( + params: stripe.PostPayoutsPayoutCancelParams + ): Promise { + return this.ky + .post(`/v1/payouts/${params.payout}/cancel`) + .json() + } + + /** + *

Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US 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.

. + */ + @aiFunction({ + name: 'post_payouts_payout_reverse', + description: `

Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US 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.

.`, + inputSchema: stripe.PostPayoutsPayoutReverseParamsSchema + }) + async PostPayoutsPayoutReverse( + params: stripe.PostPayoutsPayoutReverseParams + ): Promise { + return this.ky + .post(`/v1/payouts/${params.payout}/reverse`) + .json() + } + + /** + *

Returns a list of your plans.

. + */ + @aiFunction({ + name: 'get_plans', + description: '

Returns a list of your plans.

.', + inputSchema: stripe.GetPlansParamsSchema + }) + async GetPlans( + params: stripe.GetPlansParams + ): Promise { + return this.ky + .get('/v1/plans', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

. + */ + @aiFunction({ + name: 'post_plans', + description: + '

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

.', + inputSchema: stripe.PostPlansParamsSchema + }) + async PostPlans( + _params: stripe.PostPlansParams + ): Promise { + return this.ky.post('/v1/plans').json() + } + + /** + *

Retrieves the plan with the given ID.

. + */ + @aiFunction({ + name: 'get_plans_plan', + description: '

Retrieves the plan with the given ID.

.', + inputSchema: stripe.GetPlansPlanParamsSchema + }) + async GetPlansPlan( + params: stripe.GetPlansPlanParams + ): Promise { + return this.ky + .get(`/v1/plans/${params.plan}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_plans_plan', + description: + '

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.

.', + inputSchema: stripe.PostPlansPlanParamsSchema + }) + async PostPlansPlan( + params: stripe.PostPlansPlanParams + ): Promise { + return this.ky + .post(`/v1/plans/${params.plan}`) + .json() + } + + /** + *

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

. + */ + @aiFunction({ + name: 'delete_plans_plan', + description: + '

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

.', + inputSchema: stripe.DeletePlansPlanParamsSchema + }) + async DeletePlansPlan( + params: stripe.DeletePlansPlanParams + ): Promise { + return this.ky + .delete(`/v1/plans/${params.plan}`) + .json() + } + + /** + *

Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active to false.

. + */ + @aiFunction({ + name: 'get_prices', + description: + '

Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active to false.

.', + inputSchema: stripe.GetPricesParamsSchema + }) + async GetPrices( + params: stripe.GetPricesParams + ): Promise { + return this.ky + .get('/v1/prices', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new price for an existing product. The price can be recurring or one-time.

. + */ + @aiFunction({ + name: 'post_prices', + description: + '

Creates a new price for an existing product. The price can be recurring or one-time.

.', + inputSchema: stripe.PostPricesParamsSchema + }) + async PostPrices( + _params: stripe.PostPricesParams + ): Promise { + return this.ky.post('/v1/prices').json() + } + + /** + *

Search for prices you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_prices_search', + description: `

Search for prices you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetPricesSearchParamsSchema + }) + async GetPricesSearch( + params: stripe.GetPricesSearchParams + ): Promise { + return this.ky + .get('/v1/prices/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the price with the given ID.

. + */ + @aiFunction({ + name: 'get_prices_price', + description: '

Retrieves the price with the given ID.

.', + inputSchema: stripe.GetPricesPriceParamsSchema + }) + async GetPricesPrice( + params: stripe.GetPricesPriceParams + ): Promise { + return this.ky + .get(`/v1/prices/${params.price}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

. + */ + @aiFunction({ + name: 'post_prices_price', + description: + '

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

.', + inputSchema: stripe.PostPricesPriceParamsSchema + }) + async PostPricesPrice( + params: stripe.PostPricesPriceParams + ): Promise { + return this.ky + .post(`/v1/prices/${params.price}`) + .json() + } + + /** + *

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

. + */ + @aiFunction({ + name: 'get_products', + description: + '

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

.', + inputSchema: stripe.GetProductsParamsSchema + }) + async GetProducts( + params: stripe.GetProductsParams + ): Promise { + return this.ky + .get('/v1/products', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new product object.

. + */ + @aiFunction({ + name: 'post_products', + description: '

Creates a new product object.

.', + inputSchema: stripe.PostProductsParamsSchema + }) + async PostProducts( + _params: stripe.PostProductsParams + ): Promise { + return this.ky.post('/v1/products').json() + } + + /** + *

Search for products you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_products_search', + description: `

Search for products you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetProductsSearchParamsSchema + }) + async GetProductsSearch( + params: stripe.GetProductsSearchParams + ): Promise { + return this.ky + .get('/v1/products/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_products_id', + description: + '

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.

.', + inputSchema: stripe.GetProductsIdParamsSchema + }) + async GetProductsId( + params: stripe.GetProductsIdParams + ): Promise { + return this.ky + .get(`/v1/products/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_products_id', + description: + '

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostProductsIdParamsSchema + }) + async PostProductsId( + params: stripe.PostProductsIdParams + ): Promise { + return this.ky + .post(`/v1/products/${params.id}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'delete_products_id', + description: + '

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.

.', + inputSchema: stripe.DeleteProductsIdParamsSchema + }) + async DeleteProductsId( + params: stripe.DeleteProductsIdParams + ): Promise { + return this.ky + .delete(`/v1/products/${params.id}`) + .json() + } + + /** + *

Retrieve a list of features for a product

. + */ + @aiFunction({ + name: 'get_products_product_features', + description: '

Retrieve a list of features for a product

.', + inputSchema: stripe.GetProductsProductFeaturesParamsSchema + }) + async GetProductsProductFeatures( + params: stripe.GetProductsProductFeaturesParams + ): Promise { + return this.ky + .get(`/v1/products/${params.product}/features`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Creates a product_feature, which represents a feature attachment to a product

. + */ + @aiFunction({ + name: 'post_products_product_features', + description: + '

Creates a product_feature, which represents a feature attachment to a product

.', + inputSchema: stripe.PostProductsProductFeaturesParamsSchema + }) + async PostProductsProductFeatures( + params: stripe.PostProductsProductFeaturesParams + ): Promise { + return this.ky + .post(`/v1/products/${params.product}/features`) + .json() + } + + /** + *

Retrieves a product_feature, which represents a feature attachment to a product

. + */ + @aiFunction({ + name: 'get_products_product_features_id', + description: + '

Retrieves a product_feature, which represents a feature attachment to a product

.', + inputSchema: stripe.GetProductsProductFeaturesIdParamsSchema + }) + async GetProductsProductFeaturesId( + params: stripe.GetProductsProductFeaturesIdParams + ): Promise { + return this.ky + .get(`/v1/products/${params.product}/features/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Deletes the feature attachment to a product

. + */ + @aiFunction({ + name: 'delete_products_product_features_id', + description: '

Deletes the feature attachment to a product

.', + inputSchema: stripe.DeleteProductsProductFeaturesIdParamsSchema + }) + async DeleteProductsProductFeaturesId( + params: stripe.DeleteProductsProductFeaturesIdParams + ): Promise { + return this.ky + .delete(`/v1/products/${params.product}/features/${params.id}`) + .json() + } + + /** + *

Returns a list of your promotion codes.

. + */ + @aiFunction({ + name: 'get_promotion_codes', + description: '

Returns a list of your promotion codes.

.', + inputSchema: stripe.GetPromotionCodesParamsSchema + }) + async GetPromotionCodes( + params: stripe.GetPromotionCodesParams + ): Promise { + return this.ky + .get('/v1/promotion_codes', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

. + */ + @aiFunction({ + name: 'post_promotion_codes', + description: + '

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

.', + inputSchema: stripe.PostPromotionCodesParamsSchema + }) + async PostPromotionCodes( + _params: stripe.PostPromotionCodesParams + ): Promise { + return this.ky + .post('/v1/promotion_codes') + .json() + } + + /** + *

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

. + */ + @aiFunction({ + name: 'get_promotion_codes_promotion_code', + description: + '

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

.', + inputSchema: stripe.GetPromotionCodesPromotionCodeParamsSchema + }) + async GetPromotionCodesPromotionCode( + params: stripe.GetPromotionCodesPromotionCodeParams + ): Promise { + return this.ky + .get(`/v1/promotion_codes/${params.promotion_code}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

. + */ + @aiFunction({ + name: 'post_promotion_codes_promotion_code', + description: + '

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

.', + inputSchema: stripe.PostPromotionCodesPromotionCodeParamsSchema + }) + async PostPromotionCodesPromotionCode( + params: stripe.PostPromotionCodesPromotionCodeParams + ): Promise { + return this.ky + .post(`/v1/promotion_codes/${params.promotion_code}`) + .json() + } + + /** + *

Returns a list of your quotes.

. + */ + @aiFunction({ + name: 'get_quotes', + description: '

Returns a list of your quotes.

.', + inputSchema: stripe.GetQuotesParamsSchema + }) + async GetQuotes( + params: stripe.GetQuotesParams + ): Promise { + return this.ky + .get('/v1/quotes', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_quotes', + description: + '

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.

.', + inputSchema: stripe.PostQuotesParamsSchema + }) + async PostQuotes( + _params: stripe.PostQuotesParams + ): Promise { + return this.ky.post('/v1/quotes').json() + } + + /** + *

Retrieves the quote with the given ID.

. + */ + @aiFunction({ + name: 'get_quotes_quote', + description: '

Retrieves the quote with the given ID.

.', + inputSchema: stripe.GetQuotesQuoteParamsSchema + }) + async GetQuotesQuote( + params: stripe.GetQuotesQuoteParams + ): Promise { + return this.ky + .get(`/v1/quotes/${params.quote}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

A quote models prices and services for a customer.

. + */ + @aiFunction({ + name: 'post_quotes_quote', + description: '

A quote models prices and services for a customer.

.', + inputSchema: stripe.PostQuotesQuoteParamsSchema + }) + async PostQuotesQuote( + params: stripe.PostQuotesQuoteParams + ): Promise { + return this.ky + .post(`/v1/quotes/${params.quote}`) + .json() + } + + /** + *

Accepts the specified quote.

. + */ + @aiFunction({ + name: 'post_quotes_quote_accept', + description: '

Accepts the specified quote.

.', + inputSchema: stripe.PostQuotesQuoteAcceptParamsSchema + }) + async PostQuotesQuoteAccept( + params: stripe.PostQuotesQuoteAcceptParams + ): Promise { + return this.ky + .post(`/v1/quotes/${params.quote}/accept`) + .json() + } + + /** + *

Cancels the quote.

. + */ + @aiFunction({ + name: 'post_quotes_quote_cancel', + description: '

Cancels the quote.

.', + inputSchema: stripe.PostQuotesQuoteCancelParamsSchema + }) + async PostQuotesQuoteCancel( + params: stripe.PostQuotesQuoteCancelParams + ): Promise { + return this.ky + .post(`/v1/quotes/${params.quote}/cancel`) + .json() + } + + /** + *

When retrieving a quote, there is an includable 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.

. + */ + @aiFunction({ + name: 'get_quotes_quote_computed_upfront_line_items', + description: + '

When retrieving a quote, there is an includable 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.

.', + inputSchema: stripe.GetQuotesQuoteComputedUpfrontLineItemsParamsSchema + }) + async GetQuotesQuoteComputedUpfrontLineItems( + params: stripe.GetQuotesQuoteComputedUpfrontLineItemsParams + ): Promise { + return this.ky + .get(`/v1/quotes/${params.quote}/computed_upfront_line_items`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Finalizes the quote.

. + */ + @aiFunction({ + name: 'post_quotes_quote_finalize', + description: '

Finalizes the quote.

.', + inputSchema: stripe.PostQuotesQuoteFinalizeParamsSchema + }) + async PostQuotesQuoteFinalize( + params: stripe.PostQuotesQuoteFinalizeParams + ): Promise { + return this.ky + .post(`/v1/quotes/${params.quote}/finalize`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_quotes_quote_line_items', + description: + '

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.

.', + inputSchema: stripe.GetQuotesQuoteLineItemsParamsSchema + }) + async GetQuotesQuoteLineItems( + params: stripe.GetQuotesQuoteLineItemsParams + ): Promise { + return this.ky + .get(`/v1/quotes/${params.quote}/line_items`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Download the PDF for a finalized quote. Explanation for special handling can be found here

. + */ + @aiFunction({ + name: 'get_quotes_quote_pdf', + description: + '

Download the PDF for a finalized quote. Explanation for special handling can be found here

.', + inputSchema: stripe.GetQuotesQuotePdfParamsSchema + }) + async GetQuotesQuotePdf( + params: stripe.GetQuotesQuotePdfParams + ): Promise { + return this.ky + .get(`/v1/quotes/${params.quote}/pdf`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of early fraud warnings.

. + */ + @aiFunction({ + name: 'get_radar_early_fraud_warnings', + description: '

Returns a list of early fraud warnings.

.', + inputSchema: stripe.GetRadarEarlyFraudWarningsParamsSchema + }) + async GetRadarEarlyFraudWarnings( + params: stripe.GetRadarEarlyFraudWarningsParams + ): Promise { + return this.ky + .get('/v1/radar/early_fraud_warnings', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an early fraud warning that has previously been created.

+ +

Please refer to the early fraud warning object reference for more details.

. + */ + @aiFunction({ + name: 'get_radar_early_fraud_warnings_early_fraud_warning', + description: `

Retrieves the details of an early fraud warning that has previously been created.

+ +

Please refer to the early fraud warning object reference for more details.

.`, + inputSchema: stripe.GetRadarEarlyFraudWarningsEarlyFraudWarningParamsSchema + }) + async GetRadarEarlyFraudWarningsEarlyFraudWarning( + params: stripe.GetRadarEarlyFraudWarningsEarlyFraudWarningParams + ): Promise { + return this.ky + .get(`/v1/radar/early_fraud_warnings/${params.early_fraud_warning}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

. + */ + @aiFunction({ + name: 'get_radar_value_list_items', + description: + '

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

.', + inputSchema: stripe.GetRadarValueListItemsParamsSchema + }) + async GetRadarValueListItems( + params: stripe.GetRadarValueListItemsParams + ): Promise { + return this.ky + .get('/v1/radar/value_list_items', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new ValueListItem object, which is added to the specified parent value list.

. + */ + @aiFunction({ + name: 'post_radar_value_list_items', + description: + '

Creates a new ValueListItem object, which is added to the specified parent value list.

.', + inputSchema: stripe.PostRadarValueListItemsParamsSchema + }) + async PostRadarValueListItems( + _params: stripe.PostRadarValueListItemsParams + ): Promise { + return this.ky + .post('/v1/radar/value_list_items') + .json() + } + + /** + *

Retrieves a ValueListItem object.

. + */ + @aiFunction({ + name: 'get_radar_value_list_items_item', + description: '

Retrieves a ValueListItem object.

.', + inputSchema: stripe.GetRadarValueListItemsItemParamsSchema + }) + async GetRadarValueListItemsItem( + params: stripe.GetRadarValueListItemsItemParams + ): Promise { + return this.ky + .get(`/v1/radar/value_list_items/${params.item}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Deletes a ValueListItem object, removing it from its parent value list.

. + */ + @aiFunction({ + name: 'delete_radar_value_list_items_item', + description: + '

Deletes a ValueListItem object, removing it from its parent value list.

.', + inputSchema: stripe.DeleteRadarValueListItemsItemParamsSchema + }) + async DeleteRadarValueListItemsItem( + params: stripe.DeleteRadarValueListItemsItemParams + ): Promise { + return this.ky + .delete(`/v1/radar/value_list_items/${params.item}`) + .json() + } + + /** + *

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

. + */ + @aiFunction({ + name: 'get_radar_value_lists', + description: + '

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

.', + inputSchema: stripe.GetRadarValueListsParamsSchema + }) + async GetRadarValueLists( + params: stripe.GetRadarValueListsParams + ): Promise { + return this.ky + .get('/v1/radar/value_lists', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new ValueList object, which can then be referenced in rules.

. + */ + @aiFunction({ + name: 'post_radar_value_lists', + description: + '

Creates a new ValueList object, which can then be referenced in rules.

.', + inputSchema: stripe.PostRadarValueListsParamsSchema + }) + async PostRadarValueLists( + _params: stripe.PostRadarValueListsParams + ): Promise { + return this.ky + .post('/v1/radar/value_lists') + .json() + } + + /** + *

Retrieves a ValueList object.

. + */ + @aiFunction({ + name: 'get_radar_value_lists_value_list', + description: '

Retrieves a ValueList object.

.', + inputSchema: stripe.GetRadarValueListsValueListParamsSchema + }) + async GetRadarValueListsValueList( + params: stripe.GetRadarValueListsValueListParams + ): Promise { + return this.ky + .get(`/v1/radar/value_lists/${params.value_list}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_radar_value_lists_value_list', + description: + '

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.

.', + inputSchema: stripe.PostRadarValueListsValueListParamsSchema + }) + async PostRadarValueListsValueList( + params: stripe.PostRadarValueListsValueListParams + ): Promise { + return this.ky + .post(`/v1/radar/value_lists/${params.value_list}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'delete_radar_value_lists_value_list', + description: + '

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.

.', + inputSchema: stripe.DeleteRadarValueListsValueListParamsSchema + }) + async DeleteRadarValueListsValueList( + params: stripe.DeleteRadarValueListsValueListParams + ): Promise { + return this.ky + .delete(`/v1/radar/value_lists/${params.value_list}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_refunds', + description: + '

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.

.', + inputSchema: stripe.GetRefundsParamsSchema + }) + async GetRefunds( + params: stripe.GetRefundsParams + ): Promise { + return this.ky + .get('/v1/refunds', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_refunds', + description: `

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.

.`, + inputSchema: stripe.PostRefundsParamsSchema + }) + async PostRefunds( + _params: stripe.PostRefundsParams + ): Promise { + return this.ky.post('/v1/refunds').json() + } + + /** + *

Retrieves the details of an existing refund.

. + */ + @aiFunction({ + name: 'get_refunds_refund', + description: '

Retrieves the details of an existing refund.

.', + inputSchema: stripe.GetRefundsRefundParamsSchema + }) + async GetRefundsRefund( + params: stripe.GetRefundsRefundParams + ): Promise { + return this.ky + .get(`/v1/refunds/${params.refund}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_refunds_refund', + description: `

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.

.`, + inputSchema: stripe.PostRefundsRefundParamsSchema + }) + async PostRefundsRefund( + params: stripe.PostRefundsRefundParams + ): Promise { + return this.ky + .post(`/v1/refunds/${params.refund}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_refunds_refund_cancel', + description: `

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.

.`, + inputSchema: stripe.PostRefundsRefundCancelParamsSchema + }) + async PostRefundsRefundCancel( + params: stripe.PostRefundsRefundCancelParams + ): Promise { + return this.ky + .post(`/v1/refunds/${params.refund}/cancel`) + .json() + } + + /** + *

Returns a list of Report Runs, with the most recent appearing first.

. + */ + @aiFunction({ + name: 'get_reporting_report_runs', + description: + '

Returns a list of Report Runs, with the most recent appearing first.

.', + inputSchema: stripe.GetReportingReportRunsParamsSchema + }) + async GetReportingReportRuns( + params: stripe.GetReportingReportRunsParams + ): Promise { + return this.ky + .get('/v1/reporting/report_runs', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

. + */ + @aiFunction({ + name: 'post_reporting_report_runs', + description: + '

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

.', + inputSchema: stripe.PostReportingReportRunsParamsSchema + }) + async PostReportingReportRuns( + _params: stripe.PostReportingReportRunsParams + ): Promise { + return this.ky + .post('/v1/reporting/report_runs') + .json() + } + + /** + *

Retrieves the details of an existing Report Run.

. + */ + @aiFunction({ + name: 'get_reporting_report_runs_report_run', + description: '

Retrieves the details of an existing Report Run.

.', + inputSchema: stripe.GetReportingReportRunsReportRunParamsSchema + }) + async GetReportingReportRunsReportRun( + params: stripe.GetReportingReportRunsReportRunParams + ): Promise { + return this.ky + .get(`/v1/reporting/report_runs/${params.report_run}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a full list of Report Types.

. + */ + @aiFunction({ + name: 'get_reporting_report_types', + description: '

Returns a full list of Report Types.

.', + inputSchema: stripe.GetReportingReportTypesParamsSchema + }) + async GetReportingReportTypes( + params: stripe.GetReportingReportTypesParams + ): Promise { + return this.ky + .get('/v1/reporting/report_types', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

. + */ + @aiFunction({ + name: 'get_reporting_report_types_report_type', + description: + '

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

.', + inputSchema: stripe.GetReportingReportTypesReportTypeParamsSchema + }) + async GetReportingReportTypesReportType( + params: stripe.GetReportingReportTypesReportTypeParams + ): Promise { + return this.ky + .get(`/v1/reporting/report_types/${params.report_type}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_reviews', + description: + '

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.

.', + inputSchema: stripe.GetReviewsParamsSchema + }) + async GetReviews( + params: stripe.GetReviewsParams + ): Promise { + return this.ky + .get('/v1/reviews', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves a Review object.

. + */ + @aiFunction({ + name: 'get_reviews_review', + description: '

Retrieves a Review object.

.', + inputSchema: stripe.GetReviewsReviewParamsSchema + }) + async GetReviewsReview( + params: stripe.GetReviewsReviewParams + ): Promise { + return this.ky + .get(`/v1/reviews/${params.review}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Approves a Review object, closing it and removing it from the list of reviews.

. + */ + @aiFunction({ + name: 'post_reviews_review_approve', + description: + '

Approves a Review object, closing it and removing it from the list of reviews.

.', + inputSchema: stripe.PostReviewsReviewApproveParamsSchema + }) + async PostReviewsReviewApprove( + params: stripe.PostReviewsReviewApproveParams + ): Promise { + return this.ky + .post(`/v1/reviews/${params.review}/approve`) + .json() + } + + /** + *

Returns a list of SetupAttempts that associate with a provided SetupIntent.

. + */ + @aiFunction({ + name: 'get_setup_attempts', + description: + '

Returns a list of SetupAttempts that associate with a provided SetupIntent.

.', + inputSchema: stripe.GetSetupAttemptsParamsSchema + }) + async GetSetupAttempts( + params: stripe.GetSetupAttemptsParams + ): Promise { + return this.ky + .get('/v1/setup_attempts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Returns a list of SetupIntents.

. + */ + @aiFunction({ + name: 'get_setup_intents', + description: '

Returns a list of SetupIntents.

.', + inputSchema: stripe.GetSetupIntentsParamsSchema + }) + async GetSetupIntents( + params: stripe.GetSetupIntentsParams + ): Promise { + return this.ky + .get('/v1/setup_intents', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a SetupIntent object.

+ +

After you create the SetupIntent, attach a payment method and confirm +it to collect any required permissions to charge the payment method later.

. + */ + @aiFunction({ + name: 'post_setup_intents', + description: `

Creates a SetupIntent object.

+ +

After you create the SetupIntent, attach a payment method and confirm +it to collect any required permissions to charge the payment method later.

.`, + inputSchema: stripe.PostSetupIntentsParamsSchema + }) + async PostSetupIntents( + _params: stripe.PostSetupIntentsParams + ): Promise { + return this.ky + .post('/v1/setup_intents') + .json() + } + + /** + *

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 object reference for more details.

. + */ + @aiFunction({ + name: 'get_setup_intents_intent', + description: `

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 object reference for more details.

.`, + inputSchema: stripe.GetSetupIntentsIntentParamsSchema + }) + async GetSetupIntentsIntent( + params: stripe.GetSetupIntentsIntentParams + ): Promise { + return this.ky + .get(`/v1/setup_intents/${params.intent}`, { + searchParams: sanitizeSearchParams( + pick(params, 'client_secret', 'expand') + ) + }) + .json() + } + + /** + *

Updates a SetupIntent object.

. + */ + @aiFunction({ + name: 'post_setup_intents_intent', + description: '

Updates a SetupIntent object.

.', + inputSchema: stripe.PostSetupIntentsIntentParamsSchema + }) + async PostSetupIntentsIntent( + params: stripe.PostSetupIntentsIntentParams + ): Promise { + return this.ky + .post(`/v1/setup_intents/${params.intent}`) + .json() + } + + /** + *

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 instead.

. + */ + @aiFunction({ + name: 'post_setup_intents_intent_cancel', + description: `

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 instead.

.`, + inputSchema: stripe.PostSetupIntentsIntentCancelParamsSchema + }) + async PostSetupIntentsIntentCancel( + params: stripe.PostSetupIntentsIntentCancelParams + ): Promise { + return this.ky + .post(`/v1/setup_intents/${params.intent}/cancel`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_setup_intents_intent_confirm', + description: `

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.

.`, + inputSchema: stripe.PostSetupIntentsIntentConfirmParamsSchema + }) + async PostSetupIntentsIntentConfirm( + params: stripe.PostSetupIntentsIntentConfirmParams + ): Promise { + return this.ky + .post(`/v1/setup_intents/${params.intent}/confirm`) + .json() + } + + /** + *

Verifies microdeposits on a SetupIntent object.

. + */ + @aiFunction({ + name: 'post_setup_intents_intent_verify_microdeposits', + description: '

Verifies microdeposits on a SetupIntent object.

.', + inputSchema: stripe.PostSetupIntentsIntentVerifyMicrodepositsParamsSchema + }) + async PostSetupIntentsIntentVerifyMicrodeposits( + params: stripe.PostSetupIntentsIntentVerifyMicrodepositsParams + ): Promise { + return this.ky + .post(`/v1/setup_intents/${params.intent}/verify_microdeposits`) + .json() + } + + /** + *

Returns a list of your shipping rates.

. + */ + @aiFunction({ + name: 'get_shipping_rates', + description: '

Returns a list of your shipping rates.

.', + inputSchema: stripe.GetShippingRatesParamsSchema + }) + async GetShippingRates( + params: stripe.GetShippingRatesParams + ): Promise { + return this.ky + .get('/v1/shipping_rates', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new shipping rate object.

. + */ + @aiFunction({ + name: 'post_shipping_rates', + description: '

Creates a new shipping rate object.

.', + inputSchema: stripe.PostShippingRatesParamsSchema + }) + async PostShippingRates( + _params: stripe.PostShippingRatesParams + ): Promise { + return this.ky + .post('/v1/shipping_rates') + .json() + } + + /** + *

Returns the shipping rate object with the given ID.

. + */ + @aiFunction({ + name: 'get_shipping_rates_shipping_rate_token', + description: '

Returns the shipping rate object with the given ID.

.', + inputSchema: stripe.GetShippingRatesShippingRateTokenParamsSchema + }) + async GetShippingRatesShippingRateToken( + params: stripe.GetShippingRatesShippingRateTokenParams + ): Promise { + return this.ky + .get(`/v1/shipping_rates/${params.shipping_rate_token}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing shipping rate object.

. + */ + @aiFunction({ + name: 'post_shipping_rates_shipping_rate_token', + description: '

Updates an existing shipping rate object.

.', + inputSchema: stripe.PostShippingRatesShippingRateTokenParamsSchema + }) + async PostShippingRatesShippingRateToken( + params: stripe.PostShippingRatesShippingRateTokenParams + ): Promise { + return this.ky + .post(`/v1/shipping_rates/${params.shipping_rate_token}`) + .json() + } + + /** + *

Returns a list of scheduled query runs.

. + */ + @aiFunction({ + name: 'get_sigma_scheduled_query_runs', + description: '

Returns a list of scheduled query runs.

.', + inputSchema: stripe.GetSigmaScheduledQueryRunsParamsSchema + }) + async GetSigmaScheduledQueryRuns( + params: stripe.GetSigmaScheduledQueryRunsParams + ): Promise { + return this.ky + .get('/v1/sigma/scheduled_query_runs', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an scheduled query run.

. + */ + @aiFunction({ + name: 'get_sigma_scheduled_query_runs_scheduled_query_run', + description: '

Retrieves the details of an scheduled query run.

.', + inputSchema: stripe.GetSigmaScheduledQueryRunsScheduledQueryRunParamsSchema + }) + async GetSigmaScheduledQueryRunsScheduledQueryRun( + params: stripe.GetSigmaScheduledQueryRunsScheduledQueryRunParams + ): Promise { + return this.ky + .get(`/v1/sigma/scheduled_query_runs/${params.scheduled_query_run}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Creates a new source object.

. + */ + @aiFunction({ + name: 'post_sources', + description: '

Creates a new source object.

.', + inputSchema: stripe.PostSourcesParamsSchema + }) + async PostSources( + _params: stripe.PostSourcesParams + ): Promise { + return this.ky.post('/v1/sources').json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_sources_source', + description: + '

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.

.', + inputSchema: stripe.GetSourcesSourceParamsSchema + }) + async GetSourcesSource( + params: stripe.GetSourcesSourceParams + ): Promise { + return this.ky + .get(`/v1/sources/${params.source}`, { + searchParams: sanitizeSearchParams( + pick(params, 'client_secret', 'expand') + ) + }) + .json() + } + + /** + *

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 for more detail.

. + */ + @aiFunction({ + name: 'post_sources_source', + description: `

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 for more detail.

.`, + inputSchema: stripe.PostSourcesSourceParamsSchema + }) + async PostSourcesSource( + params: stripe.PostSourcesSourceParams + ): Promise { + return this.ky + .post(`/v1/sources/${params.source}`) + .json() + } + + /** + *

Retrieves a new Source MandateNotification.

. + */ + @aiFunction({ + name: 'get_sources_source_mandate_notifications_mandate_notification', + description: '

Retrieves a new Source MandateNotification.

.', + inputSchema: + stripe.GetSourcesSourceMandateNotificationsMandateNotificationParamsSchema + }) + async GetSourcesSourceMandateNotificationsMandateNotification( + params: stripe.GetSourcesSourceMandateNotificationsMandateNotificationParams + ): Promise { + return this.ky + .get( + `/v1/sources/${params.source}/mandate_notifications/${params.mandate_notification}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

List source transactions for a given source.

. + */ + @aiFunction({ + name: 'get_sources_source_source_transactions', + description: '

List source transactions for a given source.

.', + inputSchema: stripe.GetSourcesSourceSourceTransactionsParamsSchema + }) + async GetSourcesSourceSourceTransactions( + params: stripe.GetSourcesSourceSourceTransactionsParams + ): Promise { + return this.ky + .get(`/v1/sources/${params.source}/source_transactions`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_sources_source_source_transactions_source_transaction', + description: + '

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.

.', + inputSchema: + stripe.GetSourcesSourceSourceTransactionsSourceTransactionParamsSchema + }) + async GetSourcesSourceSourceTransactionsSourceTransaction( + params: stripe.GetSourcesSourceSourceTransactionsSourceTransactionParams + ): Promise { + return this.ky + .get( + `/v1/sources/${params.source}/source_transactions/${params.source_transaction}`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Verify a given source.

. + */ + @aiFunction({ + name: 'post_sources_source_verify', + description: '

Verify a given source.

.', + inputSchema: stripe.PostSourcesSourceVerifyParamsSchema + }) + async PostSourcesSourceVerify( + params: stripe.PostSourcesSourceVerifyParams + ): Promise { + return this.ky + .post(`/v1/sources/${params.source}/verify`) + .json() + } + + /** + *

Returns a list of your subscription items for a given subscription.

. + */ + @aiFunction({ + name: 'get_subscription_items', + description: + '

Returns a list of your subscription items for a given subscription.

.', + inputSchema: stripe.GetSubscriptionItemsParamsSchema + }) + async GetSubscriptionItems( + params: stripe.GetSubscriptionItemsParams + ): Promise { + return this.ky + .get('/v1/subscription_items', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Adds a new item to an existing subscription. No existing items will be changed or replaced.

. + */ + @aiFunction({ + name: 'post_subscription_items', + description: + '

Adds a new item to an existing subscription. No existing items will be changed or replaced.

.', + inputSchema: stripe.PostSubscriptionItemsParamsSchema + }) + async PostSubscriptionItems( + _params: stripe.PostSubscriptionItemsParams + ): Promise { + return this.ky + .post('/v1/subscription_items') + .json() + } + + /** + *

Retrieves the subscription item with the given ID.

. + */ + @aiFunction({ + name: 'get_subscription_items_item', + description: '

Retrieves the subscription item with the given ID.

.', + inputSchema: stripe.GetSubscriptionItemsItemParamsSchema + }) + async GetSubscriptionItemsItem( + params: stripe.GetSubscriptionItemsItemParams + ): Promise { + return this.ky + .get(`/v1/subscription_items/${params.item}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the plan or quantity of an item on a current subscription.

. + */ + @aiFunction({ + name: 'post_subscription_items_item', + description: + '

Updates the plan or quantity of an item on a current subscription.

.', + inputSchema: stripe.PostSubscriptionItemsItemParamsSchema + }) + async PostSubscriptionItemsItem( + params: stripe.PostSubscriptionItemsItemParams + ): Promise { + return this.ky + .post(`/v1/subscription_items/${params.item}`) + .json() + } + + /** + *

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

. + */ + @aiFunction({ + name: 'delete_subscription_items_item', + description: + '

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

.', + inputSchema: stripe.DeleteSubscriptionItemsItemParamsSchema + }) + async DeleteSubscriptionItemsItem( + params: stripe.DeleteSubscriptionItemsItemParams + ): Promise { + return this.ky + .delete(`/v1/subscription_items/${params.item}`) + .json() + } + + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ +

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

. + */ + @aiFunction({ + name: 'get_subscription_items_subscription_item_usage_record_summaries', + description: `

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ +

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

.`, + inputSchema: + stripe.GetSubscriptionItemsSubscriptionItemUsageRecordSummariesParamsSchema + }) + async GetSubscriptionItemsSubscriptionItemUsageRecordSummaries( + params: stripe.GetSubscriptionItemsSubscriptionItemUsageRecordSummariesParams + ): Promise { + return this.ky + .get( + `/v1/subscription_items/${params.subscription_item}/usage_record_summaries`, + { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + } + ) + .json() + } + + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ +

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ +

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ +

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

. + */ + @aiFunction({ + name: 'post_subscription_items_subscription_item_usage_records', + description: `

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ +

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ +

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ +

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

.`, + inputSchema: + stripe.PostSubscriptionItemsSubscriptionItemUsageRecordsParamsSchema + }) + async PostSubscriptionItemsSubscriptionItemUsageRecords( + params: stripe.PostSubscriptionItemsSubscriptionItemUsageRecordsParams + ): Promise { + return this.ky + .post( + `/v1/subscription_items/${params.subscription_item}/usage_records` + ) + .json() + } + + /** + *

Retrieves the list of your subscription schedules.

. + */ + @aiFunction({ + name: 'get_subscription_schedules', + description: '

Retrieves the list of your subscription schedules.

.', + inputSchema: stripe.GetSubscriptionSchedulesParamsSchema + }) + async GetSubscriptionSchedules( + params: stripe.GetSubscriptionSchedulesParams + ): Promise { + return this.ky + .get('/v1/subscription_schedules', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

. + */ + @aiFunction({ + name: 'post_subscription_schedules', + description: + '

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

.', + inputSchema: stripe.PostSubscriptionSchedulesParamsSchema + }) + async PostSubscriptionSchedules( + _params: stripe.PostSubscriptionSchedulesParams + ): Promise { + return this.ky + .post('/v1/subscription_schedules') + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_subscription_schedules_schedule', + description: + '

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.

.', + inputSchema: stripe.GetSubscriptionSchedulesScheduleParamsSchema + }) + async GetSubscriptionSchedulesSchedule( + params: stripe.GetSubscriptionSchedulesScheduleParams + ): Promise { + return this.ky + .get(`/v1/subscription_schedules/${params.schedule}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing subscription schedule.

. + */ + @aiFunction({ + name: 'post_subscription_schedules_schedule', + description: '

Updates an existing subscription schedule.

.', + inputSchema: stripe.PostSubscriptionSchedulesScheduleParamsSchema + }) + async PostSubscriptionSchedulesSchedule( + params: stripe.PostSubscriptionSchedulesScheduleParams + ): Promise { + return this.ky + .post(`/v1/subscription_schedules/${params.schedule}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_subscription_schedules_schedule_cancel', + description: + '

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.

.', + inputSchema: stripe.PostSubscriptionSchedulesScheduleCancelParamsSchema + }) + async PostSubscriptionSchedulesScheduleCancel( + params: stripe.PostSubscriptionSchedulesScheduleCancelParams + ): Promise { + return this.ky + .post(`/v1/subscription_schedules/${params.schedule}/cancel`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_subscription_schedules_schedule_release', + description: + '

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.

.', + inputSchema: stripe.PostSubscriptionSchedulesScheduleReleaseParamsSchema + }) + async PostSubscriptionSchedulesScheduleRelease( + params: stripe.PostSubscriptionSchedulesScheduleReleaseParams + ): Promise { + return this.ky + .post(`/v1/subscription_schedules/${params.schedule}/release`) + .json() + } + + /** + *

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

. + */ + @aiFunction({ + name: 'get_subscriptions', + description: + '

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

.', + inputSchema: stripe.GetSubscriptionsParamsSchema + }) + async GetSubscriptions( + params: stripe.GetSubscriptionsParams + ): Promise { + return this.ky + .get('/v1/subscriptions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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 instead. +Schedules provide the flexibility to model more complex billing configurations that change over time.

. + */ + @aiFunction({ + name: 'post_subscriptions', + description: `

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 instead. +Schedules provide the flexibility to model more complex billing configurations that change over time.

.`, + inputSchema: stripe.PostSubscriptionsParamsSchema + }) + async PostSubscriptions( + _params: stripe.PostSubscriptionsParams + ): Promise { + return this.ky + .post('/v1/subscriptions') + .json() + } + + /** + *

Search for subscriptions you’ve previously created using Stripe’s 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.

. + */ + @aiFunction({ + name: 'get_subscriptions_search', + description: `

Search for subscriptions you’ve previously created using Stripe’s 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.

.`, + inputSchema: stripe.GetSubscriptionsSearchParamsSchema + }) + async GetSubscriptionsSearch( + params: stripe.GetSubscriptionsSearchParams + ): Promise { + return this.ky + .get('/v1/subscriptions/search', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the subscription with the given ID.

. + */ + @aiFunction({ + name: 'get_subscriptions_subscription_exposed_id', + description: '

Retrieves the subscription with the given ID.

.', + inputSchema: stripe.GetSubscriptionsSubscriptionExposedIdParamsSchema + }) + async GetSubscriptionsSubscriptionExposedId( + params: stripe.GetSubscriptionsSubscriptionExposedIdParams + ): Promise { + return this.ky + .get(`/v1/subscriptions/${params.subscription_exposed_id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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 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.

+ +

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.

+ +

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. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.

. + */ + @aiFunction({ + name: 'post_subscriptions_subscription_exposed_id', + description: `

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 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.

+ +

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.

+ +

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. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.

.`, + inputSchema: stripe.PostSubscriptionsSubscriptionExposedIdParamsSchema + }) + async PostSubscriptionsSubscriptionExposedId( + params: stripe.PostSubscriptionsSubscriptionExposedIdParams + ): Promise { + return this.ky + .post(`/v1/subscriptions/${params.subscription_exposed_id}`) + .json() + } + + /** + *

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.

+ +

Any pending invoice items that you’ve created are still charged at the end of the period, unless manually deleted. 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.

+ +

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.

. + */ + @aiFunction({ + name: 'delete_subscriptions_subscription_exposed_id', + description: `

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.

+ +

Any pending invoice items that you’ve created are still charged at the end of the period, unless manually deleted. 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.

+ +

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.

.`, + inputSchema: stripe.DeleteSubscriptionsSubscriptionExposedIdParamsSchema + }) + async DeleteSubscriptionsSubscriptionExposedId( + params: stripe.DeleteSubscriptionsSubscriptionExposedIdParams + ): Promise { + return this.ky + .delete(`/v1/subscriptions/${params.subscription_exposed_id}`) + .json() + } + + /** + *

Removes the currently applied discount on a subscription.

. + */ + @aiFunction({ + name: 'delete_subscriptions_subscription_exposed_id_discount', + description: + '

Removes the currently applied discount on a subscription.

.', + inputSchema: + stripe.DeleteSubscriptionsSubscriptionExposedIdDiscountParamsSchema + }) + async DeleteSubscriptionsSubscriptionExposedIdDiscount( + params: stripe.DeleteSubscriptionsSubscriptionExposedIdDiscountParams + ): Promise { + return this.ky + .delete(`/v1/subscriptions/${params.subscription_exposed_id}/discount`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_subscriptions_subscription_resume', + description: + '

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.

.', + inputSchema: stripe.PostSubscriptionsSubscriptionResumeParamsSchema + }) + async PostSubscriptionsSubscriptionResume( + params: stripe.PostSubscriptionsSubscriptionResumeParams + ): Promise { + return this.ky + .post(`/v1/subscriptions/${params.subscription}/resume`) + .json() + } + + /** + *

Calculates tax based on the input and returns a Tax Calculation object.

. + */ + @aiFunction({ + name: 'post_tax_calculations', + description: + '

Calculates tax based on the input and returns a Tax Calculation object.

.', + inputSchema: stripe.PostTaxCalculationsParamsSchema + }) + async PostTaxCalculations( + _params: stripe.PostTaxCalculationsParams + ): Promise { + return this.ky + .post('/v1/tax/calculations') + .json() + } + + /** + *

Retrieves a Tax Calculation object, if the calculation hasn’t expired.

. + */ + @aiFunction({ + name: 'get_tax_calculations_calculation', + description: + '

Retrieves a Tax Calculation object, if the calculation hasn’t expired.

.', + inputSchema: stripe.GetTaxCalculationsCalculationParamsSchema + }) + async GetTaxCalculationsCalculation( + params: stripe.GetTaxCalculationsCalculationParams + ): Promise { + return this.ky + .get(`/v1/tax/calculations/${params.calculation}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.

. + */ + @aiFunction({ + name: 'get_tax_calculations_calculation_line_items', + description: + '

Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.

.', + inputSchema: stripe.GetTaxCalculationsCalculationLineItemsParamsSchema + }) + async GetTaxCalculationsCalculationLineItems( + params: stripe.GetTaxCalculationsCalculationLineItemsParams + ): Promise { + return this.ky + .get(`/v1/tax/calculations/${params.calculation}/line_items`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

Returns a list of Tax Registration objects.

. + */ + @aiFunction({ + name: 'get_tax_registrations', + description: + '

Returns a list of Tax Registration objects.

.', + inputSchema: stripe.GetTaxRegistrationsParamsSchema + }) + async GetTaxRegistrations( + params: stripe.GetTaxRegistrationsParams + ): Promise { + return this.ky + .get('/v1/tax/registrations', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new Tax Registration object.

. + */ + @aiFunction({ + name: 'post_tax_registrations', + description: '

Creates a new Tax Registration object.

.', + inputSchema: stripe.PostTaxRegistrationsParamsSchema + }) + async PostTaxRegistrations( + _params: stripe.PostTaxRegistrationsParams + ): Promise { + return this.ky + .post('/v1/tax/registrations') + .json() + } + + /** + *

Returns a Tax Registration object.

. + */ + @aiFunction({ + name: 'get_tax_registrations_id', + description: '

Returns a Tax Registration object.

.', + inputSchema: stripe.GetTaxRegistrationsIdParamsSchema + }) + async GetTaxRegistrationsId( + params: stripe.GetTaxRegistrationsIdParams + ): Promise { + return this.ky + .get(`/v1/tax/registrations/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_tax_registrations_id', + description: `

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.

.`, + inputSchema: stripe.PostTaxRegistrationsIdParamsSchema + }) + async PostTaxRegistrationsId( + params: stripe.PostTaxRegistrationsIdParams + ): Promise { + return this.ky + .post(`/v1/tax/registrations/${params.id}`) + .json() + } + + /** + *

Retrieves Tax Settings for a merchant.

. + */ + @aiFunction({ + name: 'get_tax_settings', + description: '

Retrieves Tax Settings for a merchant.

.', + inputSchema: stripe.GetTaxSettingsParamsSchema + }) + async GetTaxSettings( + params: stripe.GetTaxSettingsParams + ): Promise { + return this.ky + .get('/v1/tax/settings', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

. + */ + @aiFunction({ + name: 'post_tax_settings', + description: + '

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

.', + inputSchema: stripe.PostTaxSettingsParamsSchema + }) + async PostTaxSettings( + _params: stripe.PostTaxSettingsParams + ): Promise { + return this.ky + .post('/v1/tax/settings') + .json() + } + + /** + *

Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.

. + */ + @aiFunction({ + name: 'post_tax_transactions_create_from_calculation', + description: + '

Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.

.', + inputSchema: stripe.PostTaxTransactionsCreateFromCalculationParamsSchema + }) + async PostTaxTransactionsCreateFromCalculation( + _params: stripe.PostTaxTransactionsCreateFromCalculationParams + ): Promise { + return this.ky + .post('/v1/tax/transactions/create_from_calculation') + .json() + } + + /** + *

Partially or fully reverses a previously created Transaction.

. + */ + @aiFunction({ + name: 'post_tax_transactions_create_reversal', + description: + '

Partially or fully reverses a previously created Transaction.

.', + inputSchema: stripe.PostTaxTransactionsCreateReversalParamsSchema + }) + async PostTaxTransactionsCreateReversal( + _params: stripe.PostTaxTransactionsCreateReversalParams + ): Promise { + return this.ky + .post('/v1/tax/transactions/create_reversal') + .json() + } + + /** + *

Retrieves a Tax Transaction object.

. + */ + @aiFunction({ + name: 'get_tax_transactions_transaction', + description: '

Retrieves a Tax Transaction object.

.', + inputSchema: stripe.GetTaxTransactionsTransactionParamsSchema + }) + async GetTaxTransactionsTransaction( + params: stripe.GetTaxTransactionsTransactionParams + ): Promise { + return this.ky + .get(`/v1/tax/transactions/${params.transaction}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves the line items of a committed standalone transaction as a collection.

. + */ + @aiFunction({ + name: 'get_tax_transactions_transaction_line_items', + description: + '

Retrieves the line items of a committed standalone transaction as a collection.

.', + inputSchema: stripe.GetTaxTransactionsTransactionLineItemsParamsSchema + }) + async GetTaxTransactionsTransactionLineItems( + params: stripe.GetTaxTransactionsTransactionLineItemsParams + ): Promise { + return this.ky + .get(`/v1/tax/transactions/${params.transaction}/line_items`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

A list of all tax codes available to add to Products in order to allow specific tax calculations.

. + */ + @aiFunction({ + name: 'get_tax_codes', + description: + '

A list of all tax codes available to add to Products in order to allow specific tax calculations.

.', + inputSchema: stripe.GetTaxCodesParamsSchema + }) + async GetTaxCodes( + params: stripe.GetTaxCodesParams + ): Promise { + return this.ky + .get('/v1/tax_codes', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

. + */ + @aiFunction({ + name: 'get_tax_codes_id', + description: + '

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

.', + inputSchema: stripe.GetTaxCodesIdParamsSchema + }) + async GetTaxCodesId( + params: stripe.GetTaxCodesIdParams + ): Promise { + return this.ky + .get(`/v1/tax_codes/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of tax IDs.

. + */ + @aiFunction({ + name: 'get_tax_ids', + description: '

Returns a list of tax IDs.

.', + inputSchema: stripe.GetTaxIdsParamsSchema + }) + async GetTaxIds( + params: stripe.GetTaxIdsParams + ): Promise { + return this.ky + .get('/v1/tax_ids', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new account or customer tax_id object.

. + */ + @aiFunction({ + name: 'post_tax_ids', + description: + '

Creates a new account or customer tax_id object.

.', + inputSchema: stripe.PostTaxIdsParamsSchema + }) + async PostTaxIds( + _params: stripe.PostTaxIdsParams + ): Promise { + return this.ky.post('/v1/tax_ids').json() + } + + /** + *

Retrieves an account or customer tax_id object.

. + */ + @aiFunction({ + name: 'get_tax_ids_id', + description: + '

Retrieves an account or customer tax_id object.

.', + inputSchema: stripe.GetTaxIdsIdParamsSchema + }) + async GetTaxIdsId( + params: stripe.GetTaxIdsIdParams + ): Promise { + return this.ky + .get(`/v1/tax_ids/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Deletes an existing account or customer tax_id object.

. + */ + @aiFunction({ + name: 'delete_tax_ids_id', + description: + '

Deletes an existing account or customer tax_id object.

.', + inputSchema: stripe.DeleteTaxIdsIdParamsSchema + }) + async DeleteTaxIdsId( + params: stripe.DeleteTaxIdsIdParams + ): Promise { + return this.ky + .delete(`/v1/tax_ids/${params.id}`) + .json() + } + + /** + *

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

. + */ + @aiFunction({ + name: 'get_tax_rates', + description: + '

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

.', + inputSchema: stripe.GetTaxRatesParamsSchema + }) + async GetTaxRates( + params: stripe.GetTaxRatesParams + ): Promise { + return this.ky + .get('/v1/tax_rates', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new tax rate.

. + */ + @aiFunction({ + name: 'post_tax_rates', + description: '

Creates a new tax rate.

.', + inputSchema: stripe.PostTaxRatesParamsSchema + }) + async PostTaxRates( + _params: stripe.PostTaxRatesParams + ): Promise { + return this.ky.post('/v1/tax_rates').json() + } + + /** + *

Retrieves a tax rate with the given ID

. + */ + @aiFunction({ + name: 'get_tax_rates_tax_rate', + description: '

Retrieves a tax rate with the given ID

.', + inputSchema: stripe.GetTaxRatesTaxRateParamsSchema + }) + async GetTaxRatesTaxRate( + params: stripe.GetTaxRatesTaxRateParams + ): Promise { + return this.ky + .get(`/v1/tax_rates/${params.tax_rate}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates an existing tax rate.

. + */ + @aiFunction({ + name: 'post_tax_rates_tax_rate', + description: '

Updates an existing tax rate.

.', + inputSchema: stripe.PostTaxRatesTaxRateParamsSchema + }) + async PostTaxRatesTaxRate( + params: stripe.PostTaxRatesTaxRateParams + ): Promise { + return this.ky + .post(`/v1/tax_rates/${params.tax_rate}`) + .json() + } + + /** + *

Returns a list of Configuration objects.

. + */ + @aiFunction({ + name: 'get_terminal_configurations', + description: + '

Returns a list of Configuration objects.

.', + inputSchema: stripe.GetTerminalConfigurationsParamsSchema + }) + async GetTerminalConfigurations( + params: stripe.GetTerminalConfigurationsParams + ): Promise { + return this.ky + .get('/v1/terminal/configurations', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new Configuration object.

. + */ + @aiFunction({ + name: 'post_terminal_configurations', + description: '

Creates a new Configuration object.

.', + inputSchema: stripe.PostTerminalConfigurationsParamsSchema + }) + async PostTerminalConfigurations( + _params: stripe.PostTerminalConfigurationsParams + ): Promise { + return this.ky + .post('/v1/terminal/configurations') + .json() + } + + /** + *

Retrieves a Configuration object.

. + */ + @aiFunction({ + name: 'get_terminal_configurations_configuration', + description: '

Retrieves a Configuration object.

.', + inputSchema: stripe.GetTerminalConfigurationsConfigurationParamsSchema + }) + async GetTerminalConfigurationsConfiguration( + params: stripe.GetTerminalConfigurationsConfigurationParams + ): Promise { + return this.ky + .get(`/v1/terminal/configurations/${params.configuration}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a new Configuration object.

. + */ + @aiFunction({ + name: 'post_terminal_configurations_configuration', + description: '

Updates a new Configuration object.

.', + inputSchema: stripe.PostTerminalConfigurationsConfigurationParamsSchema + }) + async PostTerminalConfigurationsConfiguration( + params: stripe.PostTerminalConfigurationsConfigurationParams + ): Promise { + return this.ky + .post(`/v1/terminal/configurations/${params.configuration}`) + .json() + } + + /** + *

Deletes a Configuration object.

. + */ + @aiFunction({ + name: 'delete_terminal_configurations_configuration', + description: '

Deletes a Configuration object.

.', + inputSchema: stripe.DeleteTerminalConfigurationsConfigurationParamsSchema + }) + async DeleteTerminalConfigurationsConfiguration( + params: stripe.DeleteTerminalConfigurationsConfigurationParams + ): Promise { + return this.ky + .delete(`/v1/terminal/configurations/${params.configuration}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_terminal_connection_tokens', + description: + '

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.

.', + inputSchema: stripe.PostTerminalConnectionTokensParamsSchema + }) + async PostTerminalConnectionTokens( + _params: stripe.PostTerminalConnectionTokensParams + ): Promise { + return this.ky + .post('/v1/terminal/connection_tokens') + .json() + } + + /** + *

Returns a list of Location objects.

. + */ + @aiFunction({ + name: 'get_terminal_locations', + description: '

Returns a list of Location objects.

.', + inputSchema: stripe.GetTerminalLocationsParamsSchema + }) + async GetTerminalLocations( + params: stripe.GetTerminalLocationsParams + ): Promise { + return this.ky + .get('/v1/terminal/locations', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new Location object. +For further details, including which address fields are required in each country, see the Manage locations guide.

. + */ + @aiFunction({ + name: 'post_terminal_locations', + description: `

Creates a new Location object. +For further details, including which address fields are required in each country, see the Manage locations guide.

.`, + inputSchema: stripe.PostTerminalLocationsParamsSchema + }) + async PostTerminalLocations( + _params: stripe.PostTerminalLocationsParams + ): Promise { + return this.ky + .post('/v1/terminal/locations') + .json() + } + + /** + *

Retrieves a Location object.

. + */ + @aiFunction({ + name: 'get_terminal_locations_location', + description: '

Retrieves a Location object.

.', + inputSchema: stripe.GetTerminalLocationsLocationParamsSchema + }) + async GetTerminalLocationsLocation( + params: stripe.GetTerminalLocationsLocationParams + ): Promise { + return this.ky + .get(`/v1/terminal/locations/${params.location}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_terminal_locations_location', + description: + '

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostTerminalLocationsLocationParamsSchema + }) + async PostTerminalLocationsLocation( + params: stripe.PostTerminalLocationsLocationParams + ): Promise { + return this.ky + .post(`/v1/terminal/locations/${params.location}`) + .json() + } + + /** + *

Deletes a Location object.

. + */ + @aiFunction({ + name: 'delete_terminal_locations_location', + description: '

Deletes a Location object.

.', + inputSchema: stripe.DeleteTerminalLocationsLocationParamsSchema + }) + async DeleteTerminalLocationsLocation( + params: stripe.DeleteTerminalLocationsLocationParams + ): Promise { + return this.ky + .delete(`/v1/terminal/locations/${params.location}`) + .json() + } + + /** + *

Returns a list of Reader objects.

. + */ + @aiFunction({ + name: 'get_terminal_readers', + description: '

Returns a list of Reader objects.

.', + inputSchema: stripe.GetTerminalReadersParamsSchema + }) + async GetTerminalReaders( + params: stripe.GetTerminalReadersParams + ): Promise { + return this.ky + .get('/v1/terminal/readers', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new Reader object.

. + */ + @aiFunction({ + name: 'post_terminal_readers', + description: '

Creates a new Reader object.

.', + inputSchema: stripe.PostTerminalReadersParamsSchema + }) + async PostTerminalReaders( + _params: stripe.PostTerminalReadersParams + ): Promise { + return this.ky + .post('/v1/terminal/readers') + .json() + } + + /** + *

Retrieves a Reader object.

. + */ + @aiFunction({ + name: 'get_terminal_readers_reader', + description: '

Retrieves a Reader object.

.', + inputSchema: stripe.GetTerminalReadersReaderParamsSchema + }) + async GetTerminalReadersReader( + params: stripe.GetTerminalReadersReaderParams + ): Promise { + return this.ky + .get(`/v1/terminal/readers/${params.reader}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

. + */ + @aiFunction({ + name: 'post_terminal_readers_reader', + description: + '

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

.', + inputSchema: stripe.PostTerminalReadersReaderParamsSchema + }) + async PostTerminalReadersReader( + params: stripe.PostTerminalReadersReaderParams + ): Promise { + return this.ky + .post(`/v1/terminal/readers/${params.reader}`) + .json() + } + + /** + *

Deletes a Reader object.

. + */ + @aiFunction({ + name: 'delete_terminal_readers_reader', + description: '

Deletes a Reader object.

.', + inputSchema: stripe.DeleteTerminalReadersReaderParamsSchema + }) + async DeleteTerminalReadersReader( + params: stripe.DeleteTerminalReadersReaderParams + ): Promise { + return this.ky + .delete(`/v1/terminal/readers/${params.reader}`) + .json() + } + + /** + *

Cancels the current reader action.

. + */ + @aiFunction({ + name: 'post_terminal_readers_reader_cancel_action', + description: '

Cancels the current reader action.

.', + inputSchema: stripe.PostTerminalReadersReaderCancelActionParamsSchema + }) + async PostTerminalReadersReaderCancelAction( + params: stripe.PostTerminalReadersReaderCancelActionParams + ): Promise { + return this.ky + .post(`/v1/terminal/readers/${params.reader}/cancel_action`) + .json() + } + + /** + *

Initiates a payment flow on a Reader.

. + */ + @aiFunction({ + name: 'post_terminal_readers_reader_process_payment_intent', + description: '

Initiates a payment flow on a Reader.

.', + inputSchema: + stripe.PostTerminalReadersReaderProcessPaymentIntentParamsSchema + }) + async PostTerminalReadersReaderProcessPaymentIntent( + params: stripe.PostTerminalReadersReaderProcessPaymentIntentParams + ): Promise { + return this.ky + .post(`/v1/terminal/readers/${params.reader}/process_payment_intent`) + .json() + } + + /** + *

Initiates a setup intent flow on a Reader.

. + */ + @aiFunction({ + name: 'post_terminal_readers_reader_process_setup_intent', + description: '

Initiates a setup intent flow on a Reader.

.', + inputSchema: stripe.PostTerminalReadersReaderProcessSetupIntentParamsSchema + }) + async PostTerminalReadersReaderProcessSetupIntent( + params: stripe.PostTerminalReadersReaderProcessSetupIntentParams + ): Promise { + return this.ky + .post(`/v1/terminal/readers/${params.reader}/process_setup_intent`) + .json() + } + + /** + *

Initiates a refund on a Reader

. + */ + @aiFunction({ + name: 'post_terminal_readers_reader_refund_payment', + description: '

Initiates a refund on a Reader

.', + inputSchema: stripe.PostTerminalReadersReaderRefundPaymentParamsSchema + }) + async PostTerminalReadersReaderRefundPayment( + params: stripe.PostTerminalReadersReaderRefundPaymentParams + ): Promise { + return this.ky + .post(`/v1/terminal/readers/${params.reader}/refund_payment`) + .json() + } + + /** + *

Sets reader display to show cart details.

. + */ + @aiFunction({ + name: 'post_terminal_readers_reader_set_reader_display', + description: '

Sets reader display to show cart details.

.', + inputSchema: stripe.PostTerminalReadersReaderSetReaderDisplayParamsSchema + }) + async PostTerminalReadersReaderSetReaderDisplay( + params: stripe.PostTerminalReadersReaderSetReaderDisplayParams + ): Promise { + return this.ky + .post(`/v1/terminal/readers/${params.reader}/set_reader_display`) + .json() + } + + /** + *

Creates a test mode Confirmation Token server side for your integration tests.

. + */ + @aiFunction({ + name: 'post_test_helpers_confirmation_tokens', + description: + '

Creates a test mode Confirmation Token server side for your integration tests.

.', + inputSchema: stripe.PostTestHelpersConfirmationTokensParamsSchema + }) + async PostTestHelpersConfirmationTokens( + _params: stripe.PostTestHelpersConfirmationTokensParams + ): Promise { + return this.ky + .post('/v1/test_helpers/confirmation_tokens') + .json() + } + + /** + *

Create an incoming testmode bank transfer

. + */ + @aiFunction({ + name: 'post_test_helpers_customers_customer_fund_cash_balance', + description: '

Create an incoming testmode bank transfer

.', + inputSchema: + stripe.PostTestHelpersCustomersCustomerFundCashBalanceParamsSchema + }) + async PostTestHelpersCustomersCustomerFundCashBalance( + params: stripe.PostTestHelpersCustomersCustomerFundCashBalanceParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/customers/${params.customer}/fund_cash_balance` + ) + .json() + } + + /** + *

Create a test-mode authorization.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations', + description: '

Create a test-mode authorization.

.', + inputSchema: stripe.PostTestHelpersIssuingAuthorizationsParamsSchema + }) + async PostTestHelpersIssuingAuthorizations( + _params: stripe.PostTestHelpersIssuingAuthorizationsParams + ): Promise { + return this.ky + .post('/v1/test_helpers/issuing/authorizations') + .json() + } + + /** + *

Capture a test-mode authorization.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations_authorization_capture', + description: '

Capture a test-mode authorization.

.', + inputSchema: + stripe.PostTestHelpersIssuingAuthorizationsAuthorizationCaptureParamsSchema + }) + async PostTestHelpersIssuingAuthorizationsAuthorizationCapture( + params: stripe.PostTestHelpersIssuingAuthorizationsAuthorizationCaptureParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/authorizations/${params.authorization}/capture` + ) + .json() + } + + /** + *

Expire a test-mode Authorization.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations_authorization_expire', + description: '

Expire a test-mode Authorization.

.', + inputSchema: + stripe.PostTestHelpersIssuingAuthorizationsAuthorizationExpireParamsSchema + }) + async PostTestHelpersIssuingAuthorizationsAuthorizationExpire( + params: stripe.PostTestHelpersIssuingAuthorizationsAuthorizationExpireParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/authorizations/${params.authorization}/expire` + ) + .json() + } + + /** + *

Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations_authorization_finalize_amount', + description: + '

Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.

.', + inputSchema: + stripe.PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountParamsSchema + }) + async PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmount( + params: stripe.PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmountParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/authorizations/${params.authorization}/finalize_amount` + ) + .json() + } + + /** + *

Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations_authorization_fraud_challenges_respond', + description: + '

Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.

.', + inputSchema: + stripe.PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondParamsSchema + }) + async PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespond( + params: stripe.PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespondParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/authorizations/${params.authorization}/fraud_challenges/respond` + ) + .json() + } + + /** + *

Increment a test-mode Authorization.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations_authorization_increment', + description: '

Increment a test-mode Authorization.

.', + inputSchema: + stripe.PostTestHelpersIssuingAuthorizationsAuthorizationIncrementParamsSchema + }) + async PostTestHelpersIssuingAuthorizationsAuthorizationIncrement( + params: stripe.PostTestHelpersIssuingAuthorizationsAuthorizationIncrementParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/authorizations/${params.authorization}/increment` + ) + .json() + } + + /** + *

Reverse a test-mode Authorization.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_authorizations_authorization_reverse', + description: '

Reverse a test-mode Authorization.

.', + inputSchema: + stripe.PostTestHelpersIssuingAuthorizationsAuthorizationReverseParamsSchema + }) + async PostTestHelpersIssuingAuthorizationsAuthorizationReverse( + params: stripe.PostTestHelpersIssuingAuthorizationsAuthorizationReverseParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/authorizations/${params.authorization}/reverse` + ) + .json() + } + + /** + *

Updates the shipping status of the specified Issuing Card object to delivered.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_cards_card_shipping_deliver', + description: + '

Updates the shipping status of the specified Issuing Card object to delivered.

.', + inputSchema: + stripe.PostTestHelpersIssuingCardsCardShippingDeliverParamsSchema + }) + async PostTestHelpersIssuingCardsCardShippingDeliver( + params: stripe.PostTestHelpersIssuingCardsCardShippingDeliverParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/issuing/cards/${params.card}/shipping/deliver`) + .json() + } + + /** + *

Updates the shipping status of the specified Issuing Card object to failure.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_cards_card_shipping_fail', + description: + '

Updates the shipping status of the specified Issuing Card object to failure.

.', + inputSchema: stripe.PostTestHelpersIssuingCardsCardShippingFailParamsSchema + }) + async PostTestHelpersIssuingCardsCardShippingFail( + params: stripe.PostTestHelpersIssuingCardsCardShippingFailParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/issuing/cards/${params.card}/shipping/fail`) + .json() + } + + /** + *

Updates the shipping status of the specified Issuing Card object to returned.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_cards_card_shipping_return', + description: + '

Updates the shipping status of the specified Issuing Card object to returned.

.', + inputSchema: + stripe.PostTestHelpersIssuingCardsCardShippingReturnParamsSchema + }) + async PostTestHelpersIssuingCardsCardShippingReturn( + params: stripe.PostTestHelpersIssuingCardsCardShippingReturnParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/issuing/cards/${params.card}/shipping/return`) + .json() + } + + /** + *

Updates the shipping status of the specified Issuing Card object to shipped.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_cards_card_shipping_ship', + description: + '

Updates the shipping status of the specified Issuing Card object to shipped.

.', + inputSchema: stripe.PostTestHelpersIssuingCardsCardShippingShipParamsSchema + }) + async PostTestHelpersIssuingCardsCardShippingShip( + params: stripe.PostTestHelpersIssuingCardsCardShippingShipParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/issuing/cards/${params.card}/shipping/ship`) + .json() + } + + /** + *

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_cards_card_shipping_submit', + description: + '

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.

.', + inputSchema: + stripe.PostTestHelpersIssuingCardsCardShippingSubmitParamsSchema + }) + async PostTestHelpersIssuingCardsCardShippingSubmit( + params: stripe.PostTestHelpersIssuingCardsCardShippingSubmitParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/issuing/cards/${params.card}/shipping/submit`) + .json() + } + + /** + *

Updates the status of the specified testmode personalization design object to active.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_personalization_designs_personalization_design_activate', + description: + '

Updates the status of the specified testmode personalization design object to active.

.', + inputSchema: + stripe.PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamsSchema + }) + async PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate( + params: stripe.PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/personalization_designs/${params.personalization_design}/activate` + ) + .json() + } + + /** + *

Updates the status of the specified testmode personalization design object to inactive.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_personalization_designs_personalization_design_deactivate', + description: + '

Updates the status of the specified testmode personalization design object to inactive.

.', + inputSchema: + stripe.PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamsSchema + }) + async PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate( + params: stripe.PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/personalization_designs/${params.personalization_design}/deactivate` + ) + .json() + } + + /** + *

Updates the status of the specified testmode personalization design object to rejected.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_personalization_designs_personalization_design_reject', + description: + '

Updates the status of the specified testmode personalization design object to rejected.

.', + inputSchema: + stripe.PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamsSchema + }) + async PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject( + params: stripe.PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/personalization_designs/${params.personalization_design}/reject` + ) + .json() + } + + /** + *

Allows the user to create an Issuing settlement.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_settlements', + description: '

Allows the user to create an Issuing settlement.

.', + inputSchema: stripe.PostTestHelpersIssuingSettlementsParamsSchema + }) + async PostTestHelpersIssuingSettlements( + _params: stripe.PostTestHelpersIssuingSettlementsParams + ): Promise { + return this.ky + .post('/v1/test_helpers/issuing/settlements') + .json() + } + + /** + *

Allows the user to mark an Issuing settlement as complete.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_settlements_settlement_complete', + description: + '

Allows the user to mark an Issuing settlement as complete.

.', + inputSchema: + stripe.PostTestHelpersIssuingSettlementsSettlementCompleteParamsSchema + }) + async PostTestHelpersIssuingSettlementsSettlementComplete( + params: stripe.PostTestHelpersIssuingSettlementsSettlementCompleteParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/settlements/${params.settlement}/complete` + ) + .json() + } + + /** + *

Allows the user to capture an arbitrary amount, also known as a forced capture.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_transactions_create_force_capture', + description: + '

Allows the user to capture an arbitrary amount, also known as a forced capture.

.', + inputSchema: + stripe.PostTestHelpersIssuingTransactionsCreateForceCaptureParamsSchema + }) + async PostTestHelpersIssuingTransactionsCreateForceCapture( + _params: stripe.PostTestHelpersIssuingTransactionsCreateForceCaptureParams + ): Promise { + return this.ky + .post('/v1/test_helpers/issuing/transactions/create_force_capture') + .json() + } + + /** + *

Allows the user to refund an arbitrary amount, also known as a unlinked refund.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_transactions_create_unlinked_refund', + description: + '

Allows the user to refund an arbitrary amount, also known as a unlinked refund.

.', + inputSchema: + stripe.PostTestHelpersIssuingTransactionsCreateUnlinkedRefundParamsSchema + }) + async PostTestHelpersIssuingTransactionsCreateUnlinkedRefund( + _params: stripe.PostTestHelpersIssuingTransactionsCreateUnlinkedRefundParams + ): Promise { + return this.ky + .post('/v1/test_helpers/issuing/transactions/create_unlinked_refund') + .json() + } + + /** + *

Refund a test-mode Transaction.

. + */ + @aiFunction({ + name: 'post_test_helpers_issuing_transactions_transaction_refund', + description: '

Refund a test-mode Transaction.

.', + inputSchema: + stripe.PostTestHelpersIssuingTransactionsTransactionRefundParamsSchema + }) + async PostTestHelpersIssuingTransactionsTransactionRefund( + params: stripe.PostTestHelpersIssuingTransactionsTransactionRefundParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/issuing/transactions/${params.transaction}/refund` + ) + .json() + } + + /** + *

Expire a refund with a status of requires_action.

. + */ + @aiFunction({ + name: 'post_test_helpers_refunds_refund_expire', + description: + '

Expire a refund with a status of requires_action.

.', + inputSchema: stripe.PostTestHelpersRefundsRefundExpireParamsSchema + }) + async PostTestHelpersRefundsRefundExpire( + params: stripe.PostTestHelpersRefundsRefundExpireParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/refunds/${params.refund}/expire`) + .json() + } + + /** + *

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

. + */ + @aiFunction({ + name: 'post_test_helpers_terminal_readers_reader_present_payment_method', + description: + '

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

.', + inputSchema: + stripe.PostTestHelpersTerminalReadersReaderPresentPaymentMethodParamsSchema + }) + async PostTestHelpersTerminalReadersReaderPresentPaymentMethod( + params: stripe.PostTestHelpersTerminalReadersReaderPresentPaymentMethodParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/terminal/readers/${params.reader}/present_payment_method` + ) + .json() + } + + /** + *

Returns a list of your test clocks.

. + */ + @aiFunction({ + name: 'get_test_helpers_test_clocks', + description: '

Returns a list of your test clocks.

.', + inputSchema: stripe.GetTestHelpersTestClocksParamsSchema + }) + async GetTestHelpersTestClocks( + params: stripe.GetTestHelpersTestClocksParams + ): Promise { + return this.ky + .get('/v1/test_helpers/test_clocks', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new test clock that can be attached to new customers and quotes.

. + */ + @aiFunction({ + name: 'post_test_helpers_test_clocks', + description: + '

Creates a new test clock that can be attached to new customers and quotes.

.', + inputSchema: stripe.PostTestHelpersTestClocksParamsSchema + }) + async PostTestHelpersTestClocks( + _params: stripe.PostTestHelpersTestClocksParams + ): Promise { + return this.ky + .post('/v1/test_helpers/test_clocks') + .json() + } + + /** + *

Retrieves a test clock.

. + */ + @aiFunction({ + name: 'get_test_helpers_test_clocks_test_clock', + description: '

Retrieves a test clock.

.', + inputSchema: stripe.GetTestHelpersTestClocksTestClockParamsSchema + }) + async GetTestHelpersTestClocksTestClock( + params: stripe.GetTestHelpersTestClocksTestClockParams + ): Promise { + return this.ky + .get(`/v1/test_helpers/test_clocks/${params.test_clock}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Deletes a test clock.

. + */ + @aiFunction({ + name: 'delete_test_helpers_test_clocks_test_clock', + description: '

Deletes a test clock.

.', + inputSchema: stripe.DeleteTestHelpersTestClocksTestClockParamsSchema + }) + async DeleteTestHelpersTestClocksTestClock( + params: stripe.DeleteTestHelpersTestClocksTestClockParams + ): Promise { + return this.ky + .delete(`/v1/test_helpers/test_clocks/${params.test_clock}`) + .json() + } + + /** + *

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

. + */ + @aiFunction({ + name: 'post_test_helpers_test_clocks_test_clock_advance', + description: + '

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

.', + inputSchema: stripe.PostTestHelpersTestClocksTestClockAdvanceParamsSchema + }) + async PostTestHelpersTestClocksTestClockAdvance( + params: stripe.PostTestHelpersTestClocksTestClockAdvanceParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/test_clocks/${params.test_clock}/advance`) + .json() + } + + /** + *

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_inbound_transfers_id_fail', + description: + '

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryInboundTransfersIdFailParamsSchema + }) + async PostTestHelpersTreasuryInboundTransfersIdFail( + params: stripe.PostTestHelpersTreasuryInboundTransfersIdFailParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/treasury/inbound_transfers/${params.id}/fail`) + .json() + } + + /** + *

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_inbound_transfers_id_return', + description: + '

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryInboundTransfersIdReturnParamsSchema + }) + async PostTestHelpersTreasuryInboundTransfersIdReturn( + params: stripe.PostTestHelpersTreasuryInboundTransfersIdReturnParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/inbound_transfers/${params.id}/return` + ) + .json() + } + + /** + *

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_inbound_transfers_id_succeed', + description: + '

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryInboundTransfersIdSucceedParamsSchema + }) + async PostTestHelpersTreasuryInboundTransfersIdSucceed( + params: stripe.PostTestHelpersTreasuryInboundTransfersIdSucceedParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/inbound_transfers/${params.id}/succeed` + ) + .json() + } + + /** + *

Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_payments_id', + description: + '

Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.

.', + inputSchema: stripe.PostTestHelpersTreasuryOutboundPaymentsIdParamsSchema + }) + async PostTestHelpersTreasuryOutboundPaymentsId( + params: stripe.PostTestHelpersTreasuryOutboundPaymentsIdParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/treasury/outbound_payments/${params.id}`) + .json() + } + + /** + *

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_payments_id_fail', + description: + '

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundPaymentsIdFailParamsSchema + }) + async PostTestHelpersTreasuryOutboundPaymentsIdFail( + params: stripe.PostTestHelpersTreasuryOutboundPaymentsIdFailParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/treasury/outbound_payments/${params.id}/fail`) + .json() + } + + /** + *

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_payments_id_post', + description: + '

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundPaymentsIdPostParamsSchema + }) + async PostTestHelpersTreasuryOutboundPaymentsIdPost( + params: stripe.PostTestHelpersTreasuryOutboundPaymentsIdPostParams + ): Promise { + return this.ky + .post(`/v1/test_helpers/treasury/outbound_payments/${params.id}/post`) + .json() + } + + /** + *

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_payments_id_return', + description: + '

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundPaymentsIdReturnParamsSchema + }) + async PostTestHelpersTreasuryOutboundPaymentsIdReturn( + params: stripe.PostTestHelpersTreasuryOutboundPaymentsIdReturnParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/outbound_payments/${params.id}/return` + ) + .json() + } + + /** + *

Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_transfers_outbound_transfer', + description: + '

Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferParamsSchema + }) + async PostTestHelpersTreasuryOutboundTransfersOutboundTransfer( + params: stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/outbound_transfers/${params.outbound_transfer}` + ) + .json() + } + + /** + *

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_transfers_outbound_transfer_fail', + description: + '

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailParamsSchema + }) + async PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail( + params: stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferFailParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/outbound_transfers/${params.outbound_transfer}/fail` + ) + .json() + } + + /** + *

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_transfers_outbound_transfer_post', + description: + '

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostParamsSchema + }) + async PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost( + params: stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferPostParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/outbound_transfers/${params.outbound_transfer}/post` + ) + .json() + } + + /** + *

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_outbound_transfers_outbound_transfer_return', + description: + '

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

.', + inputSchema: + stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnParamsSchema + }) + async PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn( + params: stripe.PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturnParams + ): Promise { + return this.ky + .post( + `/v1/test_helpers/treasury/outbound_transfers/${params.outbound_transfer}/return` + ) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_received_credits', + description: + '

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.

.', + inputSchema: stripe.PostTestHelpersTreasuryReceivedCreditsParamsSchema + }) + async PostTestHelpersTreasuryReceivedCredits( + _params: stripe.PostTestHelpersTreasuryReceivedCreditsParams + ): Promise { + return this.ky + .post('/v1/test_helpers/treasury/received_credits') + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_test_helpers_treasury_received_debits', + description: + '

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.

.', + inputSchema: stripe.PostTestHelpersTreasuryReceivedDebitsParamsSchema + }) + async PostTestHelpersTreasuryReceivedDebits( + _params: stripe.PostTestHelpersTreasuryReceivedDebitsParams + ): Promise { + return this.ky + .post('/v1/test_helpers/treasury/received_debits') + .json() + } + + /** + *

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 where controller.requirement_collection is application, which includes Custom accounts.

. + */ + @aiFunction({ + name: 'post_tokens', + description: `

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 where controller.requirement_collection is application, which includes Custom accounts.

.`, + inputSchema: stripe.PostTokensParamsSchema + }) + async PostTokens( + _params: stripe.PostTokensParams + ): Promise { + return this.ky.post('/v1/tokens').json() + } + + /** + *

Retrieves the token with the given ID.

. + */ + @aiFunction({ + name: 'get_tokens_token', + description: '

Retrieves the token with the given ID.

.', + inputSchema: stripe.GetTokensTokenParamsSchema + }) + async GetTokensToken( + params: stripe.GetTokensTokenParams + ): Promise { + return this.ky + .get(`/v1/tokens/${params.token}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of top-ups.

. + */ + @aiFunction({ + name: 'get_topups', + description: '

Returns a list of top-ups.

.', + inputSchema: stripe.GetTopupsParamsSchema + }) + async GetTopups( + params: stripe.GetTopupsParams + ): Promise { + return this.ky + .get('/v1/topups', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Top up the balance of an account

. + */ + @aiFunction({ + name: 'post_topups', + description: '

Top up the balance of an account

.', + inputSchema: stripe.PostTopupsParamsSchema + }) + async PostTopups( + _params: stripe.PostTopupsParams + ): Promise { + return this.ky.post('/v1/topups').json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_topups_topup', + description: + '

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.

.', + inputSchema: stripe.GetTopupsTopupParamsSchema + }) + async GetTopupsTopup( + params: stripe.GetTopupsTopupParams + ): Promise { + return this.ky + .get(`/v1/topups/${params.topup}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the metadata of a top-up. Other top-up details are not editable by design.

. + */ + @aiFunction({ + name: 'post_topups_topup', + description: + '

Updates the metadata of a top-up. Other top-up details are not editable by design.

.', + inputSchema: stripe.PostTopupsTopupParamsSchema + }) + async PostTopupsTopup( + params: stripe.PostTopupsTopupParams + ): Promise { + return this.ky + .post(`/v1/topups/${params.topup}`) + .json() + } + + /** + *

Cancels a top-up. Only pending top-ups can be canceled.

. + */ + @aiFunction({ + name: 'post_topups_topup_cancel', + description: + '

Cancels a top-up. Only pending top-ups can be canceled.

.', + inputSchema: stripe.PostTopupsTopupCancelParamsSchema + }) + async PostTopupsTopupCancel( + params: stripe.PostTopupsTopupCancelParams + ): Promise { + return this.ky + .post(`/v1/topups/${params.topup}/cancel`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_transfers', + description: + '

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.

.', + inputSchema: stripe.GetTransfersParamsSchema + }) + async GetTransfers( + params: stripe.GetTransfersParams + ): Promise { + return this.ky + .get('/v1/transfers', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

. + */ + @aiFunction({ + name: 'post_transfers', + description: + '

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

.', + inputSchema: stripe.PostTransfersParamsSchema + }) + async PostTransfers( + _params: stripe.PostTransfersParams + ): Promise { + return this.ky.post('/v1/transfers').json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_transfers_id_reversals', + description: + '

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.

.', + inputSchema: stripe.GetTransfersIdReversalsParamsSchema + }) + async GetTransfersIdReversals( + params: stripe.GetTransfersIdReversalsParams + ): Promise { + return this.ky + .get(`/v1/transfers/${params.id}/reversals`, { + searchParams: sanitizeSearchParams( + pick(params, 'ending_before', 'expand', 'limit', 'starting_after') + ) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_transfers_id_reversals', + description: `

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.

.`, + inputSchema: stripe.PostTransfersIdReversalsParamsSchema + }) + async PostTransfersIdReversals( + params: stripe.PostTransfersIdReversalsParams + ): Promise { + return this.ky + .post(`/v1/transfers/${params.id}/reversals`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_transfers_transfer', + description: + '

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.

.', + inputSchema: stripe.GetTransfersTransferParamsSchema + }) + async GetTransfersTransfer( + params: stripe.GetTransfersTransferParams + ): Promise { + return this.ky + .get(`/v1/transfers/${params.transfer}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_transfers_transfer', + description: `

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.

.`, + inputSchema: stripe.PostTransfersTransferParamsSchema + }) + async PostTransfersTransfer( + params: stripe.PostTransfersTransferParams + ): Promise { + return this.ky + .post(`/v1/transfers/${params.transfer}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'get_transfers_transfer_reversals_id', + description: + '

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.

.', + inputSchema: stripe.GetTransfersTransferReversalsIdParamsSchema + }) + async GetTransfersTransferReversalsId( + params: stripe.GetTransfersTransferReversalsIdParams + ): Promise { + return this.ky + .get(`/v1/transfers/${params.transfer}/reversals/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_transfers_transfer_reversals_id', + description: `

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.

.`, + inputSchema: stripe.PostTransfersTransferReversalsIdParamsSchema + }) + async PostTransfersTransferReversalsId( + params: stripe.PostTransfersTransferReversalsIdParams + ): Promise { + return this.ky + .post(`/v1/transfers/${params.transfer}/reversals/${params.id}`) + .json() + } + + /** + *

Returns a list of CreditReversals.

. + */ + @aiFunction({ + name: 'get_treasury_credit_reversals', + description: '

Returns a list of CreditReversals.

.', + inputSchema: stripe.GetTreasuryCreditReversalsParamsSchema + }) + async GetTreasuryCreditReversals( + params: stripe.GetTreasuryCreditReversalsParams + ): Promise { + return this.ky + .get('/v1/treasury/credit_reversals', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Reverses a ReceivedCredit and creates a CreditReversal object.

. + */ + @aiFunction({ + name: 'post_treasury_credit_reversals', + description: + '

Reverses a ReceivedCredit and creates a CreditReversal object.

.', + inputSchema: stripe.PostTreasuryCreditReversalsParamsSchema + }) + async PostTreasuryCreditReversals( + _params: stripe.PostTreasuryCreditReversalsParams + ): Promise { + return this.ky + .post('/v1/treasury/credit_reversals') + .json() + } + + /** + *

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

. + */ + @aiFunction({ + name: 'get_treasury_credit_reversals_credit_reversal', + description: + '

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

.', + inputSchema: stripe.GetTreasuryCreditReversalsCreditReversalParamsSchema + }) + async GetTreasuryCreditReversalsCreditReversal( + params: stripe.GetTreasuryCreditReversalsCreditReversalParams + ): Promise { + return this.ky + .get(`/v1/treasury/credit_reversals/${params.credit_reversal}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of DebitReversals.

. + */ + @aiFunction({ + name: 'get_treasury_debit_reversals', + description: '

Returns a list of DebitReversals.

.', + inputSchema: stripe.GetTreasuryDebitReversalsParamsSchema + }) + async GetTreasuryDebitReversals( + params: stripe.GetTreasuryDebitReversalsParams + ): Promise { + return this.ky + .get('/v1/treasury/debit_reversals', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Reverses a ReceivedDebit and creates a DebitReversal object.

. + */ + @aiFunction({ + name: 'post_treasury_debit_reversals', + description: + '

Reverses a ReceivedDebit and creates a DebitReversal object.

.', + inputSchema: stripe.PostTreasuryDebitReversalsParamsSchema + }) + async PostTreasuryDebitReversals( + _params: stripe.PostTreasuryDebitReversalsParams + ): Promise { + return this.ky + .post('/v1/treasury/debit_reversals') + .json() + } + + /** + *

Retrieves a DebitReversal object.

. + */ + @aiFunction({ + name: 'get_treasury_debit_reversals_debit_reversal', + description: '

Retrieves a DebitReversal object.

.', + inputSchema: stripe.GetTreasuryDebitReversalsDebitReversalParamsSchema + }) + async GetTreasuryDebitReversalsDebitReversal( + params: stripe.GetTreasuryDebitReversalsDebitReversalParams + ): Promise { + return this.ky + .get(`/v1/treasury/debit_reversals/${params.debit_reversal}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of FinancialAccounts.

. + */ + @aiFunction({ + name: 'get_treasury_financial_accounts', + description: '

Returns a list of FinancialAccounts.

.', + inputSchema: stripe.GetTreasuryFinancialAccountsParamsSchema + }) + async GetTreasuryFinancialAccounts( + params: stripe.GetTreasuryFinancialAccountsParams + ): Promise { + return this.ky + .get('/v1/treasury/financial_accounts', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

. + */ + @aiFunction({ + name: 'post_treasury_financial_accounts', + description: + '

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

.', + inputSchema: stripe.PostTreasuryFinancialAccountsParamsSchema + }) + async PostTreasuryFinancialAccounts( + _params: stripe.PostTreasuryFinancialAccountsParams + ): Promise { + return this.ky + .post('/v1/treasury/financial_accounts') + .json() + } + + /** + *

Retrieves the details of a FinancialAccount.

. + */ + @aiFunction({ + name: 'get_treasury_financial_accounts_financial_account', + description: '

Retrieves the details of a FinancialAccount.

.', + inputSchema: stripe.GetTreasuryFinancialAccountsFinancialAccountParamsSchema + }) + async GetTreasuryFinancialAccountsFinancialAccount( + params: stripe.GetTreasuryFinancialAccountsFinancialAccountParams + ): Promise { + return this.ky + .get(`/v1/treasury/financial_accounts/${params.financial_account}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the details of a FinancialAccount.

. + */ + @aiFunction({ + name: 'post_treasury_financial_accounts_financial_account', + description: '

Updates the details of a FinancialAccount.

.', + inputSchema: + stripe.PostTreasuryFinancialAccountsFinancialAccountParamsSchema + }) + async PostTreasuryFinancialAccountsFinancialAccount( + params: stripe.PostTreasuryFinancialAccountsFinancialAccountParams + ): Promise { + return this.ky + .post(`/v1/treasury/financial_accounts/${params.financial_account}`) + .json() + } + + /** + *

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.

. + */ + @aiFunction({ + name: 'post_treasury_financial_accounts_financial_account_close', + description: + '

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.

.', + inputSchema: + stripe.PostTreasuryFinancialAccountsFinancialAccountCloseParamsSchema + }) + async PostTreasuryFinancialAccountsFinancialAccountClose( + params: stripe.PostTreasuryFinancialAccountsFinancialAccountCloseParams + ): Promise { + return this.ky + .post( + `/v1/treasury/financial_accounts/${params.financial_account}/close` + ) + .json() + } + + /** + *

Retrieves Features information associated with the FinancialAccount.

. + */ + @aiFunction({ + name: 'get_treasury_financial_accounts_financial_account_features', + description: + '

Retrieves Features information associated with the FinancialAccount.

.', + inputSchema: + stripe.GetTreasuryFinancialAccountsFinancialAccountFeaturesParamsSchema + }) + async GetTreasuryFinancialAccountsFinancialAccountFeatures( + params: stripe.GetTreasuryFinancialAccountsFinancialAccountFeaturesParams + ): Promise { + return this.ky + .get( + `/v1/treasury/financial_accounts/${params.financial_account}/features`, + { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + } + ) + .json() + } + + /** + *

Updates the Features associated with a FinancialAccount.

. + */ + @aiFunction({ + name: 'post_treasury_financial_accounts_financial_account_features', + description: + '

Updates the Features associated with a FinancialAccount.

.', + inputSchema: + stripe.PostTreasuryFinancialAccountsFinancialAccountFeaturesParamsSchema + }) + async PostTreasuryFinancialAccountsFinancialAccountFeatures( + params: stripe.PostTreasuryFinancialAccountsFinancialAccountFeaturesParams + ): Promise { + return this.ky + .post( + `/v1/treasury/financial_accounts/${params.financial_account}/features` + ) + .json() + } + + /** + *

Returns a list of InboundTransfers sent from the specified FinancialAccount.

. + */ + @aiFunction({ + name: 'get_treasury_inbound_transfers', + description: + '

Returns a list of InboundTransfers sent from the specified FinancialAccount.

.', + inputSchema: stripe.GetTreasuryInboundTransfersParamsSchema + }) + async GetTreasuryInboundTransfers( + params: stripe.GetTreasuryInboundTransfersParams + ): Promise { + return this.ky + .get('/v1/treasury/inbound_transfers', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates an InboundTransfer.

. + */ + @aiFunction({ + name: 'post_treasury_inbound_transfers', + description: '

Creates an InboundTransfer.

.', + inputSchema: stripe.PostTreasuryInboundTransfersParamsSchema + }) + async PostTreasuryInboundTransfers( + _params: stripe.PostTreasuryInboundTransfersParams + ): Promise { + return this.ky + .post('/v1/treasury/inbound_transfers') + .json() + } + + /** + *

Retrieves the details of an existing InboundTransfer.

. + */ + @aiFunction({ + name: 'get_treasury_inbound_transfers_id', + description: + '

Retrieves the details of an existing InboundTransfer.

.', + inputSchema: stripe.GetTreasuryInboundTransfersIdParamsSchema + }) + async GetTreasuryInboundTransfersId( + params: stripe.GetTreasuryInboundTransfersIdParams + ): Promise { + return this.ky + .get(`/v1/treasury/inbound_transfers/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Cancels an InboundTransfer.

. + */ + @aiFunction({ + name: 'post_treasury_inbound_transfers_inbound_transfer_cancel', + description: '

Cancels an InboundTransfer.

.', + inputSchema: + stripe.PostTreasuryInboundTransfersInboundTransferCancelParamsSchema + }) + async PostTreasuryInboundTransfersInboundTransferCancel( + params: stripe.PostTreasuryInboundTransfersInboundTransferCancelParams + ): Promise { + return this.ky + .post( + `/v1/treasury/inbound_transfers/${params.inbound_transfer}/cancel` + ) + .json() + } + + /** + *

Returns a list of OutboundPayments sent from the specified FinancialAccount.

. + */ + @aiFunction({ + name: 'get_treasury_outbound_payments', + description: + '

Returns a list of OutboundPayments sent from the specified FinancialAccount.

.', + inputSchema: stripe.GetTreasuryOutboundPaymentsParamsSchema + }) + async GetTreasuryOutboundPayments( + params: stripe.GetTreasuryOutboundPaymentsParams + ): Promise { + return this.ky + .get('/v1/treasury/outbound_payments', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates an OutboundPayment.

. + */ + @aiFunction({ + name: 'post_treasury_outbound_payments', + description: '

Creates an OutboundPayment.

.', + inputSchema: stripe.PostTreasuryOutboundPaymentsParamsSchema + }) + async PostTreasuryOutboundPayments( + _params: stripe.PostTreasuryOutboundPaymentsParams + ): Promise { + return this.ky + .post('/v1/treasury/outbound_payments') + .json() + } + + /** + *

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

. + */ + @aiFunction({ + name: 'get_treasury_outbound_payments_id', + description: + '

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

.', + inputSchema: stripe.GetTreasuryOutboundPaymentsIdParamsSchema + }) + async GetTreasuryOutboundPaymentsId( + params: stripe.GetTreasuryOutboundPaymentsIdParams + ): Promise { + return this.ky + .get(`/v1/treasury/outbound_payments/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Cancel an OutboundPayment.

. + */ + @aiFunction({ + name: 'post_treasury_outbound_payments_id_cancel', + description: '

Cancel an OutboundPayment.

.', + inputSchema: stripe.PostTreasuryOutboundPaymentsIdCancelParamsSchema + }) + async PostTreasuryOutboundPaymentsIdCancel( + params: stripe.PostTreasuryOutboundPaymentsIdCancelParams + ): Promise { + return this.ky + .post(`/v1/treasury/outbound_payments/${params.id}/cancel`) + .json() + } + + /** + *

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

. + */ + @aiFunction({ + name: 'get_treasury_outbound_transfers', + description: + '

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

.', + inputSchema: stripe.GetTreasuryOutboundTransfersParamsSchema + }) + async GetTreasuryOutboundTransfers( + params: stripe.GetTreasuryOutboundTransfersParams + ): Promise { + return this.ky + .get('/v1/treasury/outbound_transfers', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Creates an OutboundTransfer.

. + */ + @aiFunction({ + name: 'post_treasury_outbound_transfers', + description: '

Creates an OutboundTransfer.

.', + inputSchema: stripe.PostTreasuryOutboundTransfersParamsSchema + }) + async PostTreasuryOutboundTransfers( + _params: stripe.PostTreasuryOutboundTransfersParams + ): Promise { + return this.ky + .post('/v1/treasury/outbound_transfers') + .json() + } + + /** + *

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

. + */ + @aiFunction({ + name: 'get_treasury_outbound_transfers_outbound_transfer', + description: + '

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

.', + inputSchema: stripe.GetTreasuryOutboundTransfersOutboundTransferParamsSchema + }) + async GetTreasuryOutboundTransfersOutboundTransfer( + params: stripe.GetTreasuryOutboundTransfersOutboundTransferParams + ): Promise { + return this.ky + .get(`/v1/treasury/outbound_transfers/${params.outbound_transfer}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

An OutboundTransfer can be canceled if the funds have not yet been paid out.

. + */ + @aiFunction({ + name: 'post_treasury_outbound_transfers_outbound_transfer_cancel', + description: + '

An OutboundTransfer can be canceled if the funds have not yet been paid out.

.', + inputSchema: + stripe.PostTreasuryOutboundTransfersOutboundTransferCancelParamsSchema + }) + async PostTreasuryOutboundTransfersOutboundTransferCancel( + params: stripe.PostTreasuryOutboundTransfersOutboundTransferCancelParams + ): Promise { + return this.ky + .post( + `/v1/treasury/outbound_transfers/${params.outbound_transfer}/cancel` + ) + .json() + } + + /** + *

Returns a list of ReceivedCredits.

. + */ + @aiFunction({ + name: 'get_treasury_received_credits', + description: '

Returns a list of ReceivedCredits.

.', + inputSchema: stripe.GetTreasuryReceivedCreditsParamsSchema + }) + async GetTreasuryReceivedCredits( + params: stripe.GetTreasuryReceivedCreditsParams + ): Promise { + return this.ky + .get('/v1/treasury/received_credits', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

. + */ + @aiFunction({ + name: 'get_treasury_received_credits_id', + description: + '

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

.', + inputSchema: stripe.GetTreasuryReceivedCreditsIdParamsSchema + }) + async GetTreasuryReceivedCreditsId( + params: stripe.GetTreasuryReceivedCreditsIdParams + ): Promise { + return this.ky + .get(`/v1/treasury/received_credits/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of ReceivedDebits.

. + */ + @aiFunction({ + name: 'get_treasury_received_debits', + description: '

Returns a list of ReceivedDebits.

.', + inputSchema: stripe.GetTreasuryReceivedDebitsParamsSchema + }) + async GetTreasuryReceivedDebits( + params: stripe.GetTreasuryReceivedDebitsParams + ): Promise { + return this.ky + .get('/v1/treasury/received_debits', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

. + */ + @aiFunction({ + name: 'get_treasury_received_debits_id', + description: + '

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

.', + inputSchema: stripe.GetTreasuryReceivedDebitsIdParamsSchema + }) + async GetTreasuryReceivedDebitsId( + params: stripe.GetTreasuryReceivedDebitsIdParams + ): Promise { + return this.ky + .get(`/v1/treasury/received_debits/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves a list of TransactionEntry objects.

. + */ + @aiFunction({ + name: 'get_treasury_transaction_entries', + description: '

Retrieves a list of TransactionEntry objects.

.', + inputSchema: stripe.GetTreasuryTransactionEntriesParamsSchema + }) + async GetTreasuryTransactionEntries( + params: stripe.GetTreasuryTransactionEntriesParams + ): Promise { + return this.ky + .get('/v1/treasury/transaction_entries', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves a TransactionEntry object.

. + */ + @aiFunction({ + name: 'get_treasury_transaction_entries_id', + description: '

Retrieves a TransactionEntry object.

.', + inputSchema: stripe.GetTreasuryTransactionEntriesIdParamsSchema + }) + async GetTreasuryTransactionEntriesId( + params: stripe.GetTreasuryTransactionEntriesIdParams + ): Promise { + return this.ky + .get(`/v1/treasury/transaction_entries/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Retrieves a list of Transaction objects.

. + */ + @aiFunction({ + name: 'get_treasury_transactions', + description: '

Retrieves a list of Transaction objects.

.', + inputSchema: stripe.GetTreasuryTransactionsParamsSchema + }) + async GetTreasuryTransactions( + params: stripe.GetTreasuryTransactionsParams + ): Promise { + return this.ky + .get('/v1/treasury/transactions', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

Retrieves the details of an existing Transaction.

. + */ + @aiFunction({ + name: 'get_treasury_transactions_id', + description: '

Retrieves the details of an existing Transaction.

.', + inputSchema: stripe.GetTreasuryTransactionsIdParamsSchema + }) + async GetTreasuryTransactionsId( + params: stripe.GetTreasuryTransactionsIdParams + ): Promise { + return this.ky + .get(`/v1/treasury/transactions/${params.id}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Returns a list of your webhook endpoints.

. + */ + @aiFunction({ + name: 'get_webhook_endpoints', + description: '

Returns a list of your webhook endpoints.

.', + inputSchema: stripe.GetWebhookEndpointsParamsSchema + }) + async GetWebhookEndpoints( + params: stripe.GetWebhookEndpointsParams + ): Promise { + return this.ky + .get('/v1/webhook_endpoints', { + searchParams: sanitizeSearchParams(params) + }) + .json() + } + + /** + *

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 section of the Dashboard.

. + */ + @aiFunction({ + name: 'post_webhook_endpoints', + description: + '

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 section of the Dashboard.

.', + inputSchema: stripe.PostWebhookEndpointsParamsSchema + }) + async PostWebhookEndpoints( + _params: stripe.PostWebhookEndpointsParams + ): Promise { + return this.ky + .post('/v1/webhook_endpoints') + .json() + } + + /** + *

Retrieves the webhook endpoint with the given ID.

. + */ + @aiFunction({ + name: 'get_webhook_endpoints_webhook_endpoint', + description: '

Retrieves the webhook endpoint with the given ID.

.', + inputSchema: stripe.GetWebhookEndpointsWebhookEndpointParamsSchema + }) + async GetWebhookEndpointsWebhookEndpoint( + params: stripe.GetWebhookEndpointsWebhookEndpointParams + ): Promise { + return this.ky + .get(`/v1/webhook_endpoints/${params.webhook_endpoint}`, { + searchParams: sanitizeSearchParams(pick(params, 'expand')) + }) + .json() + } + + /** + *

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

. + */ + @aiFunction({ + name: 'post_webhook_endpoints_webhook_endpoint', + description: + '

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

.', + inputSchema: stripe.PostWebhookEndpointsWebhookEndpointParamsSchema + }) + async PostWebhookEndpointsWebhookEndpoint( + params: stripe.PostWebhookEndpointsWebhookEndpointParams + ): Promise { + return this.ky + .post(`/v1/webhook_endpoints/${params.webhook_endpoint}`) + .json() + } + + /** + *

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

. + */ + @aiFunction({ + name: 'delete_webhook_endpoints_webhook_endpoint', + description: + '

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

.', + inputSchema: stripe.DeleteWebhookEndpointsWebhookEndpointParamsSchema + }) + async DeleteWebhookEndpointsWebhookEndpoint( + params: stripe.DeleteWebhookEndpointsWebhookEndpointParams + ): Promise { + return this.ky + .delete(`/v1/webhook_endpoints/${params.webhook_endpoint}`) + .json() + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/firecrawl.json b/packages/openapi-to-ts/fixtures/openapi/3.0/firecrawl.json new file mode 100644 index 0000000..fc9b8a4 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/firecrawl.json @@ -0,0 +1,936 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Firecrawl API", + "version": "1.0.0", + "description": "API for interacting with Firecrawl services to perform web scraping and crawling tasks.", + "contact": { + "name": "Firecrawl Support", + "url": "https://firecrawl.dev/support", + "email": "support@firecrawl.dev" + } + }, + "servers": [ + { + "url": "https://api.firecrawl.dev/v0" + } + ], + "paths": { + "/scrape": { + "post": { + "summary": "Scrape a single URL", + "operationId": "scrape", + "tags": ["Scraping"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The URL to scrape" + }, + "formats": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "markdown", + "html", + "rawHtml", + "links", + "screenshot", + "screenshot@fullPage" + ] + }, + "description": "Specific formats to return.\n\n - markdown: The page in Markdown format.\n - html: The page's HTML, trimmed to include only meaningful content.\n - rawHtml: The page's original HTML.\n - links: The links on the page.\n - screenshot: A screenshot of the top of the page.\n - screenshot@fullPage: A screenshot of the full page. (overridden by screenshot if present)", + "default": ["markdown"] + }, + "headers": { + "type": "object", + "description": "Headers to send with the request. Can be used to send cookies, user-agent, etc." + }, + "includeTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: 'script, .ad, #footer'" + }, + "excludeTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags, classes and ids to remove from the page. Use comma separated values. Example: 'script, .ad, #footer'" + }, + "onlyMainContent": { + "type": "boolean", + "description": "Only return the main content of the page excluding headers, navs, footers, etc.", + "default": true + }, + "timeout": { + "type": "integer", + "description": "Timeout in milliseconds for the request", + "default": 30000 + }, + "waitFor": { + "type": "integer", + "description": "Wait x amount of milliseconds for the page to load to fetch content", + "default": 0 + } + }, + "required": ["url"] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrapeResponse" + } + } + } + }, + "402": { + "description": "Payment required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Payment required to access this resource." + } + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Request rate limit exceeded. Please wait and try again later." + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "An unexpected error occurred on the server." + } + } + } + } + } + } + } + } + }, + "/crawl": { + "post": { + "summary": "Crawl multiple URLs based on options", + "operationId": "crawlUrls", + "tags": ["Crawling"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The base URL to start crawling from" + }, + "crawlerOptions": { + "type": "object", + "properties": { + "includes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "URL patterns to include" + }, + "excludes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "URL patterns to exclude" + }, + "generateImgAltText": { + "type": "boolean", + "description": "Generate alt text for images using LLMs (must have a paid plan)", + "default": false + }, + "returnOnlyUrls": { + "type": "boolean", + "description": "If true, returns only the URLs as a list on the crawl status. Attention: the return response will be a list of URLs inside the data, not a list of documents.", + "default": false + }, + "maxDepth": { + "type": "integer", + "description": "Maximum depth to crawl relative to the entered URL. A maxDepth of 0 scrapes only the entered URL. A maxDepth of 1 scrapes the entered URL and all pages one level deep. A maxDepth of 2 scrapes the entered URL and all pages up to two levels deep. Higher values follow the same pattern." + }, + "mode": { + "type": "string", + "enum": ["default", "fast"], + "description": "The crawling mode to use. Fast mode crawls 4x faster websites without sitemap, but may not be as accurate and shouldn't be used in heavy js-rendered websites.", + "default": "default" + }, + "ignoreSitemap": { + "type": "boolean", + "description": "Ignore the website sitemap when crawling", + "default": false + }, + "limit": { + "type": "integer", + "description": "Maximum number of pages to crawl", + "default": 10000 + }, + "allowBackwardCrawling": { + "type": "boolean", + "description": "Enables the crawler to navigate from a specific URL to previously linked pages. For instance, from 'example.com/product/123' back to 'example.com/product'", + "default": false + }, + "allowExternalContentLinks": { + "type": "boolean", + "description": "Allows the crawler to follow links to external websites.", + "default": false + } + } + }, + "pageOptions": { + "type": "object", + "properties": { + "headers": { + "type": "object", + "description": "Headers to send with the request. Can be used to send cookies, user-agent, etc." + }, + "includeHtml": { + "type": "boolean", + "description": "Include the HTML version of the content on page. Will output a html key in the response.", + "default": false + }, + "includeRawHtml": { + "type": "boolean", + "description": "Include the raw HTML content of the page. Will output a rawHtml key in the response.", + "default": false + }, + "onlyIncludeTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: 'script, .ad, #footer'" + }, + "onlyMainContent": { + "type": "boolean", + "description": "Only return the main content of the page excluding headers, navs, footers, etc.", + "default": false + }, + "removeTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags, classes and ids to remove from the page. Use comma separated values. Example: 'script, .ad, #footer'" + }, + "replaceAllPathsWithAbsolutePaths": { + "type": "boolean", + "description": "Replace all relative paths with absolute paths for images and links", + "default": false + }, + "screenshot": { + "type": "boolean", + "description": "Include a screenshot of the top of the page that you are scraping.", + "default": false + }, + "fullPageScreenshot": { + "type": "boolean", + "description": "Include a full page screenshot of the page that you are scraping.", + "default": false + }, + "waitFor": { + "type": "integer", + "description": "Wait x amount of milliseconds for the page to load to fetch content", + "default": 0 + } + } + } + }, + "required": ["url"] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CrawlResponse" + } + } + } + }, + "402": { + "description": "Payment required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Payment required to access this resource." + } + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Request rate limit exceeded. Please wait and try again later." + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "An unexpected error occurred on the server." + } + } + } + } + } + } + } + } + }, + "/search": { + "post": { + "summary": "Search for a keyword in Google, returns top page results with markdown content for each page", + "operationId": "searchGoogle", + "tags": ["Search"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "format": "uri", + "description": "The query to search for" + }, + "pageOptions": { + "type": "object", + "properties": { + "onlyMainContent": { + "type": "boolean", + "description": "Only return the main content of the page excluding headers, navs, footers, etc.", + "default": false + }, + "fetchPageContent": { + "type": "boolean", + "description": "Fetch the content of each page. If false, defaults to a basic fast serp API.", + "default": true + }, + "includeHtml": { + "type": "boolean", + "description": "Include the HTML version of the content on page. Will output a html key in the response.", + "default": false + }, + "includeRawHtml": { + "type": "boolean", + "description": "Include the raw HTML content of the page. Will output a rawHtml key in the response.", + "default": false + } + } + }, + "searchOptions": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "description": "Maximum number of results. Max is 20 during beta." + } + } + } + }, + "required": ["query"] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResponse" + } + } + } + }, + "402": { + "description": "Payment required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Payment required to access this resource." + } + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Request rate limit exceeded. Please wait and try again later." + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "An unexpected error occurred on the server." + } + } + } + } + } + } + } + } + }, + "/crawl/status/{jobId}": { + "get": { + "tags": ["Crawl"], + "summary": "Get the status of a crawl job", + "operationId": "getCrawlStatus", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "ID of the crawl job", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the job (completed, active, failed, paused)" + }, + "current": { + "type": "integer", + "description": "Current page number" + }, + "total": { + "type": "integer", + "description": "Total number of pages" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CrawlStatusResponseObj" + }, + "description": "Data returned from the job (null when it is in progress)" + }, + "partial_data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CrawlStatusResponseObj" + }, + "description": "Partial documents returned as it is being crawled (streaming). **This feature is currently in alpha - expect breaking changes** When a page is ready, it will append to the partial_data array, so there is no need to wait for the entire website to be crawled. When the crawl is done, partial_data will become empty and the result will be available in `data`. There is a max of 50 items in the array response. The oldest item (top of the array) will be removed when the new item is added to the array." + } + } + } + } + } + }, + "402": { + "description": "Payment required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Payment required to access this resource." + } + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Request rate limit exceeded. Please wait and try again later." + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "An unexpected error occurred on the server." + } + } + } + } + } + } + } + } + }, + "/crawl/cancel/{jobId}": { + "delete": { + "tags": ["Crawl"], + "summary": "Cancel a crawl job", + "operationId": "cancelCrawlJob", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "ID of the crawl job", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Returns cancelled." + } + } + } + } + } + }, + "402": { + "description": "Payment required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Payment required to access this resource." + } + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Request rate limit exceeded. Please wait and try again later." + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "An unexpected error occurred on the server." + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ScrapeResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "warning": { + "type": "string", + "nullable": true, + "description": "Warning message to let you know of any issues." + }, + "data": { + "type": "object", + "properties": { + "markdown": { + "type": "string", + "nullable": true, + "description": "Markdown content of the page if the `markdown` format was specified (default)" + }, + "html": { + "type": "string", + "nullable": true, + "description": "HTML version of the content on page if the `html` format was specified" + }, + "rawHtml": { + "type": "string", + "nullable": true, + "description": "Raw HTML content of the page if the `rawHtml` format was specified" + }, + "links": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + }, + "nullable": true, + "description": "Links on the page if the `links` format was specified" + }, + "screenshot": { + "type": "string", + "nullable": true, + "description": "URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified" + }, + "metadata": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "language": { + "type": "string", + "nullable": true + }, + "sourceURL": { + "type": "string", + "format": "uri" + }, + " ": { + "type": "string" + }, + "statusCode": { + "type": "integer", + "description": "The status code of the page" + }, + "error": { + "type": "string", + "nullable": true, + "description": "The error message of the page" + } + } + } + } + } + } + }, + "CrawlStatusResponseObj": { + "type": "object", + "properties": { + "markdown": { + "type": "string", + "nullable": true, + "description": "Markdown content of the page if the `markdown` format was specified (default)" + }, + "html": { + "type": "string", + "nullable": true, + "description": "HTML version of the content on page if the `html` format was specified" + }, + "rawHtml": { + "type": "string", + "nullable": true, + "description": "Raw HTML content of the page if the `rawHtml` format was specified" + }, + "links": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + }, + "nullable": true, + "description": "Links on the page if the `links` format was specified" + }, + "screenshot": { + "type": "string", + "nullable": true, + "description": "URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified" + }, + "metadata": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "language": { + "type": "string", + "nullable": true + }, + "sourceURL": { + "type": "string", + "format": "uri" + }, + " ": { + "type": "string" + }, + "statusCode": { + "type": "integer", + "description": "The status code of the page" + }, + "error": { + "type": "string", + "nullable": true, + "description": "The error message of the page" + } + } + } + } + }, + "SearchResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "data": { + "type": "array", + "items": { + "markdown": { + "type": "string", + "nullable": true, + "description": "Markdown content of the page if the `markdown` format was specified (default)" + }, + "html": { + "type": "string", + "nullable": true, + "description": "HTML version of the content on page if the `html` format was specified" + }, + "rawHtml": { + "type": "string", + "nullable": true, + "description": "Raw HTML content of the page if the `rawHtml` format was specified" + }, + "links": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + }, + "nullable": true, + "description": "Links on the page if the `links` format was specified" + }, + "screenshot": { + "type": "string", + "nullable": true, + "description": "URL of the screenshot of the page if the `screenshot` or `screenshot@fullSize` format was specified" + }, + "metadata": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "language": { + "type": "string", + "nullable": true + }, + "sourceURL": { + "type": "string", + "format": "uri" + }, + " ": { + "type": "string" + }, + "statusCode": { + "type": "integer", + "description": "The status code of the page" + }, + "error": { + "type": "string", + "nullable": true, + "description": "The error message of the page" + } + } + } + } + } + } + }, + "CrawlResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/notion.json b/packages/openapi-to-ts/fixtures/openapi/3.0/notion.json new file mode 100644 index 0000000..59abbd4 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/notion.json @@ -0,0 +1,4448 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Notion API", + "version": "1.0.0", + "description": "API specification for Notion" + }, + "servers": [{ "url": "https://api.notion.so" }], + "security": [{ "oauth2": [] }], + + "paths": { + "/users/me": { + "get": { + "summary": "Get current user", + "operationId": "getSelf", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserObjectResponse" + } + } + } + } + } + } + }, + "/users/{user_id}": { + "get": { + "summary": "Get user", + "operationId": "getUser", + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserObjectResponse" + } + } + } + } + } + } + }, + "/users": { + "get": { + "summary": "List users", + "operationId": "listUsers", + "parameters": [ + { + "name": "start_cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListUsersResponse" + } + } + } + } + } + } + }, + "/pages": { + "post": { + "summary": "Create page", + "operationId": "createPage", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePageParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PageObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialPageObjectResponse" + } + ] + } + } + } + } + } + } + }, + "/pages/{page_id}": { + "get": { + "summary": "Get page", + "operationId": "getPage", + "parameters": [ + { + "name": "page_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter_properties", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PageObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialPageObjectResponse" + } + ] + } + } + } + } + } + }, + "patch": { + "summary": "Update page", + "operationId": "updatePage", + "parameters": [ + { + "name": "page_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePageParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PageObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialPageObjectResponse" + } + ] + } + } + } + } + } + } + }, + "/pages/{page_id}/properties/{property_id}": { + "get": { + "summary": "Get page property", + "operationId": "getPageProperty", + "parameters": [ + { + "name": "page_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "property_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "start_cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PropertyItemObjectResponse" + }, + { + "$ref": "#/components/schemas/PropertyItemListResponse" + } + ] + } + } + } + } + } + } + }, + "/blocks/{block_id}": { + "get": { + "summary": "Get block", + "operationId": "getBlock", + "parameters": [ + { + "name": "block_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialBlockObjectResponse" + }, + { + "$ref": "#/components/schemas/BlockObjectResponse" + } + ] + } + } + } + } + } + }, + "patch": { + "summary": "Update block", + "operationId": "updateBlock", + "parameters": [ + { + "name": "block_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateBlockParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialBlockObjectResponse" + }, + { + "$ref": "#/components/schemas/BlockObjectResponse" + } + ] + } + } + } + } + } + }, + "delete": { + "summary": "Delete block", + "operationId": "deleteBlock", + "parameters": [ + { + "name": "block_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialBlockObjectResponse" + }, + { + "$ref": "#/components/schemas/BlockObjectResponse" + } + ] + } + } + } + } + } + } + }, + "/blocks/{block_id}/children": { + "get": { + "summary": "List block children", + "operationId": "listBlockChildren", + "parameters": [ + { + "name": "block_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "start_cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListBlockChildrenResponse" + } + } + } + } + } + }, + "patch": { + "summary": "Append block children", + "operationId": "appendBlockChildren", + "parameters": [ + { + "name": "block_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppendBlockChildrenParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppendBlockChildrenResponse" + } + } + } + } + } + } + }, + "/databases/{database_id}": { + "get": { + "summary": "Get database", + "operationId": "getDatabase", + "parameters": [ + { + "name": "database_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialDatabaseObjectResponse" + }, + { + "$ref": "#/components/schemas/DatabaseObjectResponse" + } + ] + } + } + } + } + } + }, + "patch": { + "summary": "Update database", + "operationId": "updateDatabase", + "parameters": [ + { + "name": "database_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDatabaseParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialDatabaseObjectResponse" + }, + { + "$ref": "#/components/schemas/DatabaseObjectResponse" + } + ] + } + } + } + } + } + } + }, + "/databases/{database_id}/query": { + "post": { + "summary": "Query database", + "operationId": "queryDatabase", + "parameters": [ + { + "name": "database_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter_properties", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryDatabaseParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryDatabaseResponse" + } + } + } + } + } + } + }, + "/databases": { + "get": { + "summary": "List databases", + "operationId": "listDatabases", + "parameters": [ + { + "name": "start_cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListDatabasesResponse" + } + } + } + } + } + }, + "post": { + "summary": "Create database", + "operationId": "createDatabase", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDatabaseParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialDatabaseObjectResponse" + }, + { + "$ref": "#/components/schemas/DatabaseObjectResponse" + } + ] + } + } + } + } + } + } + }, + "/search": { + "post": { + "summary": "Search", + "operationId": "search", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResponse" + } + } + } + } + } + } + }, + "/comments": { + "post": { + "summary": "Create comment", + "operationId": "createComment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCommentParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/CommentObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialCommentObjectResponse" + } + ] + } + } + } + } + } + }, + "get": { + "summary": "List comments", + "operationId": "listComments", + "parameters": [ + { + "name": "block_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "start_cursor", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCommentsResponse" + } + } + } + } + } + } + }, + "/oauth/token": { + "post": { + "summary": "OAuth token", + "operationId": "oauthToken", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OauthTokenParameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OauthTokenResponse" + } + } + } + } + } + } + } + }, + + "components": { + "securitySchemes": { + "oauth2": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "scopes": {}, + "authorizationUrl": "https://api.notion.com/v1/oauth/authorize", + "tokenUrl": "https://api.notion.com/v1/oauth/token" + } + } + } + }, + "schemas": { + "UserObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["user"] + }, + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["person", "bot"] + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + } + }, + "required": ["object", "id", "type", "name", "avatar_url"] + }, + "ListUsersResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserObjectResponse" + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["results", "next_cursor", "has_more"] + }, + "CreatePageParameters": { + "type": "object", + "properties": { + "parent": { + "type": "object", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page_id"] + }, + "page_id": { + "type": "string" + } + }, + "required": ["type", "page_id"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["database_id"] + }, + "database_id": { + "type": "string" + } + }, + "required": ["type", "database_id"] + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["title"] + }, + { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["rich_text"] + }, + { + "type": "object", + "properties": { + "number": { + "type": ["number", "null"] + } + }, + "required": ["number"] + }, + { + "type": "object", + "properties": { + "select": { + "type": ["object", "null"], + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] + } + }, + "required": ["select"] + } + ] + } + } + }, + "required": ["parent", "properties"] + }, + "PageObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["page"] + }, + "id": { + "type": "string" + }, + "created_time": { + "type": "string" + }, + "last_edited_time": { + "type": "string" + }, + "archived": { + "type": "boolean" + }, + "url": { + "type": "string" + } + }, + "required": [ + "object", + "id", + "created_time", + "last_edited_time", + "archived", + "url" + ] + }, + "PartialPageObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["page"] + }, + "id": { + "type": "string" + } + }, + "required": ["object", "id"] + }, + "UpdatePageParameters": { + "type": "object", + "properties": { + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["title"] + }, + { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["rich_text"] + }, + { + "type": "object", + "properties": { + "number": { + "type": ["number", "null"] + } + }, + "required": ["number"] + }, + { + "type": "object", + "properties": { + "select": { + "type": ["object", "null"], + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] + } + }, + "required": ["select"] + } + ] + } + }, + "archived": { + "type": "boolean" + } + } + }, + "PropertyItemObjectResponse": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": ["type", "id"] + }, + "PropertyItemListResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PropertyItemObjectResponse" + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["results", "next_cursor", "has_more"] + }, + "PartialBlockObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "id": { + "type": "string" + } + }, + "required": ["object", "id"] + }, + "BlockObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "created_time": { + "type": "string" + }, + "last_edited_time": { + "type": "string" + }, + "has_children": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + } + }, + "required": [ + "object", + "id", + "type", + "created_time", + "last_edited_time", + "has_children", + "archived" + ] + }, + "UpdateBlockParameters": { + "type": "object", + "properties": { + "paragraph": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "heading_1": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "heading_2": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "heading_3": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "bulleted_list_item": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "numbered_list_item": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "quote": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "to_do": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "checked": { + "type": "boolean" + }, + "color": { + "type": "string" + } + } + }, + "toggle": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + } + }, + "code": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "language": { + "type": "string" + } + } + }, + "embed": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "image": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + } + } + }, + "video": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + } + } + }, + "file": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + } + } + }, + "pdf": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + } + } + }, + "bookmark": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "equation": { + "type": "object", + "properties": { + "expression": { + "type": "string" + } + } + }, + "divider": { + "type": "object" + }, + "table_of_contents": { + "type": "object", + "properties": { + "color": { + "type": "string" + } + } + }, + "breadcrumb": { + "type": "object" + }, + "column_list": { + "type": "object" + }, + "column": { + "type": "object" + }, + "link_to_page": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page_id", "database_id"] + }, + "page_id": { + "type": "string" + }, + "database_id": { + "type": "string" + } + } + }, + "table_row": { + "type": "object", + "properties": { + "cells": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + } + } + }, + "archived": { + "type": "boolean" + } + } + }, + "ListBlockChildrenResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["list"] + }, + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialBlockObjectResponse" + }, + { + "$ref": "#/components/schemas/BlockObjectResponse" + } + ] + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["object", "results", "next_cursor", "has_more"] + }, + "AppendBlockChildrenParameters": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlockObjectRequest" + } + } + }, + "required": ["children"] + }, + "AppendBlockChildrenResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["list"] + }, + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialBlockObjectResponse" + }, + { + "$ref": "#/components/schemas/BlockObjectResponse" + } + ] + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["object", "results", "next_cursor", "has_more"] + }, + "PartialDatabaseObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["database"] + }, + "id": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DatabasePropertyConfigResponse" + } + } + }, + "required": ["object", "id", "properties"] + }, + "DatabaseObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["database"] + }, + "id": { + "type": "string" + }, + "cover": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["external"] + }, + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["type", "external"] + }, + { + "type": "null" + } + ] + }, + "icon": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["emoji"] + }, + "emoji": { + "type": "string" + } + }, + "required": ["type", "emoji"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["external"] + }, + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["type", "external"] + }, + { + "type": "null" + } + ] + }, + "created_time": { + "type": "string" + }, + "created_by": { + "$ref": "#/components/schemas/PartialUserObjectResponse" + }, + "last_edited_time": { + "type": "string" + }, + "last_edited_by": { + "$ref": "#/components/schemas/PartialUserObjectResponse" + }, + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemResponse" + } + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemResponse" + } + }, + "is_inline": { + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DatabasePropertyConfigResponse" + } + }, + "parent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page_id"] + }, + "page_id": { + "type": "string" + } + }, + "required": ["type", "page_id"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["workspace"] + }, + "workspace": { + "type": "boolean", + "enum": [true] + } + }, + "required": ["type", "workspace"] + } + ] + }, + "url": { + "type": "string" + }, + "archived": { + "type": "boolean" + } + }, + "required": [ + "object", + "id", + "created_time", + "created_by", + "last_edited_time", + "last_edited_by", + "title", + "description", + "is_inline", + "properties", + "parent", + "url", + "archived" + ] + }, + "UpdateDatabaseParameters": { + "type": "object", + "properties": { + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "icon": { + "oneOf": [ + { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["emoji"] + } + }, + "required": ["emoji", "type"] + }, + { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "type": { + "type": "string", + "enum": ["external"] + } + }, + "required": ["external", "type"] + }, + { + "type": "null" + } + ] + }, + "cover": { + "oneOf": [ + { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "type": { + "type": "string", + "enum": ["external"] + } + }, + "required": ["external", "type"] + }, + { + "type": "null" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PropertyUpdateSchema" + } + }, + "is_inline": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + } + } + }, + "QueryDatabaseParameters": { + "type": "object", + "properties": { + "sorts": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": ["ascending", "descending"] + } + }, + "required": ["property", "direction"] + }, + { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "enum": ["created_time", "last_edited_time"] + }, + "direction": { + "type": "string", + "enum": ["ascending", "descending"] + } + }, + "required": ["timestamp", "direction"] + } + ] + } + }, + "filter": { + "oneOf": [ + { + "$ref": "#/components/schemas/PropertyFilter" + }, + { + "$ref": "#/components/schemas/CompoundFilter" + } + ] + }, + "start_cursor": { + "type": "string" + }, + "page_size": { + "type": "integer" + }, + "archived": { + "type": "boolean" + } + } + }, + "QueryDatabaseResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["list"] + }, + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PageObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialPageObjectResponse" + } + ] + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["object", "results", "next_cursor", "has_more"] + }, + "ListDatabasesResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["list"] + }, + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialDatabaseObjectResponse" + }, + { + "$ref": "#/components/schemas/DatabaseObjectResponse" + } + ] + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["object", "results", "next_cursor", "has_more"] + }, + "CreateDatabaseParameters": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page_id"] + }, + "page_id": { + "type": "string" + } + }, + "required": ["type", "page_id"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["database_id"] + }, + "database_id": { + "type": "string" + } + }, + "required": ["type", "database_id"] + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PropertySchema" + } + }, + "icon": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["emoji"] + }, + "emoji": { + "type": "string" + } + }, + "required": ["type", "emoji"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["external"] + }, + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["type", "external"] + }, + { + "type": "null" + } + ] + }, + "cover": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["external"] + }, + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["type", "external"] + }, + { + "type": "null" + } + ] + }, + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "is_inline": { + "type": "boolean" + } + }, + "required": ["parent", "properties", "title"] + }, + "SearchParameters": { + "type": "object", + "properties": { + "query": { + "type": "string" + }, + "sort": { + "type": "object", + "properties": { + "direction": { + "type": "string", + "enum": ["ascending", "descending"] + }, + "timestamp": { + "type": "string", + "enum": ["last_edited_time"] + } + }, + "required": ["direction", "timestamp"] + }, + "filter": { + "type": "object", + "properties": { + "value": { + "type": "string", + "enum": ["page", "database"] + }, + "property": { + "type": "string", + "enum": ["object"] + } + }, + "required": ["value", "property"] + }, + "start_cursor": { + "type": "string" + }, + "page_size": { + "type": "integer" + } + } + }, + "SearchResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["list"] + }, + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PageObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialPageObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialDatabaseObjectResponse" + }, + { + "$ref": "#/components/schemas/DatabaseObjectResponse" + } + ] + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["object", "results", "next_cursor", "has_more"] + }, + "CreateCommentParameters": { + "oneOf": [ + { + "type": "object", + "properties": { + "parent": { + "type": "object", + "properties": { + "page_id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["page_id"] + } + }, + "required": ["page_id"] + }, + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["parent", "rich_text"] + }, + { + "type": "object", + "properties": { + "discussion_id": { + "type": "string" + }, + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["discussion_id", "rich_text"] + } + ] + }, + "CommentObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["comment"] + }, + "id": { + "type": "string" + }, + "parent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page_id"] + }, + "page_id": { + "type": "string" + } + }, + "required": ["type", "page_id"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["block_id"] + }, + "block_id": { + "type": "string" + } + }, + "required": ["type", "block_id"] + } + ] + }, + "discussion_id": { + "type": "string" + }, + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemResponse" + } + }, + "created_by": { + "$ref": "#/components/schemas/PartialUserObjectResponse" + }, + "created_time": { + "type": "string" + }, + "last_edited_time": { + "type": "string" + } + }, + "required": [ + "object", + "id", + "parent", + "discussion_id", + "rich_text", + "created_by", + "created_time", + "last_edited_time" + ] + }, + "PartialCommentObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["comment"] + }, + "id": { + "type": "string" + } + }, + "required": ["object", "id"] + }, + "ListCommentsResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["list"] + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentObjectResponse" + } + }, + "next_cursor": { + "type": ["string", "null"] + }, + "has_more": { + "type": "boolean" + } + }, + "required": ["object", "results", "next_cursor", "has_more"] + }, + "OauthTokenParameters": { + "type": "object", + "properties": { + "grant_type": { + "type": "string" + }, + "code": { + "type": "string" + }, + "redirect_uri": { + "type": "string" + }, + "external_account": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["key", "name"] + } + }, + "required": ["grant_type", "code"] + }, + "OauthTokenResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string", + "enum": ["bearer"] + }, + "bot_id": { + "type": "string" + }, + "workspace_name": { + "type": ["string", "null"] + }, + "workspace_icon": { + "type": ["string", "null"] + }, + "workspace_id": { + "type": "string" + }, + "owner": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["user"] + }, + "user": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserObjectResponse" + }, + { + "$ref": "#/components/schemas/PartialUserObjectResponse" + } + ] + } + }, + "required": ["type", "user"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["workspace"] + }, + "workspace": { + "type": "boolean", + "enum": [true] + } + }, + "required": ["type", "workspace"] + } + ] + }, + "duplicated_template_id": { + "type": ["string", "null"] + } + }, + "required": [ + "access_token", + "token_type", + "bot_id", + "workspace_name", + "workspace_icon", + "workspace_id", + "owner", + "duplicated_template_id" + ] + }, + "RichTextItemRequest": { + "oneOf": [ + { + "type": "object", + "properties": { + "text": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "link": { + "type": ["object", "null"], + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["content"] + }, + "type": { + "type": "string", + "enum": ["text"] + }, + "annotations": { + "$ref": "#/components/schemas/AnnotationRequest" + } + }, + "required": ["text"] + }, + { + "type": "object", + "properties": { + "mention": { + "oneOf": [ + { + "type": "object", + "properties": { + "user": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + }, + { + "$ref": "#/components/schemas/UserObjectResponse" + } + ] + } + }, + "required": ["user"] + }, + { + "type": "object", + "properties": { + "page": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "required": ["page"] + }, + { + "type": "object", + "properties": { + "database": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "required": ["database"] + }, + { + "type": "object", + "properties": { + "date": { + "$ref": "#/components/schemas/DateRequest" + } + }, + "required": ["date"] + } + ] + }, + "type": { + "type": "string", + "enum": ["mention"] + }, + "annotations": { + "$ref": "#/components/schemas/AnnotationRequest" + } + }, + "required": ["mention"] + }, + { + "type": "object", + "properties": { + "equation": { + "type": "object", + "properties": { + "expression": { + "type": "string" + } + }, + "required": ["expression"] + }, + "type": { + "type": "string", + "enum": ["equation"] + }, + "annotations": { + "$ref": "#/components/schemas/AnnotationRequest" + } + }, + "required": ["equation"] + } + ] + }, + "RichTextItemResponse": { + "oneOf": [ + { + "$ref": "#/components/schemas/TextRichTextItemResponse" + }, + { + "$ref": "#/components/schemas/MentionRichTextItemResponse" + }, + { + "$ref": "#/components/schemas/EquationRichTextItemResponse" + } + ] + }, + "AnnotationRequest": { + "type": "object", + "properties": { + "bold": { + "type": "boolean" + }, + "italic": { + "type": "boolean" + }, + "strikethrough": { + "type": "boolean" + }, + "underline": { + "type": "boolean" + }, + "code": { + "type": "boolean" + }, + "color": { + "type": "string", + "enum": [ + "default", + "gray", + "brown", + "orange", + "yellow", + "green", + "blue", + "purple", + "pink", + "red", + "gray_background", + "brown_background", + "orange_background", + "yellow_background", + "green_background", + "blue_background", + "purple_background", + "pink_background", + "red_background" + ] + } + } + }, + "DateRequest": { + "type": "object", + "properties": { + "start": { + "type": "string" + }, + "end": { + "type": ["string", "null"] + }, + "time_zone": { + "type": ["string", "null"] + } + }, + "required": ["start"] + }, + "TextRichTextItemResponse": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "link": { + "type": ["object", "null"], + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["content", "link"] + }, + "annotations": { + "$ref": "#/components/schemas/AnnotationResponse" + }, + "plain_text": { + "type": "string" + }, + "href": { + "type": ["string", "null"] + } + }, + "required": ["type", "text", "annotations", "plain_text", "href"] + }, + "MentionRichTextItemResponse": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["mention"] + }, + "mention": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["user"] + }, + "user": { + "oneOf": [ + { + "$ref": "#/components/schemas/PartialUserObjectResponse" + }, + { + "$ref": "#/components/schemas/UserObjectResponse" + } + ] + } + }, + "required": ["type", "user"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["date"] + }, + "date": { + "$ref": "#/components/schemas/DateResponse" + } + }, + "required": ["type", "date"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["link_preview"] + }, + "link_preview": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + } + }, + "required": ["type", "link_preview"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page"] + }, + "page": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "required": ["type", "page"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["database"] + }, + "database": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "required": ["type", "database"] + } + ] + }, + "annotations": { + "$ref": "#/components/schemas/AnnotationResponse" + }, + "plain_text": { + "type": "string" + }, + "href": { + "type": ["string", "null"] + } + }, + "required": ["type", "mention", "annotations", "plain_text", "href"] + }, + "EquationRichTextItemResponse": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["equation"] + }, + "equation": { + "type": "object", + "properties": { + "expression": { + "type": "string" + } + }, + "required": ["expression"] + }, + "annotations": { + "$ref": "#/components/schemas/AnnotationResponse" + }, + "plain_text": { + "type": "string" + }, + "href": { + "type": ["string", "null"] + } + }, + "required": ["type", "equation", "annotations", "plain_text", "href"] + }, + "AnnotationResponse": { + "type": "object", + "properties": { + "bold": { + "type": "boolean" + }, + "italic": { + "type": "boolean" + }, + "strikethrough": { + "type": "boolean" + }, + "underline": { + "type": "boolean" + }, + "code": { + "type": "boolean" + }, + "color": { + "type": "string", + "enum": [ + "default", + "gray", + "brown", + "orange", + "yellow", + "green", + "blue", + "purple", + "pink", + "red", + "gray_background", + "brown_background", + "orange_background", + "yellow_background", + "green_background", + "blue_background", + "purple_background", + "pink_background", + "red_background" + ] + } + }, + "required": [ + "bold", + "italic", + "strikethrough", + "underline", + "code", + "color" + ] + }, + "DateResponse": { + "type": "object", + "properties": { + "start": { + "type": "string" + }, + "end": { + "type": ["string", "null"] + }, + "time_zone": { + "type": ["string", "null"] + } + }, + "required": ["start", "end", "time_zone"] + }, + "PartialUserObjectResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["user"] + }, + "id": { + "type": "string" + } + }, + "required": ["object", "id"] + }, + "DatabasePropertyConfigResponse": { + "oneOf": [ + { + "$ref": "#/components/schemas/TitlePropertyResponse" + }, + { + "$ref": "#/components/schemas/RichTextPropertyResponse" + }, + { + "$ref": "#/components/schemas/NumberPropertyResponse" + }, + { + "$ref": "#/components/schemas/SelectPropertyResponse" + }, + { + "$ref": "#/components/schemas/MultiSelectPropertyResponse" + }, + { + "$ref": "#/components/schemas/DatePropertyResponse" + }, + { + "$ref": "#/components/schemas/PeoplePropertyResponse" + }, + { + "$ref": "#/components/schemas/FilePropertyResponse" + }, + { + "$ref": "#/components/schemas/CheckboxPropertyResponse" + }, + { + "$ref": "#/components/schemas/URLPropertyResponse" + }, + { + "$ref": "#/components/schemas/EmailPropertyResponse" + }, + { + "$ref": "#/components/schemas/PhoneNumberPropertyResponse" + }, + { + "$ref": "#/components/schemas/FormulaPropertyResponse" + }, + { + "$ref": "#/components/schemas/RelationPropertyResponse" + }, + { + "$ref": "#/components/schemas/RollupPropertyResponse" + }, + { + "$ref": "#/components/schemas/CreatedTimePropertyResponse" + }, + { + "$ref": "#/components/schemas/CreatedByPropertyResponse" + }, + { + "$ref": "#/components/schemas/LastEditedTimePropertyResponse" + }, + { + "$ref": "#/components/schemas/LastEditedByPropertyResponse" + } + ] + }, + "TitlePropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["title"] + }, + "title": { + "type": "object" + } + }, + "required": ["id", "type", "title"] + }, + "RichTextPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["rich_text"] + }, + "rich_text": { + "type": "object" + } + }, + "required": ["id", "type", "rich_text"] + }, + "NumberPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["number"] + }, + "number": { + "type": "object", + "properties": { + "format": { + "type": "string" + } + }, + "required": ["format"] + } + }, + "required": ["id", "type", "number"] + }, + "SelectPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["select"] + }, + "select": { + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SelectOption" + } + } + }, + "required": ["options"] + } + }, + "required": ["id", "type", "select"] + }, + "MultiSelectPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["multi_select"] + }, + "multi_select": { + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SelectOption" + } + } + }, + "required": ["options"] + } + }, + "required": ["id", "type", "multi_select"] + }, + "DatePropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["date"] + }, + "date": { + "type": "object" + } + }, + "required": ["id", "type", "date"] + }, + "PeoplePropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["people"] + }, + "people": { + "type": "object" + } + }, + "required": ["id", "type", "people"] + }, + "FilePropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["files"] + }, + "files": { + "type": "object" + } + }, + "required": ["id", "type", "files"] + }, + "CheckboxPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["checkbox"] + }, + "checkbox": { + "type": "object" + } + }, + "required": ["id", "type", "checkbox"] + }, + "URLPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["url"] + }, + "url": { + "type": "object" + } + }, + "required": ["id", "type", "url"] + }, + "EmailPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["email"] + }, + "email": { + "type": "object" + } + }, + "required": ["id", "type", "email"] + }, + "PhoneNumberPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["phone_number"] + }, + "phone_number": { + "type": "object" + } + }, + "required": ["id", "type", "phone_number"] + }, + "FormulaPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["formula"] + }, + "formula": { + "type": "object", + "properties": { + "expression": { + "type": "string" + } + }, + "required": ["expression"] + } + }, + "required": ["id", "type", "formula"] + }, + "RelationPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["relation"] + }, + "relation": { + "type": "object", + "properties": { + "database_id": { + "type": "string" + }, + "synced_property_name": { + "type": "string" + }, + "synced_property_id": { + "type": "string" + } + }, + "required": [ + "database_id", + "synced_property_name", + "synced_property_id" + ] + } + }, + "required": ["id", "type", "relation"] + }, + "RollupPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["rollup"] + }, + "rollup": { + "type": "object", + "properties": { + "relation_property_name": { + "type": "string" + }, + "relation_property_id": { + "type": "string" + }, + "rollup_property_name": { + "type": "string" + }, + "rollup_property_id": { + "type": "string" + }, + "function": { + "type": "string" + } + }, + "required": [ + "relation_property_name", + "relation_property_id", + "rollup_property_name", + + "rollup_property_id", + "function" + ] + } + }, + "required": ["id", "type", "rollup"] + }, + "CreatedTimePropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["created_time"] + }, + "created_time": { + "type": "object" + } + }, + "required": ["id", "type", "created_time"] + }, + "CreatedByPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["created_by"] + }, + "created_by": { + "type": "object" + } + }, + "required": ["id", "type", "created_by"] + }, + "LastEditedTimePropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["last_edited_time"] + }, + "last_edited_time": { + "type": "object" + } + }, + "required": ["id", "type", "last_edited_time"] + }, + "LastEditedByPropertyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["last_edited_by"] + }, + "last_edited_by": { + "type": "object" + } + }, + "required": ["id", "type", "last_edited_by"] + }, + "SelectOption": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "required": ["id", "name", "color"] + }, + "PropertyUpdateSchema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "PropertySchema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": ["string", "null"] + } + }, + "required": ["type"] + }, + "PropertyFilter": { + "oneOf": [ + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "title": { + "$ref": "#/components/schemas/TextPropertyFilter" + } + }, + "required": ["property", "title"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "rich_text": { + "$ref": "#/components/schemas/TextPropertyFilter" + } + }, + "required": ["property", "rich_text"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "number": { + "$ref": "#/components/schemas/NumberPropertyFilter" + } + }, + "required": ["property", "number"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "checkbox": { + "$ref": "#/components/schemas/CheckboxPropertyFilter" + } + }, + "required": ["property", "checkbox"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "select": { + "$ref": "#/components/schemas/SelectPropertyFilter" + } + }, + "required": ["property", "select"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "multi_select": { + "$ref": "#/components/schemas/MultiSelectPropertyFilter" + } + }, + "required": ["property", "multi_select"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "date": { + "$ref": "#/components/schemas/DatePropertyFilter" + } + }, + "required": ["property", "date"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "people": { + "$ref": "#/components/schemas/PeoplePropertyFilter" + } + }, + "required": ["property", "people"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/FilesPropertyFilter" + } + }, + "required": ["property", "files"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "url": { + "$ref": "#/components/schemas/TextPropertyFilter" + } + }, + "required": ["property", "url"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "email": { + "$ref": "#/components/schemas/TextPropertyFilter" + } + }, + "required": ["property", "email"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "phone_number": { + "$ref": "#/components/schemas/TextPropertyFilter" + } + }, + "required": ["property", "phone_number"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "relation": { + "$ref": "#/components/schemas/RelationPropertyFilter" + } + }, + "required": ["property", "relation"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "created_by": { + "$ref": "#/components/schemas/PeoplePropertyFilter" + } + }, + "required": ["property", "created_by"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "created_time": { + "$ref": "#/components/schemas/DatePropertyFilter" + } + }, + "required": ["property", "created_time"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "last_edited_by": { + "$ref": "#/components/schemas/PeoplePropertyFilter" + } + }, + "required": ["property", "last_edited_by"] + }, + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "last_edited_time": { + "$ref": "#/components/schemas/DatePropertyFilter" + } + }, + "required": ["property", "last_edited_time"] + }, + { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "enum": ["created_time", "last_edited_time"] + }, + "created_time": { + "$ref": "#/components/schemas/DatePropertyFilter" + } + }, + "required": ["timestamp", "created_time"] + }, + { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "enum": ["created_time", "last_edited_time"] + }, + "last_edited_time": { + "$ref": "#/components/schemas/DatePropertyFilter" + } + }, + "required": ["timestamp", "last_edited_time"] + } + ] + }, + "TextPropertyFilter": { + "type": "object", + "properties": { + "equals": { + "type": "string" + }, + "does_not_equal": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "does_not_contain": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "NumberPropertyFilter": { + "type": "object", + "properties": { + "equals": { + "type": "number" + }, + "does_not_equal": { + "type": "number" + }, + "greater_than": { + "type": "number" + }, + "less_than": { + "type": "number" + }, + "greater_than_or_equal_to": { + "type": "number" + }, + "less_than_or_equal_to": { + "type": "number" + }, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "CheckboxPropertyFilter": { + "type": "object", + "properties": { + "equals": { + "type": "boolean" + }, + "does_not_equal": { + "type": "boolean" + } + } + }, + "SelectPropertyFilter": { + "type": "object", + "properties": { + "equals": { + "type": "string" + }, + "does_not_equal": { + "type": "string" + }, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "MultiSelectPropertyFilter": { + "type": "object", + "properties": { + "contains": { + "type": "string" + }, + "does_not_contain": { + "type": "string" + }, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "DatePropertyFilter": { + "type": "object", + "properties": { + "equals": { + "type": "string" + }, + "before": { + "type": "string" + }, + "after": { + "type": "string" + }, + "on_or_before": { + "type": "string" + }, + "on_or_after": { + "type": "string" + }, + "past_week": {}, + "past_month": {}, + "past_year": {}, + "next_week": {}, + "next_month": {}, + "next_year": {}, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "PeoplePropertyFilter": { + "type": "object", + "properties": { + "contains": { + "type": "string" + }, + "does_not_contain": { + "type": "string" + }, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "FilesPropertyFilter": { + "type": "object", + "properties": { + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "RelationPropertyFilter": { + "type": "object", + "properties": { + "contains": { + "type": "string" + }, + "does_not_contain": { + "type": "string" + }, + "is_empty": { + "type": "boolean" + }, + "is_not_empty": { + "type": "boolean" + } + } + }, + "CompoundFilter": { + "type": "object", + "properties": { + "and": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PropertyFilter" + } + }, + "or": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PropertyFilter" + } + } + } + }, + "BlockObjectRequest": { + "oneOf": [ + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["paragraph"] + }, + "paragraph": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "paragraph"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["heading_1"] + }, + "heading_1": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "heading_1"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["heading_2"] + }, + "heading_2": { + "type": "object", + + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "heading_2"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["heading_3"] + }, + "heading_3": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "heading_3"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["bulleted_list_item"] + }, + "bulleted_list_item": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "bulleted_list_item"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["numbered_list_item"] + }, + "numbered_list_item": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "numbered_list_item"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["to_do"] + }, + "to_do": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "checked": { + "type": "boolean" + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text", "checked"] + } + }, + "required": ["object", "type", "to_do"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["toggle"] + }, + "toggle": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "color": { + "type": "string" + } + }, + "required": ["rich_text"] + } + }, + "required": ["object", "type", "toggle"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["code"] + }, + "code": { + "type": "object", + "properties": { + "rich_text": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + }, + "language": { + "type": "string" + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["rich_text", "language"] + } + }, + "required": ["object", "type", "code"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["child_page"] + }, + "child_page": { + "type": "object", + "properties": { + "title": { + "type": "string" + } + }, + "required": ["title"] + } + }, + "required": ["object", "type", "child_page"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["child_database"] + }, + "child_database": { + "type": "object", + "properties": { + "title": { + "type": "string" + } + }, + "required": ["title"] + } + }, + "required": ["object", "type", "child_database"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["embed"] + }, + "embed": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["url"] + } + }, + "required": ["object", "type", "embed"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["image"] + }, + "image": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["external"] + } + }, + "required": ["object", "type", "image"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["video"] + }, + "video": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["external"] + } + }, + "required": ["object", "type", "video"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["file"] + }, + "file": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["external"] + } + }, + "required": ["object", "type", "file"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["pdf"] + }, + "pdf": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["external"] + } + }, + "required": ["object", "type", "pdf"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["bookmark"] + }, + "bookmark": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "caption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + }, + "required": ["url"] + } + }, + "required": ["object", "type", "bookmark"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["equation"] + }, + "equation": { + "type": "object", + "properties": { + "expression": { + "type": "string" + } + }, + "required": ["expression"] + } + }, + "required": ["object", "type", "equation"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["divider"] + }, + "divider": { + "type": "object" + } + }, + "required": ["object", "type", "divider"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["table_of_contents"] + }, + "table_of_contents": { + "type": "object", + "properties": { + "color": { + "type": "string" + } + } + } + }, + "required": ["object", "type", "table_of_contents"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["column_list"] + }, + "column_list": { + "type": "object" + } + }, + "required": ["object", "type", "column_list"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["column"] + }, + "column": { + "type": "object" + } + }, + "required": ["object", "type", "column"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["link_to_page"] + }, + "link_to_page": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["page_id"] + }, + "page_id": { + "type": "string" + } + }, + "required": ["type", "page_id"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["database_id"] + }, + "database_id": { + "type": "string" + } + }, + "required": ["type", "database_id"] + } + ] + } + }, + "required": ["object", "type", "link_to_page"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["table"] + }, + "table": { + "type": "object", + "properties": { + "table_width": { + "type": "integer" + }, + "has_column_header": { + "type": "boolean" + }, + "has_row_header": { + "type": "boolean" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlockObjectRequest" + } + } + }, + "required": ["table_width", "children"] + } + }, + "required": ["object", "type", "table"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["table_row"] + }, + "table_row": { + "type": "object", + "properties": { + "cells": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RichTextItemRequest" + } + } + } + }, + "required": ["cells"] + } + }, + "required": ["object", "type", "table_row"] + }, + { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": ["block"] + }, + "type": { + "type": "string", + "enum": ["synced_block"] + }, + "synced_block": { + "type": "object", + "properties": { + "synced_from": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["block_id"] + }, + "block_id": { + "type": "string" + } + }, + "required": ["type", "block_id"] + }, + { + "type": "null" + } + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlockObjectRequest" + } + } + } + } + }, + "required": ["object", "type", "synced_block"] + } + ] + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/pet-store.json b/packages/openapi-to-ts/fixtures/openapi/3.0/pet-store.json new file mode 100644 index 0000000..9d717b6 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/pet-store.json @@ -0,0 +1,177 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore", + "license": { + "name": "MIT" + } + }, + "servers": [ + { + "url": "http://petstore.swagger.io/v1" + } + ], + "paths": { + "/pets": { + "get": { + "summary": "List all pets", + "operationId": "listPets", + "tags": ["pets"], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "How many items to return at one time (max 100)", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "A paged array of pets", + "headers": { + "x-next": { + "description": "A link to the next page of responses", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pets" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "summary": "Create a pet", + "operationId": "createPets", + "tags": ["pets"], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Null response" + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/pets/{petId}": { + "get": { + "summary": "Info for a specific pet", + "operationId": "showPetById", + "tags": ["pets"], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "description": "The id of the pet to retrieve", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Pet": { + "type": "object", + "required": ["id", "name"], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "Pets": { + "type": "array", + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/Pet" + } + }, + "Error": { + "type": "object", + "required": ["code", "message"], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/petstore-expanded.json b/packages/openapi-to-ts/fixtures/openapi/3.0/petstore-expanded.json new file mode 100644 index 0000000..1f67c0f --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/petstore-expanded.json @@ -0,0 +1,235 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore", + "description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "name": "Swagger API Team", + "email": "apiteam@swagger.io", + "url": "http://swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "http://petstore.swagger.io/api" + } + ], + "paths": { + "/pets": { + "get": { + "description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.", + "operationId": "findPets", + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "tags to filter by", + "required": false, + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "maximum number of results to return", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "description": "Creates a new pet in the store. Duplicates are allowed", + "operationId": "addPet", + "requestBody": { + "description": "Pet to add to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewPet" + } + } + } + }, + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/pets/{id}": { + "get": { + "description": "Returns a user based on a single ID, if the user does not have access to the pet", + "operationId": "find pet by id", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "pet response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "description": "deletes a single pet based on the ID supplied", + "operationId": "deletePet", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to delete", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "pet deleted" + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Pet": { + "allOf": [ + { + "$ref": "#/components/schemas/NewPet" + }, + { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "NewPet": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "Error": { + "type": "object", + "required": ["code", "message"], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/readme.json b/packages/openapi-to-ts/fixtures/openapi/3.0/readme.json new file mode 100644 index 0000000..7d7961f --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/readme.json @@ -0,0 +1,2965 @@ +{ + "openapi": "3.0.2", + "info": { + "description": "Create beautiful product and API documentation with our developer friendly platform.", + "version": "4.355.0", + "title": "ReadMe API 🦉", + "contact": { + "name": "API Support", + "url": "https://docs.readme.com/main/docs/need-more-support", + "email": "support@readme.io" + } + }, + "servers": [ + { + "url": "https://dash.readme.com/api/v1" + } + ], + "tags": [ + { + "name": "API Registry" + }, + { + "name": "API Specification" + }, + { + "name": "Apply to ReadMe" + }, + { + "name": "Categories" + }, + { + "name": "Changelog" + }, + { + "name": "Custom Pages" + }, + { + "name": "Docs" + }, + { + "name": "Errors" + }, + { + "name": "Projects" + }, + { + "name": "Version" + } + ], + "paths": { + "/api-registry/{uuid}": { + "get": { + "operationId": "getAPIRegistry", + "summary": "Retrieve an entry from the API Registry", + "description": "Get an API definition file that's been uploaded to ReadMe.", + "tags": ["API Registry"], + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "An API Registry UUID. This can be found by navigating to your API Reference page and viewing code snippets for Node with the `api` library.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully retrieved API registry entry.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "$ref": "#/components/responses/error_REGISTRY_NOTFOUND" + } + } + } + }, + "/api-specification": { + "get": { + "operationId": "getAPISpecification", + "summary": "Get metadata", + "description": "Get API specification metadata.", + "tags": ["API Specification"], + "parameters": [ + { + "$ref": "#/components/parameters/perPage" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved API specification metadata.", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + }, + "x-total-count": { + "$ref": "#/components/headers/x-total-count" + } + } + }, + "400": { + "$ref": "#/components/responses/error_VERSION_EMPTY" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_VERSION_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "uploadAPISpecification", + "summary": "Upload specification", + "description": "Upload an API specification to ReadMe. Or, to use a newer solution see https://docs.readme.com/main/docs/rdme.", + "tags": ["API Specification"], + "parameters": [ + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "spec": { + "description": "OpenAPI/Swagger file. We accept JSON or YAML.", + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "The API specification was successfully uploaded." + }, + "400": { + "description": "There was a validation error during upload.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/error_SPEC_FILE_EMPTY" + }, + { + "$ref": "#/components/schemas/error_SPEC_INVALID" + }, + { + "$ref": "#/components/schemas/error_SPEC_INVALID_SCHEMA" + }, + { + "$ref": "#/components/schemas/error_SPEC_VERSION_NOTFOUND" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "408": { + "$ref": "#/components/responses/error_SPEC_TIMEOUT" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/api-specification/{id}": { + "put": { + "operationId": "updateAPISpecification", + "summary": "Update specification", + "description": "Update an API specification in ReadMe.", + "tags": ["API Specification"], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "spec": { + "description": "OpenAPI/Swagger file. We accept JSON or YAML.", + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The API specification was updated." + }, + "400": { + "description": "There was a validation error during upload.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/error_SPEC_FILE_EMPTY" + }, + { + "$ref": "#/components/schemas/error_SPEC_ID_DUPLICATE" + }, + { + "$ref": "#/components/schemas/error_SPEC_ID_INVALID" + }, + { + "$ref": "#/components/schemas/error_SPEC_INVALID" + }, + { + "$ref": "#/components/schemas/error_SPEC_INVALID_SCHEMA" + }, + { + "$ref": "#/components/schemas/error_SPEC_VERSION_NOTFOUND" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "description": "There is no API specification with that ID." + }, + "408": { + "$ref": "#/components/responses/error_SPEC_TIMEOUT" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteAPISpecification", + "summary": "Delete specification", + "description": "Delete an API specification in ReadMe.", + "tags": ["API Specification"], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "204": { + "description": "The API specification was deleted." + }, + "400": { + "$ref": "#/components/responses/error_SPEC_ID_INVALID" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_SPEC_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/apply": { + "get": { + "operationId": "getOpenRoles", + "summary": "Get open roles", + "description": "Returns all the roles we're hiring for at ReadMe!", + "tags": ["Apply to ReadMe"], + "responses": { + "200": { + "description": "All the roles that we're hiring for.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/jobOpening" + } + } + } + } + } + } + }, + "post": { + "operationId": "applyToReadMe", + "summary": "Submit your application!", + "description": "This endpoint will let you apply to a job at ReadMe programatically, without having to go through our UI!", + "tags": ["Apply to ReadMe"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apply" + } + } + } + }, + "responses": { + "200": { + "description": "You did it!" + } + } + } + }, + "/categories": { + "get": { + "operationId": "getCategories", + "summary": "Get all categories", + "description": "Returns all the categories for a specified version.", + "tags": ["Categories"], + "parameters": [ + { + "$ref": "#/components/parameters/x-readme-version" + }, + { + "$ref": "#/components/parameters/perPage" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "The list of categories.", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + }, + "x-total-count": { + "$ref": "#/components/headers/x-total-count" + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createCategory", + "summary": "Create category", + "description": "Create a new category inside of this project.", + "tags": ["Categories"], + "parameters": [ + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/category" + }, + { + "required": ["title"] + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "The category has successfully been created." + }, + "400": { + "$ref": "#/components/responses/error_CATEGORY_INVALID" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/categories/{slug}": { + "get": { + "operationId": "getCategory", + "summary": "Get category", + "description": "Returns the category with this slug.", + "tags": ["Categories"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "200": { + "description": "The category exists and has been returned." + }, + "404": { + "$ref": "#/components/responses/error_CATEGORY_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateCategory", + "summary": "Update category", + "description": "Change the properties of a category.", + "tags": ["Categories"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/category" + } + } + } + }, + "responses": { + "200": { + "description": "The category was successfully updated." + }, + "400": { + "$ref": "#/components/responses/error_CATEGORY_INVALID" + }, + "404": { + "$ref": "#/components/responses/error_CATEGORY_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteCategory", + "summary": "Delete category", + "description": "Delete the category with this slug.\n>⚠️Heads Up!\n> This will also delete all of the docs within this category.", + "tags": ["Categories"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "204": { + "description": "The category was deleted." + }, + "404": { + "$ref": "#/components/responses/error_CATEGORY_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/categories/{slug}/docs": { + "get": { + "operationId": "getCategoryDocs", + "summary": "Get docs for category", + "description": "Returns the docs and children docs within this category.", + "tags": ["Categories"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "200": { + "description": "The category exists and all of the docs have been returned." + }, + "404": { + "$ref": "#/components/responses/error_CATEGORY_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/changelogs": { + "get": { + "operationId": "getChangelogs", + "summary": "Get changelogs", + "description": "Returns a list of changelogs.", + "tags": ["Changelog"], + "parameters": [ + { + "$ref": "#/components/parameters/perPage" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "The list of changelogs.", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + }, + "x-total-count": { + "$ref": "#/components/headers/x-total-count" + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createChangelog", + "summary": "Create changelog", + "description": "Create a new changelog entry.", + "tags": ["Changelog"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/changelog" + } + } + } + }, + "responses": { + "201": { + "description": "The changelog was successfully created." + }, + "400": { + "description": "There was a validation error during creation." + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/changelogs/{slug}": { + "get": { + "operationId": "getChangelog", + "summary": "Get changelog", + "description": "Returns the changelog with this slug.", + "tags": ["Changelog"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Update\", enter the slug \"owlet-update\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The changelog exists and has been returned." + }, + "404": { + "description": "There is no changelog with that slug." + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateChangelog", + "summary": "Update changelog", + "description": "Update a changelog with this slug.", + "tags": ["Changelog"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/changelog" + } + } + } + }, + "responses": { + "200": { + "description": "The changelog was successfully updated." + }, + "400": { + "description": "There was a validation error during update." + }, + "404": { + "description": "There is no changelog with that slug." + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteChangelog", + "summary": "Delete changelog", + "description": "Delete the changelog with this slug.", + "tags": ["Changelog"], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The changelog was successfully updated." + }, + "404": { + "description": "There is no changelog with that slug." + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/custompages": { + "get": { + "operationId": "getCustomPages", + "summary": "Get custom pages", + "description": "Returns a list of custom pages.", + "tags": ["Custom Pages"], + "parameters": [ + { + "$ref": "#/components/parameters/perPage" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "The list of custom pages.", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + }, + "x-total-count": { + "$ref": "#/components/headers/x-total-count" + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createCustomPage", + "summary": "Create custom page", + "description": "Create a new custom page inside of this project.", + "tags": ["Custom Pages"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customPage" + } + } + } + }, + "responses": { + "201": { + "description": "The custom page was successfully created." + }, + "400": { + "$ref": "#/components/responses/error_CUSTOMPAGE_INVALID" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/custompages/{slug}": { + "get": { + "operationId": "getCustomPage", + "summary": "Get custom page", + "description": "Returns the custom page with this slug.", + "tags": ["Custom Pages"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + } + ], + "responses": { + "200": { + "description": "The custom page exists and has been returned." + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_CUSTOMPAGE_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateCustomPage", + "summary": "Update custom page", + "description": "Update a custom page with this slug.", + "tags": ["Custom Pages"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customPage" + } + } + } + }, + "responses": { + "200": { + "description": "The custom page was successfully updated." + }, + "400": { + "$ref": "#/components/responses/error_CUSTOMPAGE_INVALID" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_CUSTOMPAGE_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteCustomPage", + "summary": "Delete custom page", + "description": "Delete the custom page with this slug.", + "tags": ["Custom Pages"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + } + ], + "responses": { + "204": { + "description": "The custom page was successfully updated." + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_CUSTOMPAGE_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs/{slug}": { + "get": { + "operationId": "getDoc", + "summary": "Get doc", + "description": "Returns the doc with this slug.", + "tags": ["Docs"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "200": { + "description": "The doc exists and has been returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/docSchemaResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_DOC_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateDoc", + "summary": "Update doc", + "description": "Update a doc with this slug.", + "tags": ["Docs"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/docSchemaPut" + } + } + } + }, + "responses": { + "200": { + "description": "The doc was successfully updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/docSchemaResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/error_DOC_INVALID" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_DOC_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteDoc", + "summary": "Delete doc", + "description": "Delete the doc with this slug.", + "tags": ["Docs"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "204": { + "description": "The doc was successfully updated." + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_DOC_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs/{slug}/production": { + "get": { + "operationId": "getProductionDoc", + "summary": "Get production doc", + "description": "This is intended for use by enterprise users with staging enabled. This endpoint will return the live version of your document, whereas the standard endpoint will always return staging.", + "tags": ["Docs"], + "parameters": [ + { + "$ref": "#/components/parameters/slug" + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "200": { + "description": "The doc exists and has been returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/docSchemaResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_DOC_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs": { + "post": { + "operationId": "createDoc", + "summary": "Create doc", + "description": "Create a new doc inside of this project.", + "tags": ["Docs"], + "parameters": [ + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/docSchemaPost" + } + } + } + }, + "responses": { + "201": { + "description": "The doc was successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/docSchemaResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/error_DOC_INVALID" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs/search": { + "post": { + "operationId": "searchDocs", + "summary": "Search docs", + "description": "Returns all docs that match the search.", + "tags": ["Docs"], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Search string to look for.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/x-readme-version" + } + ], + "responses": { + "200": { + "description": "The search was successful and results were returned." + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/": { + "get": { + "operationId": "getProject", + "summary": "Get metadata about the current project", + "description": "Returns project data for the API key.", + "tags": ["Projects"], + "responses": { + "200": { + "description": "Project data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/condensedProjectData" + } + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/schema": { + "get": { + "operationId": "getAPISchema", + "summary": "Get our OpenAPI Definition", + "description": "Returns a copy of our OpenAPI Definition.", + "tags": ["API Specification"], + "responses": { + "200": { + "description": "OpenAPI Definition data", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/version": { + "get": { + "operationId": "getVersions", + "summary": "Get versions", + "description": "Retrieve a list of versions associated with a project API key.", + "tags": ["Version"], + "responses": { + "200": { + "description": "A list of versions." + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createVersion", + "summary": "Create version", + "description": "Create a new version.", + "tags": ["Version"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/version" + } + } + } + }, + "responses": { + "200": { + "description": "The version was successfully created." + }, + "400": { + "description": "There was a validation error during creation.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/error_VERSION_EMPTY" + }, + { + "$ref": "#/components/schemas/error_VERSION_DUPLICATE" + }, + { + "$ref": "#/components/schemas/error_VERSION_FORK_EMPTY" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_VERSION_FORK_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/version/{versionId}": { + "get": { + "operationId": "getVersion", + "summary": "Get version", + "description": "Returns the version with this version ID.", + "tags": ["Version"], + "parameters": [ + { + "$ref": "#/components/parameters/versionId" + } + ], + "responses": { + "200": { + "description": "The version exists and has been returned." + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_VERSION_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateVersion", + "summary": "Update version", + "description": "Update an existing version.", + "tags": ["Version"], + "parameters": [ + { + "$ref": "#/components/parameters/versionId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/version" + } + } + } + }, + "responses": { + "200": { + "description": "The version was successfully updated." + }, + "400": { + "$ref": "#/components/responses/error_VERSION_CANT_DEMOTE_STABLE" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_VERSION_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteVersion", + "summary": "Delete version", + "description": "Delete a version", + "tags": ["Version"], + "parameters": [ + { + "$ref": "#/components/parameters/versionId" + } + ], + "responses": { + "200": { + "description": "The version was successfully deleted." + }, + "400": { + "$ref": "#/components/responses/error_VERSION_CANT_REMOVE_STABLE" + }, + "401": { + "$ref": "#/components/responses/authUnauthorized" + }, + "403": { + "$ref": "#/components/responses/authForbidden" + }, + "404": { + "$ref": "#/components/responses/error_VERSION_NOTFOUND" + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "apiKey": { + "type": "http", + "scheme": "basic" + } + }, + "headers": { + "link": { + "description": "Pagination information. See https://docs.readme.com/main/reference/pagination for more information.", + "schema": { + "type": "string" + } + }, + "x-total-count": { + "description": "The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination.", + "schema": { + "type": "string" + } + } + }, + "parameters": { + "slug": { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + }, + "page": { + "name": "page", + "in": "query", + "description": "Used to specify further pages (starts at 1).", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + "perPage": { + "name": "perPage", + "in": "query", + "description": "Number of items to include in pagination (up to 100, defaults to 10).", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + "x-readme-version": { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + }, + "versionId": { + "name": "versionId", + "in": "path", + "description": "Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions).", + "example": "v1.0.0", + "required": true, + "schema": { + "type": "string" + } + } + }, + "responses": { + "authForbidden": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/error_APIKEY_MISMATCH" + } + ] + } + } + } + }, + "authUnauthorized": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/error_APIKEY_EMPTY" + }, + { + "$ref": "#/components/schemas/error_APIKEY_NOTFOUND" + } + ] + } + } + } + }, + "error_APIKEY_EMPTY": { + "description": "An API key was not supplied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_APIKEY_EMPTY" + } + } + } + }, + "error_APIKEY_MISMATCH": { + "description": "The API key doesn't match the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_APIKEY_MISMATCH" + } + } + } + }, + "error_APIKEY_NOTFOUND": { + "description": "The API key couldn't be located.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_APIKEY_NOTFOUND" + } + } + } + }, + "error_APPLY_INVALID_EMAIL": { + "description": "You need to provide a valid email.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_APPLY_INVALID_EMAIL" + } + } + } + }, + "error_APPLY_INVALID_JOB": { + "description": "You need to provide a job.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_APPLY_INVALID_JOB" + } + } + } + }, + "error_APPLY_INVALID_NAME": { + "description": "You need to provide a name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_APPLY_INVALID_NAME" + } + } + } + }, + "error_CATEGORY_INVALID": { + "description": "The category couldn't be saved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_CATEGORY_INVALID" + } + } + } + }, + "error_CATEGORY_NOTFOUND": { + "description": "The category couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_CATEGORY_NOTFOUND" + } + } + } + }, + "error_CHANGELOG_INVALID": { + "description": "The changelog couldn't be saved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_CHANGELOG_INVALID" + } + } + } + }, + "error_CHANGELOG_NOTFOUND": { + "description": "The changelog couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_CHANGELOG_NOTFOUND" + } + } + } + }, + "error_CUSTOMPAGE_INVALID": { + "description": "The page couldn't be saved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_CUSTOMPAGE_INVALID" + } + } + } + }, + "error_CUSTOMPAGE_NOTFOUND": { + "description": "The custom page couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_CUSTOMPAGE_NOTFOUND" + } + } + } + }, + "error_DOC_INVALID": { + "description": "The doc couldn't be saved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_DOC_INVALID" + } + } + } + }, + "error_DOC_NOTFOUND": { + "description": "The doc couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_DOC_NOTFOUND" + } + } + } + }, + "error_ENDPOINT_NOTFOUND": { + "description": "The endpoint doesn't exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_ENDPOINT_NOTFOUND" + } + } + } + }, + "error_INTERNAL_ERROR": { + "description": "An unknown error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_INTERNAL_ERROR" + } + } + } + }, + "error_PROJECT_NEEDSSTAGING": { + "description": "The project does not have staging enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_PROJECT_NEEDSSTAGING" + } + } + } + }, + "error_PROJECT_NOTFOUND": { + "description": "The project couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_PROJECT_NOTFOUND" + } + } + } + }, + "error_RATE_LIMITED": { + "description": "The request has been rate limited.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_RATE_LIMITED" + } + } + } + }, + "error_REGISTRY_INVALID": { + "description": "The registry entry couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_REGISTRY_INVALID" + } + } + } + }, + "error_REGISTRY_NOTFOUND": { + "description": "The registry entry couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_REGISTRY_NOTFOUND" + } + } + } + }, + "error_SPEC_FILE_EMPTY": { + "description": "A spec file wasn't included.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_FILE_EMPTY" + } + } + } + }, + "error_SPEC_ID_DUPLICATE": { + "description": "The spec ID already tied to another version.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_ID_DUPLICATE" + } + } + } + }, + "error_SPEC_ID_INVALID": { + "description": "The spec ID isn't valid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_ID_INVALID" + } + } + } + }, + "error_SPEC_INVALID": { + "description": "The uploaded spec isn't valid JSON or YAML.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_INVALID" + } + } + } + }, + "error_SPEC_INVALID_SCHEMA": { + "description": "The uploaded spec has OpenAPI validation errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_INVALID_SCHEMA" + } + } + } + }, + "error_SPEC_NOTFOUND": { + "description": "The spec couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_NOTFOUND" + } + } + } + }, + "error_SPEC_TIMEOUT": { + "description": "The spec upload timed out.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_TIMEOUT" + } + } + } + }, + "error_SPEC_VERSION_NOTFOUND": { + "description": "The spec version couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_SPEC_VERSION_NOTFOUND" + } + } + } + }, + "error_UNEXPECTED_ERROR": { + "description": "An unknown error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_UNEXPECTED_ERROR" + } + } + } + }, + "error_VERSION_CANT_DEMOTE_STABLE": { + "description": "A stable version can't be demoted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_CANT_DEMOTE_STABLE" + } + } + } + }, + "error_VERSION_CANT_REMOVE_STABLE": { + "description": "A stable version can't be removed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_CANT_REMOVE_STABLE" + } + } + } + }, + "error_VERSION_DUPLICATE": { + "description": "The version already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_DUPLICATE" + } + } + } + }, + "error_VERSION_EMPTY": { + "description": "No version was supplied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_EMPTY" + } + } + } + }, + "error_VERSION_FORK_EMPTY": { + "description": "New versions need to be forked from an existing version.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_FORK_EMPTY" + } + } + } + }, + "error_VERSION_FORK_NOTFOUND": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_FORK_NOTFOUND" + } + } + } + }, + "error_VERSION_INVALID": { + "description": "The version is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_INVALID" + } + } + } + }, + "error_VERSION_NOTFOUND": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_VERSION_NOTFOUND" + } + } + } + } + }, + "schemas": { + "baseError": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + "apply": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "Your full name", + "default": "Your Name" + }, + "email": { + "type": "string", + "format": "email", + "description": "A valid email we can reach you at.", + "default": "you@example.com" + }, + "job": { + "type": "string", + "description": "The job you're looking to apply for (https://readme.com/careers).", + "enum": [ + "Front End Engineer", + "Full Stack Engineer", + "Head of Product", + "Head of Solutions Engineering", + "Product Designer" + ], + "default": "Front End Engineer" + }, + "pronouns": { + "type": "string", + "description": "Learn more at https://lgbtlifecenter.org/pronouns/" + }, + "linkedin": { + "type": "string", + "format": "url", + "description": "What have you been up to the past few years?" + }, + "github": { + "type": "string", + "description": "Or Bitbucket, Gitlab or anywhere else your code is hosted!", + "format": "url" + }, + "coverLetter": { + "type": "string", + "format": "blob", + "description": "What should we know about you?" + }, + "dontReallyApply": { + "type": "boolean", + "description": "Want to play with the API but not actually apply? Set this to true.", + "default": false + } + }, + "required": ["name", "email", "job"] + }, + "category": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short title for the category. This is what will show in the sidebar." + }, + "type": { + "type": "string", + "enum": ["reference", "guide"], + "default": "guide", + "description": "A category can be part of your reference or guide documentation, which is determined by this field." + } + } + }, + "changelog": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the changelog." + }, + "type": { + "type": "string", + "default": "", + "enum": ["", "added", "fixed", "improved", "deprecated", "removed"] + }, + "body": { + "type": "string", + "description": "Body content of the changelog." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the changelog.", + "default": true + } + }, + "required": ["title", "body"] + }, + "condensedProjectData": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "jwtSecret": { + "type": "string" + }, + "baseUrl": { + "type": "string", + "format": "url", + "description": "The base URL for the project. If the project is not running under a custom domain, it will be `https://projectSubdomain.readme.io`, otherwise it can either be or `https://example.com` or, in the case of an enterprise child project `https://example.com/projectSubdomain`." + }, + "plan": { + "type": "string" + } + } + }, + "customPage": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the custom page." + }, + "body": { + "type": "string", + "description": "Body formatted in Markdown (displayed by default)." + }, + "html": { + "type": "string", + "description": "Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)." + }, + "htmlmode": { + "type": "boolean", + "description": "**true** if `html` should be displayed, **false** if `body` should be displayed.", + "default": false + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the custom page.", + "default": true + } + }, + "required": ["title"] + }, + "docSchemaPost": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": ["basic", "error", "link"] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + }, + "categorySlug": { + "type": "string", + "description": "The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field." + }, + "parentDocSlug": { + "type": "string", + "description": "If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field." + } + }, + "oneOf": [ + { + "required": ["title", "category"], + "title": "`category` Parameter" + }, + { + "required": ["title", "categorySlug"], + "title": "`categorySlug` Parameter" + } + ], + "additionalProperties": true + }, + "docSchemaPut": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": ["basic", "error", "link"] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + }, + "categorySlug": { + "type": "string", + "description": "The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field." + }, + "parentDocSlug": { + "type": "string", + "description": "If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field." + } + }, + "additionalProperties": true + }, + "docSchemaResponse": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": ["basic", "error", "link"] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + } + }, + "additionalProperties": true + }, + "version": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Semantic Version" + }, + "codename": { + "type": "string", + "description": "Dubbed name of version." + }, + "from": { + "type": "string", + "description": "Semantic Version to use as the base fork." + }, + "is_stable": { + "type": "boolean", + "description": "Should this be the **main** version?" + }, + "is_beta": { + "type": "boolean", + "default": true + }, + "is_hidden": { + "type": "boolean", + "description": "Should this be publically accessible?" + }, + "is_deprecated": { + "type": "boolean", + "description": "Should this be deprecated? Only allowed in PUT operations." + } + }, + "required": ["version", "from"] + }, + "jobOpening": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "A slugified version of the job opening title.", + "example": "api-engineer" + }, + "title": { + "type": "string", + "description": "The job opening position.", + "example": "API Engineer" + }, + "description": { + "type": "string", + "description": "The description for this open position. This content is formatted as HTML." + }, + "pullquote": { + "type": "string", + "description": "A short pullquote for the open position.", + "example": "Deeply knowledgeable of the web, HTTP, and the API space." + }, + "location": { + "type": "string", + "description": "Where this position is located at.", + "example": "Remote" + }, + "department": { + "type": "string", + "description": "The internal organization you'll be working in.", + "example": "Engineering" + }, + "url": { + "type": "string", + "format": "url", + "description": "The place where you can apply for the position!" + } + } + }, + "error_APIKEY_EMPTY": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + "error_APIKEY_MISMATCH": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + }, + "error_APIKEY_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + }, + "error_APPLY_INVALID_EMAIL": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_EMAIL" + } + } + } + ] + }, + "error_APPLY_INVALID_JOB": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_JOB" + } + } + } + ] + }, + "error_APPLY_INVALID_NAME": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_NAME" + } + } + } + ] + }, + "error_CATEGORY_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_INVALID" + } + } + } + ] + }, + "error_CATEGORY_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + }, + "error_CHANGELOG_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CHANGELOG_INVALID" + } + } + } + ] + }, + "error_CHANGELOG_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CHANGELOG_NOTFOUND" + } + } + } + ] + }, + "error_CUSTOMPAGE_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_INVALID" + } + } + } + ] + }, + "error_CUSTOMPAGE_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_NOTFOUND" + } + } + } + ] + }, + "error_DOC_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_INVALID" + } + } + } + ] + }, + "error_DOC_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + }, + "error_ENDPOINT_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "ENDPOINT_NOTFOUND" + } + } + } + ] + }, + "error_INTERNAL_ERROR": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "INTERNAL_ERROR" + } + } + } + ] + }, + "error_PROJECT_NEEDSSTAGING": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "PROJECT_NEEDSSTAGING" + } + } + } + ] + }, + "error_PROJECT_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "PROJECT_NOTFOUND" + } + } + } + ] + }, + "error_RATE_LIMITED": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "RATE_LIMITED" + } + } + } + ] + }, + "error_REGISTRY_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_INVALID" + } + } + } + ] + }, + "error_REGISTRY_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_NOTFOUND" + } + } + } + ] + }, + "error_SPEC_FILE_EMPTY": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_FILE_EMPTY" + } + } + } + ] + }, + "error_SPEC_ID_DUPLICATE": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_DUPLICATE" + } + } + } + ] + }, + "error_SPEC_ID_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_INVALID" + } + } + } + ] + }, + "error_SPEC_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID" + } + } + } + ] + }, + "error_SPEC_INVALID_SCHEMA": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID_SCHEMA" + } + } + } + ] + }, + "error_SPEC_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_NOTFOUND" + } + } + } + ] + }, + "error_SPEC_TIMEOUT": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_TIMEOUT" + } + } + } + ] + }, + "error_SPEC_VERSION_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_VERSION_NOTFOUND" + } + } + } + ] + }, + "error_UNEXPECTED_ERROR": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "UNEXPECTED_ERROR" + } + } + } + ] + }, + "error_VERSION_CANT_DEMOTE_STABLE": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_DEMOTE_STABLE" + } + } + } + ] + }, + "error_VERSION_CANT_REMOVE_STABLE": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_REMOVE_STABLE" + } + } + } + ] + }, + "error_VERSION_DUPLICATE": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_DUPLICATE" + } + } + } + ] + }, + "error_VERSION_EMPTY": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_EMPTY" + } + } + } + ] + }, + "error_VERSION_FORK_EMPTY": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_EMPTY" + } + } + } + ] + }, + "error_VERSION_FORK_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_NOTFOUND" + } + } + } + ] + }, + "error_VERSION_INVALID": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_INVALID" + } + } + } + ] + }, + "error_VERSION_NOTFOUND": { + "allOf": [ + { + "$ref": "#/components/schemas/baseError" + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/security.json b/packages/openapi-to-ts/fixtures/openapi/3.0/security.json new file mode 100644 index 0000000..a641f1b --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/security.json @@ -0,0 +1,392 @@ +{ + "openapi": "3.0.3", + "info": { + "version": "1.0.0", + "title": "Support for different security types", + "description": "https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#securitySchemeObject" + }, + "servers": [ + { + "url": "https://httpbin.org" + } + ], + "tags": [ + { + "name": "API Key" + }, + { + "name": "HTTP" + }, + { + "name": "OAuth 2" + }, + { + "name": "OpenID Connect" + }, + { + "name": "Other" + } + ], + "paths": { + "/anything/apiKey": { + "get": { + "summary": "Query parameter", + "description": "`apiKey` auth will be supplied within an `apiKey` query parameter.", + "tags": ["API Key"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_query": [] + } + ] + }, + "post": { + "summary": "Cookie", + "description": "`apiKey` auth will be supplied within an `api_key` cookie.", + "tags": ["API Key"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_cookie": [] + } + ] + }, + "put": { + "summary": "Header", + "description": "`apiKey` auth will be supplied within an `X-API-KEY` header.", + "tags": ["API Key"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_header": [] + } + ] + } + }, + "/anything/basic": { + "post": { + "summary": "Basic", + "description": "Authentication credentials will be supplied within a `Basic` `Authorization` header.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample", + "tags": ["HTTP"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "basic": [] + } + ] + } + }, + "/anything/bearer": { + "post": { + "summary": "Bearer", + "description": "Authentication credentials will be supplied within a `Bearer` `Authorization` header.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample", + "tags": ["HTTP"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "summary": "Bearer (`jwt` format)", + "description": "Authentication credentials will be supplied within a `Bearer` `Authorization` header, but its data should be controlled as a JWT.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample\n\n> ℹ️\n> We currently do not support any special handling for this so they're handled as a standard `Bearer` authentication token.", + "tags": ["HTTP"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "bearer_jwt": [] + } + ] + } + }, + "/anything/oauth2": { + "post": { + "summary": "General support (all flow types)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2": ["write:things"] + } + ] + }, + "get": { + "summary": "General support (authorizationCode flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_authorizationCode": ["write:things"] + } + ] + }, + "put": { + "summary": "General support (clientCredentials flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_clientCredentials": ["write:things"] + } + ] + }, + "patch": { + "summary": "General support (implicit flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_implicit": ["write:things"] + } + ] + }, + "delete": { + "summary": "General support (password flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_password": ["write:things"] + } + ] + } + }, + "/anything/openIdConnect": { + "post": { + "summary": "General support", + "description": "🚧 This is not supported.", + "tags": ["OpenID Connect"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "openIdConnect": [] + } + ] + } + }, + "/anything/no-auth": { + "post": { + "summary": "No auth requirements", + "description": "This operation does not have any authentication requirements.", + "tags": ["Other"], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/anything/optional-auth": { + "get": { + "summary": "Optional auth", + "description": "The `apiKey` query parameter auth on this operation is optional.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-requirement-object", + "tags": ["Other"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_query": [] + }, + {} + ] + } + }, + "/status/401": { + "post": { + "summary": "Forced invalid authentication", + "description": "This endpoint requires an authentication header but making any request to it will forcefully return a 401 status code for invalid auth.", + "tags": ["Other"], + "responses": { + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "apiKey_header": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "apiKey_cookie": { + "type": "apiKey", + "in": "cookie", + "name": "api_key", + "description": "An API key that will be supplied in a named cookie. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-scheme-object" + }, + "apiKey_header": { + "type": "apiKey", + "in": "header", + "name": "X-API-KEY", + "description": "An API key that will be supplied in a named header. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-scheme-object" + }, + "apiKey_query": { + "type": "apiKey", + "in": "query", + "name": "apiKey", + "description": "An API key that will be supplied in a named query parameter. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-scheme-object" + }, + "basic": { + "type": "http", + "scheme": "basic", + "description": "Basic auth that takes a base64'd combination of `user:password`. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample" + }, + "bearer": { + "type": "http", + "scheme": "bearer", + "description": "A bearer token that will be supplied within an `Authentication` header as `bearer `. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample" + }, + "bearer_jwt": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "A bearer token that will be supplied within an `Authentication` header as `bearer `. In this case, the format of the token is specified as JWT. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#jwt-bearer-sample" + }, + "oauth2": { + "type": "oauth2", + "description": "An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23", + "flows": { + "authorizationCode": { + "authorizationUrl": "http://example.com/oauth/dialog", + "tokenUrl": "http://example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + }, + "clientCredentials": { + "tokenUrl": "http://example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + }, + "implicit": { + "authorizationUrl": "http://example.com/oauth/dialog", + "scopes": { + "write:things": "Add things to your account" + } + }, + "password": { + "tokenUrl": "http://example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_authorizationCode": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `authorizationCode` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauth-flows-object", + "flows": { + "authorizationCode": { + "authorizationUrl": "http://alt.example.com/oauth/dialog", + "tokenUrl": "http://alt.example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_clientCredentials": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `clientCredentials` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauth-flows-object", + "flows": { + "clientCredentials": { + "tokenUrl": "http://alt.example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_implicit": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `implicit` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauth-flows-object", + "flows": { + "implicit": { + "authorizationUrl": "http://alt.example.com/oauth/dialog", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_password": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `password` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauth-flows-object", + "flows": { + "password": { + "tokenUrl": "http://alt.example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "openIdConnect": { + "type": "openIdConnect", + "openIdConnectUrl": "https://example.com/.well-known/openid-configuration", + "description": "OpenAPI authentication. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23" + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/stripe.json b/packages/openapi-to-ts/fixtures/openapi/3.0/stripe.json new file mode 100644 index 0000000..66a2219 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/stripe.json @@ -0,0 +1,162274 @@ +{ + "components": { + "schemas": { + "account": { + "description": "This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection)\nis `application`, which includes Custom accounts, the properties below are always\nreturned.\n\nFor accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection)\nis `stripe`, which includes Standard and Express accounts, some properties are only returned\nuntil you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions)\nto start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts).", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_business_profile" + } + ], + "description": "Business information about the account.", + "nullable": true + }, + "business_type": { + "description": "The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "$ref": "#/components/schemas/account_capabilities" + }, + "charges_enabled": { + "description": "Whether the account can process charges.", + "type": "boolean" + }, + "company": { + "$ref": "#/components/schemas/legal_entity_company" + }, + "controller": { + "$ref": "#/components/schemas/account_unification_account_controller" + }, + "country": { + "description": "The account's country.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the account was connected. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "details_submitted": { + "description": "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.", + "type": "boolean" + }, + "email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "external_accounts": { + "description": "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.", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": ["data"] + }, + "future_requirements": { + "$ref": "#/components/schemas/account_future_requirements" + }, + "groups": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_group_membership" + } + ], + "description": "The groups associated with the account.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "$ref": "#/components/schemas/person" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account"], + "type": "string" + }, + "payouts_enabled": { + "description": "Whether the funds in this account can be paid out.", + "type": "boolean" + }, + "requirements": { + "$ref": "#/components/schemas/account_requirements" + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_settings" + } + ], + "description": "Options for customizing how the account functions within Stripe.", + "nullable": true + }, + "tos_acceptance": { + "$ref": "#/components/schemas/account_tos_acceptance" + }, + "type": { + "description": "The Stripe account type. Can be `standard`, `express`, `custom`, or `none`.", + "enum": ["custom", "express", "none", "standard"], + "type": "string" + } + }, + "required": ["id", "object"], + "title": "Account", + "type": "object", + "x-expandableFields": [ + "business_profile", + "capabilities", + "company", + "controller", + "external_accounts", + "future_requirements", + "groups", + "individual", + "requirements", + "settings", + "tos_acceptance" + ], + "x-resourceId": "account" + }, + "account_annual_revenue": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "nullable": true, + "type": "string" + }, + "fiscal_year_end": { + "description": "The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountAnnualRevenue", + "type": "object", + "x-expandableFields": [] + }, + "account_bacs_debit_payments_settings": { + "description": "", + "properties": { + "display_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_user_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "primary_color": { + "description": "A CSS hex color value representing the primary branding color for this account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "secondary_color": { + "description": "A CSS hex color value representing the secondary branding color for this account", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": ["icon", "logo"] + }, + "account_business_profile": { + "description": "", + "properties": { + "annual_revenue": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_annual_revenue" + } + ], + "description": "The applicant's gross annual revenue for its preceding fiscal year.", + "nullable": true + }, + "estimated_worker_count": { + "description": "An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.", + "nullable": true, + "type": "integer" + }, + "mcc": { + "description": "[The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "monthly_estimated_revenue": { + "$ref": "#/components/schemas/account_monthly_estimated_revenue" + }, + "name": { + "description": "The customer-facing business name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.", + "maxLength": 40000, + "nullable": true, + "type": "string" + }, + "support_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "A publicly available mailing address for sending support issues to.", + "nullable": true + }, + "support_email": { + "description": "A publicly available email address for sending support issues to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "support_phone": { + "description": "A publicly available phone number to call with support issues.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "support_url": { + "description": "A publicly available website for handling support issues.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The business's publicly available website.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": [ + "annual_revenue", + "monthly_estimated_revenue", + "support_address" + ] + }, + "account_capabilities": { + "description": "", + "properties": { + "acss_debit_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "affirm_payments": { + "description": "The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "afterpay_clearpay_payments": { + "description": "The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "alma_payments": { + "description": "The status of the Alma capability of the account, or whether the account can directly process Alma payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "amazon_pay_payments": { + "description": "The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "au_becs_debit_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "bacs_debit_payments": { + "description": "The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "bancontact_payments": { + "description": "The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "bank_transfer_payments": { + "description": "The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "blik_payments": { + "description": "The status of the blik payments capability of the account, or whether the account can directly process blik charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "boleto_payments": { + "description": "The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "card_issuing": { + "description": "The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "card_payments": { + "description": "The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "cartes_bancaires_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "cashapp_payments": { + "description": "The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "eps_payments": { + "description": "The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "fpx_payments": { + "description": "The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "gb_bank_transfer_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "giropay_payments": { + "description": "The status of the giropay payments capability of the account, or whether the account can directly process giropay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "grabpay_payments": { + "description": "The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "ideal_payments": { + "description": "The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "india_international_payments": { + "description": "The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "jcb_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "jp_bank_transfer_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "kakao_pay_payments": { + "description": "The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "klarna_payments": { + "description": "The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "konbini_payments": { + "description": "The status of the konbini payments capability of the account, or whether the account can directly process konbini charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "kr_card_payments": { + "description": "The status of the KrCard capability of the account, or whether the account can directly process KrCard payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "legacy_payments": { + "description": "The status of the legacy payments capability of the account.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "link_payments": { + "description": "The status of the link_payments capability of the account, or whether the account can directly process Link charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "mobilepay_payments": { + "description": "The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "multibanco_payments": { + "description": "The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "mx_bank_transfer_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "naver_pay_payments": { + "description": "The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "oxxo_payments": { + "description": "The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "p24_payments": { + "description": "The status of the P24 payments capability of the account, or whether the account can directly process P24 charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "pay_by_bank_payments": { + "description": "The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "payco_payments": { + "description": "The status of the Payco capability of the account, or whether the account can directly process Payco payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "paynow_payments": { + "description": "The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "promptpay_payments": { + "description": "The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "revolut_pay_payments": { + "description": "The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "samsung_pay_payments": { + "description": "The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "sepa_bank_transfer_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "sepa_debit_payments": { + "description": "The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "sofort_payments": { + "description": "The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "swish_payments": { + "description": "The status of the Swish capability of the account, or whether the account can directly process Swish payments.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "tax_reporting_us_1099_k": { + "description": "The status of the tax reporting 1099-K (US) capability of the account.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "tax_reporting_us_1099_misc": { + "description": "The status of the tax reporting 1099-MISC (US) capability of the account.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "transfers": { + "description": "The status of the transfers capability of the account, or whether your platform can transfer funds to the account.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "treasury": { + "description": "The status of the banking capability, or whether the account can have bank accounts.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "twint_payments": { + "description": "The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "us_bank_account_ach_payments": { + "description": "The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "us_bank_transfer_payments": { + "description": "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.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "zip_payments": { + "description": "The status of the Zip capability of the account, or whether the account can directly process Zip charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + } + }, + "title": "AccountCapabilities", + "type": "object", + "x-expandableFields": [] + }, + "account_capability_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "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.", + "enum": [ + "other", + "paused.inactivity", + "pending.onboarding", + "pending.review", + "platform_disabled", + "platform_paused", + "rejected.inactivity", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed" + ], + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "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`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_capability_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).", + "enum": [ + "other", + "paused.inactivity", + "pending.onboarding", + "pending.review", + "platform_disabled", + "platform_paused", + "rejected.inactivity", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed" + ], + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/card_issuing_account_terms_of_service" + } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": ["tos_acceptance"] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { + "$ref": "#/components/schemas/account_decline_charge_on" + }, + "statement_descriptor_prefix": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kanji": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": ["decline_on"] + }, + "account_dashboard_settings": { + "description": "", + "properties": { + "display_name": { + "description": "The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "timezone": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_decline_charge_on": { + "description": "", + "properties": { + "avs_failure": { + "description": "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.", + "type": "boolean" + }, + "cvc_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.", + "type": "boolean" + } + }, + "required": ["avs_failure", "cvc_failure"], + "title": "AccountDeclineChargeOn", + "type": "object", + "x-expandableFields": [] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "disabled_reason": { + "description": "This is typed as an enum for consistency with `requirements.disabled_reason`.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "nullable": true, + "type": "array" + }, + "eventually_due": { + "description": "Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "past_due": { + "description": "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`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_group_membership": { + "description": "", + "properties": { + "payments_pricing": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountGroupMembership", + "type": "object", + "x-expandableFields": [] + }, + "account_invoices_settings": { + "description": "", + "properties": { + "default_account_tax_ids": { + "description": "The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + } + }, + "title": "AccountInvoicesSettings", + "type": "object", + "x-expandableFields": ["default_account_tax_ids"] + }, + "account_link": { + "description": "Account Links are the means by which a Connect platform grants a connected account permission to access\nStripe-hosted applications, such as Connect Onboarding.\n\nRelated guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which this account link will expire.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account_link"], + "type": "string" + }, + "url": { + "description": "The URL for the account link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["created", "expires_at", "object", "url"], + "title": "AccountLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "account_link" + }, + "account_monthly_estimated_revenue": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "AccountMonthlyEstimatedRevenue", + "type": "object", + "x-expandableFields": [] + }, + "account_payments_settings": { + "description": "", + "properties": { + "statement_descriptor": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_kana": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_kanji": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_payout_settings": { + "description": "", + "properties": { + "debit_negative_balances": { + "description": "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`.", + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/transfer_schedule" + }, + "statement_descriptor": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["debit_negative_balances", "schedule"], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": ["schedule"] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "disabled_reason": { + "description": "If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).", + "enum": [ + "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" + ], + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "nullable": true, + "type": "array" + }, + "eventually_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to satisfy all fields in `original_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["alternative_fields_due", "original_fields_due"], + "title": "AccountRequirementsAlternative", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "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_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", + "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_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_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_supportability" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "An informative message that indicates the error type and provides additional details about the error.", + "maxLength": 5000, + "type": "string" + }, + "requirement": { + "description": "The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["code", "reason", "requirement"], + "title": "AccountRequirementsError", + "type": "object", + "x-expandableFields": [] + }, + "account_sepa_debit_payments_settings": { + "description": "", + "properties": { + "creditor_id": { + "description": "SEPA creditor identifier that identifies the company making the payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountSepaDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_session": { + "description": "An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.\n\nWe recommend that you create an AccountSession each time you need to display an embedded component\nto your user. Do not save AccountSessions to your database as they expire relatively\nquickly, and cannot be used more than once.\n\nRelated guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)", + "properties": { + "account": { + "description": "The ID of the account the AccountSession was created for", + "maxLength": 5000, + "type": "string" + }, + "client_secret": { + "description": "The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.\n\nThe 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.\n\nRefer 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.", + "maxLength": 5000, + "type": "string" + }, + "components": { + "$ref": "#/components/schemas/connect_embedded_account_session_create_components" + }, + "expires_at": { + "description": "The timestamp at which this AccountSession will expire.", + "format": "unix-time", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account_session"], + "type": "string" + } + }, + "required": [ + "account", + "client_secret", + "components", + "expires_at", + "livemode", + "object" + ], + "title": "ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession", + "type": "object", + "x-expandableFields": ["components"], + "x-resourceId": "account_session" + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { + "$ref": "#/components/schemas/account_bacs_debit_payments_settings" + }, + "branding": { + "$ref": "#/components/schemas/account_branding_settings" + }, + "card_issuing": { + "$ref": "#/components/schemas/account_card_issuing_settings" + }, + "card_payments": { + "$ref": "#/components/schemas/account_card_payments_settings" + }, + "dashboard": { + "$ref": "#/components/schemas/account_dashboard_settings" + }, + "invoices": { + "$ref": "#/components/schemas/account_invoices_settings" + }, + "payments": { + "$ref": "#/components/schemas/account_payments_settings" + }, + "payouts": { + "$ref": "#/components/schemas/account_payout_settings" + }, + "sepa_debit_payments": { + "$ref": "#/components/schemas/account_sepa_debit_payments_settings" + }, + "treasury": { + "$ref": "#/components/schemas/account_treasury_settings" + } + }, + "required": ["branding", "card_payments", "dashboard", "payments"], + "title": "AccountSettings", + "type": "object", + "x-expandableFields": [ + "bacs_debit_payments", + "branding", + "card_issuing", + "card_payments", + "dashboard", + "invoices", + "payments", + "payouts", + "sepa_debit_payments", + "treasury" + ] + }, + "account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted their service agreement", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the account representative accepted their service agreement", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_agreement": { + "description": "The user's service agreement type", + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted their service agreement", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "account_treasury_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/account_terms_of_service" + } + }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": ["tos_acceptance"] + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "fees": { + "$ref": "#/components/schemas/account_unification_account_controller_fees" + }, + "is_controller": { + "description": "`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.", + "type": "boolean" + }, + "losses": { + "$ref": "#/components/schemas/account_unification_account_controller_losses" + }, + "requirement_collection": { + "description": "A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.", + "enum": ["application", "stripe"], + "type": "string" + }, + "stripe_dashboard": { + "$ref": "#/components/schemas/account_unification_account_controller_stripe_dashboard" + }, + "type": { + "description": "The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.", + "enum": ["account", "application"], + "type": "string" + } + }, + "required": ["type"], + "title": "AccountUnificationAccountController", + "type": "object", + "x-expandableFields": ["fees", "losses", "stripe_dashboard"] + }, + "account_unification_account_controller_fees": { + "description": "", + "properties": { + "payer": { + "description": "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).", + "enum": [ + "account", + "application", + "application_custom", + "application_express" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["payer"], + "title": "AccountUnificationAccountControllerFees", + "type": "object", + "x-expandableFields": [] + }, + "account_unification_account_controller_losses": { + "description": "", + "properties": { + "payments": { + "description": "A value indicating who is liable when this account can't pay back negative balances from payments.", + "enum": ["application", "stripe"], + "type": "string" + } + }, + "required": ["payments"], + "title": "AccountUnificationAccountControllerLosses", + "type": "object", + "x-expandableFields": [] + }, + "account_unification_account_controller_stripe_dashboard": { + "description": "", + "properties": { + "type": { + "description": "A value indicating the Stripe dashboard this account has access to independent of the Connect application.", + "enum": ["express", "full", "none"], + "type": "string" + } + }, + "required": ["type"], + "title": "AccountUnificationAccountControllerStripeDashboard", + "type": "object", + "x-expandableFields": [] + }, + "address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "Address", + "type": "object", + "x-expandableFields": [] + }, + "amazon_pay_underlying_payment_method_funding_details": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_method_details_passthrough_card" + }, + "type": { + "description": "funding type of the underlying payment method.", + "enum": ["card"], + "nullable": true, + "type": "string" + } + }, + "title": "amazon_pay_underlying_payment_method_funding_details", + "type": "object", + "x-expandableFields": ["card"] + }, + "api_errors": { + "description": "", + "properties": { + "advice_code": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "charge": { + "description": "For card errors, the ID of the failed charge.", + "maxLength": 5000, + "type": "string" + }, + "code": { + "description": "For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "decline_code": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.", + "maxLength": 40000, + "type": "string" + }, + "network_advice_code": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "network_decline_code": { + "description": "For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.", + "maxLength": 5000, + "type": "string" + }, + "param": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "payment_intent": { + "$ref": "#/components/schemas/payment_intent" + }, + "payment_method": { + "$ref": "#/components/schemas/payment_method" + }, + "payment_method_type": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "request_log_url": { + "description": "A URL to the request log entry in your dashboard.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "$ref": "#/components/schemas/setup_intent" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "The [source object](https://stripe.com/docs/api/sources/object) for errors returned on a request involving a source.", + "x-stripeBypassValidation": true + }, + "type": { + "description": "The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`", + "enum": [ + "api_error", + "card_error", + "idempotency_error", + "invalid_request_error" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "APIErrors", + "type": "object", + "x-expandableFields": [ + "payment_intent", + "payment_method", + "setup_intent", + "source" + ] + }, + "apple_pay_domain": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "domain_name": { + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["apple_pay_domain"], + "type": "string" + } + }, + "required": ["created", "domain_name", "id", "livemode", "object"], + "title": "ApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "apple_pay_domain" + }, + "application": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["application"], + "type": "string" + } + }, + "required": ["id", "object"], + "title": "Application", + "type": "object", + "x-expandableFields": [] + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "amount": { + "description": "Amount earned, in cents (or local equivalent).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "fee_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/platform_earning_fee_source" + } + ], + "description": "Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["application_fee"], + "type": "string" + }, + "originating_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "refunded": { + "description": "Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the fee.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": ["data"] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "charge", + "created", + "currency", + "id", + "livemode", + "object", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "fee_source", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee" + }, + "apps.secret": { + "description": "Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.\n\nThe 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.\n\nAll 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.\n\nA `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.\n\nRelated guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deleted": { + "description": "If true, indicates that this secret has been deleted", + "type": "boolean" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["apps.secret"], + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "scope": { + "$ref": "#/components/schemas/secret_service_resource_scope" + } + }, + "required": ["created", "id", "livemode", "name", "object", "scope"], + "title": "SecretServiceResourceSecret", + "type": "object", + "x-expandableFields": ["scope"], + "x-resourceId": "apps.secret" + }, + "automatic_tax": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If Stripe disabled automatic tax, this enum describes why.", + "enum": [ + "finalization_requires_location_inputs", + "finalization_system_error" + ], + "nullable": true, + "type": "string" + }, + "enabled": { + "description": "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.", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + }, + "status": { + "description": "The status of the most recent automated tax calculation for this invoice.", + "enum": ["complete", "failed", "requires_location_inputs"], + "nullable": true, + "type": "string" + } + }, + "required": ["enabled"], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "balance": { + "description": "This is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.\n\nYou can also retrieve the balance history, which contains a list of\n[transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance\n(charges, payouts, and so forth).\n\nThe available and pending amounts for each currency are broken down further by\npayment source types.\n\nRelated guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)", + "properties": { + "available": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "connect_reserved": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "instant_available": { + "description": "Funds that you can pay out using Instant Payouts.", + "items": { + "$ref": "#/components/schemas/balance_amount_net" + }, + "type": "array" + }, + "issuing": { + "$ref": "#/components/schemas/balance_detail" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["balance"], + "type": "string" + }, + "pending": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + } + }, + "required": ["available", "livemode", "object", "pending"], + "title": "Balance", + "type": "object", + "x-expandableFields": [ + "available", + "connect_reserved", + "instant_available", + "issuing", + "pending" + ], + "x-resourceId": "balance" + }, + "balance_amount": { + "description": "", + "properties": { + "amount": { + "description": "Balance amount.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "source_types": { + "$ref": "#/components/schemas/balance_amount_by_source_type" + } + }, + "required": ["amount", "currency"], + "title": "BalanceAmount", + "type": "object", + "x-expandableFields": ["source_types"] + }, + "balance_amount_by_source_type": { + "description": "", + "properties": { + "bank_account": { + "description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).", + "type": "integer" + }, + "card": { + "description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).", + "type": "integer" + }, + "fpx": { + "description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.", + "type": "integer" + } + }, + "title": "BalanceAmountBySourceType", + "type": "object", + "x-expandableFields": [] + }, + "balance_amount_net": { + "description": "", + "properties": { + "amount": { + "description": "Balance amount.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "net_available": { + "description": "Breakdown of balance by destination.", + "items": { + "$ref": "#/components/schemas/balance_net_available" + }, + "type": "array" + }, + "source_types": { + "$ref": "#/components/schemas/balance_amount_by_source_type" + } + }, + "required": ["amount", "currency"], + "title": "BalanceAmountNet", + "type": "object", + "x-expandableFields": ["net_available", "source_types"] + }, + "balance_detail": { + "description": "", + "properties": { + "available": { + "description": "Funds that are available for use.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + } + }, + "required": ["available"], + "title": "BalanceDetail", + "type": "object", + "x-expandableFields": ["available"] + }, + "balance_net_available": { + "description": "", + "properties": { + "amount": { + "description": "Net balance amount, subtracting fees from platform-set pricing.", + "type": "integer" + }, + "destination": { + "description": "ID of the external account for this net balance (not expandable).", + "maxLength": 5000, + "type": "string" + }, + "source_types": { + "$ref": "#/components/schemas/balance_amount_by_source_type" + } + }, + "required": ["amount", "destination"], + "title": "BalanceNetAvailable", + "type": "object", + "x-expandableFields": ["source_types"] + }, + "balance_transaction": { + "description": "Balance transactions represent funds moving through your Stripe account.\nStripe creates them for every type of transaction that enters or leaves your Stripe account balance.\n\nRelated guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "available_on": { + "description": "The date that the transaction's net funds become available in the Stripe balance.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exchange_rate": { + "description": "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`.", + "nullable": true, + "type": "number" + }, + "fee": { + "description": "Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.", + "type": "integer" + }, + "fee_details": { + "description": "Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.", + "items": { + "$ref": "#/components/schemas/fee" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "net": { + "description": "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`", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["balance_transaction"], + "type": "string" + }, + "reporting_category": { + "description": "Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ], + "description": "This transaction relates to the Stripe object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + }, + "x-stripeBypassValidation": true + }, + "status": { + "description": "The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "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`, `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.", + "enum": [ + "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", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "created", + "currency", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": ["fee_details", "source"], + "x-resourceId": "balance_transaction" + }, + "bank_account": { + "description": "These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](/api#external_accounts) are transfer\ndestinations on `Account` objects for connected accounts.\nThey can be bank accounts or debit cards as well, and are documented in the links above.\n\nRelated guide: [Bank debits and transfers](/payments/bank-debits-transfers)", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The ID of the account that the bank account is associated with.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "available_payout_methods": { + "description": "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.", + "items": { + "enum": ["instant", "standard"], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "bank_name": { + "description": "Name of the bank associated with the routing number (e.g., `WELLS FARGO`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "format": "currency", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer that the bank account is associated with.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_for_currency": { + "description": "Whether this bank account is the default external account for its currency.", + "nullable": true, + "type": "boolean" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/external_account_requirements" + } + ], + "description": "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.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["bank_account"], + "type": "string" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/external_account_requirements" + } + ], + "description": "Information about the requirements for the bank account, including what information needs to be collected.", + "nullable": true + }, + "routing_number": { + "description": "The routing transit number for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, 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 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.\n\nFor external accounts, possible values are `new`, `errored` and `verification_failed`. 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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country", "currency", "id", "last4", "object", "status"], + "title": "BankAccount", + "type": "object", + "x-expandableFields": [ + "account", + "customer", + "future_requirements", + "requirements" + ], + "x-resourceId": "bank_account" + }, + "bank_connections_resource_accountholder": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "type": { + "description": "Type of account holder that this account belongs to.", + "enum": ["account", "customer"], + "type": "string" + } + }, + "required": ["type"], + "title": "BankConnectionsResourceAccountholder", + "type": "object", + "x-expandableFields": ["account", "customer"] + }, + "bank_connections_resource_balance": { + "description": "", + "properties": { + "as_of": { + "description": "The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "cash": { + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_cash_balance" + }, + "credit": { + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_credit_balance" + }, + "current": { + "additionalProperties": { + "type": "integer" + }, + "description": "The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach 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.", + "type": "object" + }, + "type": { + "description": "The `type` of the balance. An additional hash is included on the balance with a name matching this value.", + "enum": ["cash", "credit"], + "type": "string" + } + }, + "required": ["as_of", "current", "type"], + "title": "BankConnectionsResourceBalance", + "type": "object", + "x-expandableFields": ["cash", "credit"] + }, + "bank_connections_resource_balance_api_resource_cash_balance": { + "description": "", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "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.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach 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.", + "nullable": true, + "type": "object" + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCashBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_api_resource_credit_balance": { + "description": "", + "properties": { + "used": { + "additionalProperties": { + "type": "integer" + }, + "description": "The credit that has been used by the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach 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.", + "nullable": true, + "type": "object" + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCreditBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "next_refresh_available_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": ["failed", "pending", "succeeded"], + "type": "string" + } + }, + "required": ["last_attempted_at", "status"], + "title": "BankConnectionsResourceBalanceRefresh", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_link_account_session_filters": { + "description": "", + "properties": { + "account_subcategories": { + "description": "Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.", + "items": { + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "countries": { + "description": "List of countries from which to filter accounts.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "BankConnectionsResourceLinkAccountSessionFilters", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_ownership_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "next_refresh_available_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": ["failed", "pending", "succeeded"], + "type": "string" + } + }, + "required": ["last_attempted_at", "status"], + "title": "BankConnectionsResourceOwnershipRefresh", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_transaction_refresh": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "next_refresh_available_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": ["failed", "pending", "succeeded"], + "type": "string" + } + }, + "required": ["id", "last_attempted_at", "status"], + "title": "BankConnectionsResourceTransactionRefresh", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_transaction_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Time at which this transaction posted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "void_at": { + "description": "Time at which this transaction was voided. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "BankConnectionsResourceTransactionResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "billing.alert": { + "description": "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.", + "properties": { + "alert_type": { + "description": "Defines the type of the alert.", + "enum": ["usage_threshold"], + "type": "string", + "x-stripeBypassValidation": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.alert"], + "type": "string" + }, + "status": { + "description": "Status of the alert. This can be active, inactive or archived.", + "enum": ["active", "archived", "inactive"], + "nullable": true, + "type": "string" + }, + "title": { + "description": "Title of the alert.", + "maxLength": 5000, + "type": "string" + }, + "usage_threshold": { + "anyOf": [ + { + "$ref": "#/components/schemas/thresholds_resource_usage_threshold_config" + } + ], + "description": "Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).", + "nullable": true + } + }, + "required": ["alert_type", "id", "livemode", "object", "title"], + "title": "ThresholdsResourceAlert", + "type": "object", + "x-expandableFields": ["usage_threshold"], + "x-resourceId": "billing.alert" + }, + "billing.credit_balance_summary": { + "description": "Indicates the billing credit balance for billing credits granted to a customer.", + "properties": { + "balances": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/credit_balance" + }, + "type": "array" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The customer the balance is for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.credit_balance_summary"], + "type": "string" + } + }, + "required": ["balances", "customer", "livemode", "object"], + "title": "CreditBalanceSummary", + "type": "object", + "x-expandableFields": ["balances", "customer"], + "x-resourceId": "billing.credit_balance_summary" + }, + "billing.credit_balance_transaction": { + "description": "A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "credit": { + "anyOf": [ + { + "$ref": "#/components/schemas/billing_credit_grants_resource_balance_credit" + } + ], + "description": "Credit details for this credit balance transaction. Only present if type is `credit`.", + "nullable": true + }, + "credit_grant": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing.credit_grant" + } + ], + "description": "The credit grant associated with this credit balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing.credit_grant" + } + ] + } + }, + "debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/billing_credit_grants_resource_balance_debit" + } + ], + "description": "Debit details for this credit balance transaction. Only present if type is `debit`.", + "nullable": true + }, + "effective_at": { + "description": "The effective time of this credit balance transaction.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.credit_balance_transaction"], + "type": "string" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this credit balance transaction belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "type": { + "description": "The type of credit balance transaction (credit or debit).", + "enum": ["credit", "debit"], + "nullable": true, + "type": "string" + } + }, + "required": [ + "created", + "credit_grant", + "effective_at", + "id", + "livemode", + "object" + ], + "title": "CreditBalanceTransaction", + "type": "object", + "x-expandableFields": ["credit", "credit_grant", "debit", "test_clock"], + "x-resourceId": "billing.credit_balance_transaction" + }, + "billing.credit_grant": { + "description": "A credit grant is an API resource that documents the allocation of some billing credits to a customer.\n\nRelated guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)", + "properties": { + "amount": { + "$ref": "#/components/schemas/billing_credit_grants_resource_amount" + }, + "applicability_config": { + "$ref": "#/components/schemas/billing_credit_grants_resource_applicability_config" + }, + "category": { + "description": "The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.", + "enum": ["paid", "promotional"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer receiving the billing credits.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "effective_at": { + "description": "The time when the billing credits become effective-when they're eligible for use.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The time when the billing credits expire. If not present, the billing credits don't expire.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "A descriptive name shown in dashboard.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.credit_grant"], + "type": "string" + }, + "priority": { + "description": "The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.", + "nullable": true, + "type": "integer" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this credit grant belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "voided_at": { + "description": "The time when this credit grant was voided. If not present, the credit grant hasn't been voided.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount", + "applicability_config", + "category", + "created", + "customer", + "id", + "livemode", + "metadata", + "object", + "updated" + ], + "title": "CreditGrant", + "type": "object", + "x-expandableFields": [ + "amount", + "applicability_config", + "customer", + "test_clock" + ], + "x-resourceId": "billing.credit_grant" + }, + "billing.meter": { + "description": "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.\n\nRelated guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer_mapping": { + "$ref": "#/components/schemas/billing_meter_resource_customer_mapping_settings" + }, + "default_aggregation": { + "$ref": "#/components/schemas/billing_meter_resource_aggregation_settings" + }, + "display_name": { + "description": "The meter's name.", + "maxLength": 5000, + "type": "string" + }, + "event_name": { + "description": "The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.", + "maxLength": 5000, + "type": "string" + }, + "event_time_window": { + "description": "The time window to pre-aggregate meter events for, if any.", + "enum": ["day", "hour"], + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.meter"], + "type": "string" + }, + "status": { + "description": "The meter's status.", + "enum": ["active", "inactive"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/billing_meter_resource_billing_meter_status_transitions" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "value_settings": { + "$ref": "#/components/schemas/billing_meter_resource_billing_meter_value" + } + }, + "required": [ + "created", + "customer_mapping", + "default_aggregation", + "display_name", + "event_name", + "id", + "livemode", + "object", + "status", + "status_transitions", + "updated", + "value_settings" + ], + "title": "BillingMeter", + "type": "object", + "x-expandableFields": [ + "customer_mapping", + "default_aggregation", + "status_transitions", + "value_settings" + ], + "x-resourceId": "billing.meter" + }, + "billing.meter_event": { + "description": "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.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "event_name": { + "description": "The name of the meter event. Corresponds with the `event_name` field on a meter.", + "maxLength": 100, + "type": "string" + }, + "identifier": { + "description": "A unique identifier for the event.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.meter_event"], + "type": "string" + }, + "payload": { + "additionalProperties": { + "maxLength": 100, + "type": "string" + }, + "description": "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).", + "type": "object" + }, + "timestamp": { + "description": "The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "created", + "event_name", + "identifier", + "livemode", + "object", + "payload", + "timestamp" + ], + "title": "BillingMeterEvent", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "billing.meter_event" + }, + "billing.meter_event_adjustment": { + "description": "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.", + "properties": { + "cancel": { + "anyOf": [ + { + "$ref": "#/components/schemas/billing_meter_resource_billing_meter_event_adjustment_cancel" + } + ], + "description": "Specifies which event to cancel.", + "nullable": true + }, + "event_name": { + "description": "The name of the meter event. Corresponds with the `event_name` field on a meter.", + "maxLength": 100, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.meter_event_adjustment"], + "type": "string" + }, + "status": { + "description": "The meter event adjustment's status.", + "enum": ["complete", "pending"], + "type": "string" + }, + "type": { + "description": "Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.", + "enum": ["cancel"], + "type": "string" + } + }, + "required": ["event_name", "livemode", "object", "status", "type"], + "title": "BillingMeterEventAdjustment", + "type": "object", + "x-expandableFields": ["cancel"], + "x-resourceId": "billing.meter_event_adjustment" + }, + "billing.meter_event_summary": { + "description": "A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much\nusage was accrued by a customer for that period.\n\nNote: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.", + "properties": { + "aggregated_value": { + "description": "Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.", + "type": "number" + }, + "end_time": { + "description": "End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "meter": { + "description": "The meter associated with this event summary.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing.meter_event_summary"], + "type": "string" + }, + "start_time": { + "description": "Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "aggregated_value", + "end_time", + "id", + "livemode", + "meter", + "object", + "start_time" + ], + "title": "BillingMeterEventSummary", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "billing.meter_event_summary" + }, + "billing_clocks_resource_status_details_advancing_status_details": { + "description": "", + "properties": { + "target_frozen_time": { + "description": "The `frozen_time` that the Test Clock is advancing towards.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["target_frozen_time"], + "title": "BillingClocksResourceStatusDetailsAdvancingStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "billing_clocks_resource_status_details_status_details": { + "description": "", + "properties": { + "advancing": { + "$ref": "#/components/schemas/billing_clocks_resource_status_details_advancing_status_details" + } + }, + "title": "BillingClocksResourceStatusDetailsStatusDetails", + "type": "object", + "x-expandableFields": ["advancing"] + }, + "billing_credit_grants_resource_amount": { + "description": "", + "properties": { + "monetary": { + "anyOf": [ + { + "$ref": "#/components/schemas/billing_credit_grants_resource_monetary_amount" + } + ], + "description": "The monetary amount.", + "nullable": true + }, + "type": { + "description": "The type of this amount. We currently only support `monetary` billing credits.", + "enum": ["monetary"], + "type": "string" + } + }, + "required": ["type"], + "title": "BillingCreditGrantsResourceAmount", + "type": "object", + "x-expandableFields": ["monetary"] + }, + "billing_credit_grants_resource_applicability_config": { + "description": "", + "properties": { + "scope": { + "$ref": "#/components/schemas/billing_credit_grants_resource_scope" + } + }, + "required": ["scope"], + "title": "BillingCreditGrantsResourceApplicabilityConfig", + "type": "object", + "x-expandableFields": ["scope"] + }, + "billing_credit_grants_resource_applicable_price": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "BillingCreditGrantsResourceApplicablePrice", + "type": "object", + "x-expandableFields": [] + }, + "billing_credit_grants_resource_balance_credit": { + "description": "", + "properties": { + "amount": { + "$ref": "#/components/schemas/billing_credit_grants_resource_amount" + }, + "credits_application_invoice_voided": { + "anyOf": [ + { + "$ref": "#/components/schemas/billing_credit_grants_resource_balance_credits_application_invoice_voided" + } + ], + "description": "Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.", + "nullable": true + }, + "type": { + "description": "The type of credit transaction.", + "enum": ["credits_application_invoice_voided", "credits_granted"], + "type": "string" + } + }, + "required": ["amount", "type"], + "title": "BillingCreditGrantsResourceBalanceCredit", + "type": "object", + "x-expandableFields": ["amount", "credits_application_invoice_voided"] + }, + "billing_credit_grants_resource_balance_credits_application_invoice_voided": { + "description": "", + "properties": { + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice to which the reinstated billing credits were originally applied.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_line_item": { + "description": "The invoice line item to which the reinstated billing credits were originally applied.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["invoice", "invoice_line_item"], + "title": "BillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoided", + "type": "object", + "x-expandableFields": ["invoice"] + }, + "billing_credit_grants_resource_balance_credits_applied": { + "description": "", + "properties": { + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice to which the billing credits were applied.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_line_item": { + "description": "The invoice line item to which the billing credits were applied.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["invoice", "invoice_line_item"], + "title": "BillingCreditGrantsResourceBalanceCreditsApplied", + "type": "object", + "x-expandableFields": ["invoice"] + }, + "billing_credit_grants_resource_balance_debit": { + "description": "", + "properties": { + "amount": { + "$ref": "#/components/schemas/billing_credit_grants_resource_amount" + }, + "credits_applied": { + "anyOf": [ + { + "$ref": "#/components/schemas/billing_credit_grants_resource_balance_credits_applied" + } + ], + "description": "Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.", + "nullable": true + }, + "type": { + "description": "The type of debit transaction.", + "enum": ["credits_applied", "credits_expired", "credits_voided"], + "type": "string" + } + }, + "required": ["amount", "type"], + "title": "BillingCreditGrantsResourceBalanceDebit", + "type": "object", + "x-expandableFields": ["amount", "credits_applied"] + }, + "billing_credit_grants_resource_monetary_amount": { + "description": "", + "properties": { + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "A positive integer representing the amount.", + "type": "integer" + } + }, + "required": ["currency", "value"], + "title": "BillingCreditGrantsResourceMonetaryAmount", + "type": "object", + "x-expandableFields": [] + }, + "billing_credit_grants_resource_scope": { + "description": "", + "properties": { + "price_type": { + "description": "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.", + "enum": ["metered"], + "type": "string" + }, + "prices": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/billing_credit_grants_resource_applicable_price" + }, + "type": "array" + } + }, + "title": "BillingCreditGrantsResourceScope", + "type": "object", + "x-expandableFields": ["prices"] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Billing address.", + "nullable": true + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "Billing phone number (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "billing_details", + "type": "object", + "x-expandableFields": ["address"] + }, + "billing_meter_resource_aggregation_settings": { + "description": "", + "properties": { + "formula": { + "description": "Specifies how events are aggregated.", + "enum": ["count", "sum"], + "type": "string" + } + }, + "required": ["formula"], + "title": "BillingMeterResourceAggregationSettings", + "type": "object", + "x-expandableFields": [] + }, + "billing_meter_resource_billing_meter_event_adjustment_cancel": { + "description": "", + "properties": { + "identifier": { + "description": "Unique identifier for the event.", + "maxLength": 100, + "nullable": true, + "type": "string" + } + }, + "title": "BillingMeterResourceBillingMeterEventAdjustmentCancel", + "type": "object", + "x-expandableFields": [] + }, + "billing_meter_resource_billing_meter_status_transitions": { + "description": "", + "properties": { + "deactivated_at": { + "description": "The time the meter was deactivated, if any. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "BillingMeterResourceBillingMeterStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "billing_meter_resource_billing_meter_value": { + "description": "", + "properties": { + "event_payload_key": { + "description": "The key in the meter event payload to use as the value for this meter.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["event_payload_key"], + "title": "BillingMeterResourceBillingMeterValue", + "type": "object", + "x-expandableFields": [] + }, + "billing_meter_resource_customer_mapping_settings": { + "description": "", + "properties": { + "event_payload_key": { + "description": "The key in the meter event payload to use for mapping the event to a customer.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The method for mapping a meter event to a customer.", + "enum": ["by_id"], + "type": "string" + } + }, + "required": ["event_payload_key", "type"], + "title": "BillingMeterResourceCustomerMappingSettings", + "type": "object", + "x-expandableFields": [] + }, + "billing_portal.configuration": { + "description": "A portal configuration describes the functionality and behavior of a portal session.", + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the configuration.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "business_profile": { + "$ref": "#/components/schemas/portal_business_profile" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_return_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "features": { + "$ref": "#/components/schemas/portal_features" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_default": { + "description": "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.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "login_page": { + "$ref": "#/components/schemas/portal_login_page" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing_portal.configuration"], + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "active", + "business_profile", + "created", + "features", + "id", + "is_default", + "livemode", + "login_page", + "object", + "updated" + ], + "title": "PortalConfiguration", + "type": "object", + "x-expandableFields": [ + "application", + "business_profile", + "features", + "login_page" + ], + "x-resourceId": "billing_portal.configuration" + }, + "billing_portal.session": { + "description": "The Billing customer portal is a Stripe-hosted UI for subscription and\nbilling management.\n\nA portal configuration describes the functionality and features that you\nwant to provide to your customers through the portal.\n\nA portal session describes the instantiation of the customer portal for\na particular customer. By visiting the session's URL, the customer\ncan manage their subscriptions and billing details. For security reasons,\nsessions are short-lived and will expire if the customer does not visit the URL.\nCreate sessions on-demand when customers intend to manage their subscriptions\nand billing details.\n\nRelated guide: [Customer management](/customer-management)", + "properties": { + "configuration": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing_portal.configuration" + } + ], + "description": "The configuration used by this session, describing the features available.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing_portal.configuration" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "description": "The ID of the customer for this session.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow" + } + ], + "description": "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.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "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.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing_portal.session"], + "type": "string" + }, + "on_behalf_of": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_url": { + "description": "The URL to redirect customers to when they click on the portal's link to return to your website.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The short-lived URL of the session that gives customers access to the customer portal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "configuration", + "created", + "customer", + "id", + "livemode", + "object", + "url" + ], + "title": "PortalSession", + "type": "object", + "x-expandableFields": ["configuration", "flow"], + "x-resourceId": "billing_portal.session" + }, + "cancellation_details": { + "description": "", + "properties": { + "comment": { + "description": "Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "feedback": { + "description": "The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.", + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "Why this subscription was canceled.", + "enum": [ + "cancellation_requested", + "payment_disputed", + "payment_failed" + ], + "nullable": true, + "type": "string" + } + }, + "title": "CancellationDetails", + "type": "object", + "x-expandableFields": [] + }, + "capability": { + "description": "This is an object representing a capability for a Stripe account.\n\nRelated guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account for which the capability enables functionality.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "future_requirements": { + "$ref": "#/components/schemas/account_capability_future_requirements" + }, + "id": { + "description": "The identifier for the capability.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["capability"], + "type": "string" + }, + "requested": { + "description": "Whether the capability has been requested.", + "type": "boolean" + }, + "requested_at": { + "description": "Time at which the capability was requested. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "requirements": { + "$ref": "#/components/schemas/account_capability_requirements" + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "active", + "disabled", + "inactive", + "pending", + "unrequested" + ], + "type": "string" + } + }, + "required": ["account", "id", "object", "requested", "status"], + "title": "AccountCapability", + "type": "object", + "x-expandableFields": [ + "account", + "future_requirements", + "requirements" + ], + "x-resourceId": "capability" + }, + "card": { + "description": "You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. 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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_line1_check": { + "description": "If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_zip_check": { + "description": "If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "allow_redisplay": { + "description": "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”.", + "enum": ["always", "limited", "unspecified"], + "nullable": true, + "type": "string" + }, + "available_payout_methods": { + "description": "A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.", + "items": { + "enum": ["instant", "standard"], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "brand": { + "description": "Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.", + "maxLength": 5000, + "type": "string" + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "currency": { + "description": "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 for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "format": "currency", + "nullable": true, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "cvc_check": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "default_for_currency": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "iin": { + "description": "Issuer identification number of the card.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "$ref": "#/components/schemas/token_card_networks" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["card"], + "type": "string" + }, + "regulated_status": { + "description": "Status of a card based on the card issuer.", + "enum": ["regulated", "unregulated"], + "nullable": true, + "type": "string" + }, + "status": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tokenization_method": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "object" + ], + "title": "Card", + "type": "object", + "x-expandableFields": ["account", "customer", "networks"], + "x-resourceId": "card" + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "type": { + "description": "The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "card_generated_from_payment_method_details", + "type": "object", + "x-expandableFields": ["card_present"] + }, + "card_issuing_account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "card_mandate_payment_method_details": { + "description": "", + "properties": {}, + "title": "card_mandate_payment_method_details", + "type": "object", + "x-expandableFields": [] + }, + "cash_balance": { + "description": "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.", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "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).", + "nullable": true, + "type": "object" + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["cash_balance"], + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/customer_balance_customer_balance_settings" + } + }, + "required": ["customer", "livemode", "object", "settings"], + "title": "cash_balance", + "type": "object", + "x-expandableFields": ["settings"], + "x-resourceId": "cash_balance" + }, + "charge": { + "description": "The `Charge` object represents a single attempt to move money into your Stripe account.\nPaymentIntent confirmation is the most common way to create Charges, but transferring\nmoney to a different Stripe account through Connect also creates Charges.\nSome legacy payment flows create Charges directly, which is not recommended for new integrations.", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "amount_captured": { + "description": "Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that created the charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "calculated_statement_descriptor": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "captured": { + "description": "If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer this charge is for if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 40000, + "nullable": true, + "type": "string" + }, + "disputed": { + "description": "Whether the charge has been disputed.", + "type": "boolean" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Message to user further explaining reason for charge failure if available.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fraud_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_fraud_details" + } + ], + "description": "Information on fraud assessments for the charge.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice this charge is for if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["charge"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_outcome" + } + ], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.", + "nullable": true + }, + "paid": { + "description": "`true` if the charge succeeded, or was successfully authorized for later capture.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_method": { + "description": "ID of the payment method used in this charge.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details" + } + ], + "description": "Details about the payment method at the time of the transaction.", + "nullable": true + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge was sent to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "receipt_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "refunded": { + "description": "Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the charge.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RefundList", + "type": "object", + "x-expandableFields": ["data"] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + } + ], + "description": "ID of the review associated with this charge if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for the charge.", + "nullable": true + }, + "source_transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "statement_descriptor": { + "description": "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).\n\nFor 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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the payment is either `succeeded`, `pending`, or `failed`.", + "enum": ["failed", "pending", "succeeded"], + "type": "string" + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_transfer_data" + } + ], + "description": "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.", + "nullable": true + }, + "transfer_group": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "billing_details", + "captured", + "created", + "currency", + "disputed", + "id", + "livemode", + "metadata", + "object", + "paid", + "refunded", + "status" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "invoice", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "radar_options", + "refunds", + "review", + "shipping", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge" + }, + "charge_fraud_details": { + "description": "", + "properties": { + "stripe_report": { + "description": "Assessments from Stripe. If set, the value is `fraudulent`.", + "maxLength": 5000, + "type": "string" + }, + "user_report": { + "description": "Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "ChargeFraudDetails", + "type": "object", + "x-expandableFields": [] + }, + "charge_outcome": { + "description": "", + "properties": { + "advice_code": { + "description": "An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).", + "enum": [ + "confirm_card_data", + "do_not_try_again", + "try_again_later" + ], + "nullable": true, + "type": "string" + }, + "network_advice_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_decline_code": { + "description": "For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_status": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reason": { + "description": "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 authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "risk_level": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "risk_score": { + "description": "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.", + "type": "integer" + }, + "rule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/rule" + } + ], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/rule" + } + ] + } + }, + "seller_message": { + "description": "A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": ["rule"] + }, + "charge_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.", + "nullable": true, + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "checkout.session": { + "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)", + "properties": { + "adaptive_pricing": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_adaptive_pricing" + } + ], + "description": "Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).", + "nullable": true + }, + "after_expiration": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration" + } + ], + "description": "When set, provides configuration for actions to take if this Checkout Session expires.", + "nullable": true + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "nullable": true, + "type": "boolean" + }, + "amount_subtotal": { + "description": "Total of all items before discounts or taxes are applied.", + "nullable": true, + "type": "integer" + }, + "amount_total": { + "description": "Total of all items after discounts and taxes are applied.", + "nullable": true, + "type": "integer" + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_pages_checkout_session_automatic_tax" + }, + "billing_address_collection": { + "description": "Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.", + "enum": ["auto", "required"], + "nullable": true, + "type": "string" + }, + "cancel_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "client_secret": { + "description": "Client secret to be used when initializing Stripe.js embedded checkout.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "collected_information": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_collected_information" + } + ], + "description": "Information about the customer collected within the Checkout Session.", + "nullable": true + }, + "consent": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent" + } + ], + "description": "Results of `consent_collection` for this session.", + "nullable": true + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent_collection" + } + ], + "description": "When set, provides configuration for the Checkout Session to gather active consent from customers.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "nullable": true, + "type": "string" + }, + "currency_conversion": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_currency_conversion" + } + ], + "description": "Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions", + "nullable": true + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 3 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", + "enum": ["always", "if_required"], + "nullable": true, + "type": "string" + }, + "customer_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" + } + ], + "description": "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.", + "nullable": true + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discounts": { + "description": "List of coupons and promotion codes attached to the Checkout Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_discount" + }, + "nullable": true, + "type": "array" + }, + "expires_at": { + "description": "The timestamp at which the Checkout Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice created by the Checkout Session, if it exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_creation" + } + ], + "description": "Details on the state of invoice creation for the Checkout Session.", + "nullable": true + }, + "line_items": { + "description": "The line items purchased by the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "mode": { + "description": "The mode of the Checkout Session.", + "enum": ["payment", "setup", "subscription"], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["checkout.session"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_link": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_link" + } + ], + "description": "The ID of the Payment Link that created this Session.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_link" + } + ] + } + }, + "payment_method_collection": { + "description": "Configure whether a Checkout Session should collect a payment method. Defaults to `always`.", + "enum": ["always", "if_required"], + "nullable": true, + "type": "string" + }, + "payment_method_configuration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_config_biz_payment_method_configuration_details" + } + ], + "description": "Information about the payment method configuration used for this Checkout session if using dynamic payment methods.", + "nullable": true + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/checkout_session_payment_method_options" + } + ], + "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.", + "nullable": true + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_status": { + "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", + "enum": ["no_payment_required", "paid", "unpaid"], + "type": "string" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_phone_number_collection" + }, + "recovered_from": { + "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "redirect_on_completion": { + "description": "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`.", + "enum": ["always", "if_required", "never"], + "type": "string" + }, + "return_url": { + "description": "Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.", + "maxLength": 5000, + "type": "string" + }, + "saved_payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_saved_payment_method_options" + } + ], + "description": "Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.", + "nullable": true + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" + } + ], + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" + } + ], + "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate.", + "nullable": true + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for this Checkout Session.", + "nullable": true + }, + "shipping_options": { + "description": "The shipping rate options applied to this Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" + }, + "type": "array" + }, + "status": { + "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", + "enum": ["complete", "expired", "open"], + "nullable": true, + "type": "string" + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.", + "enum": ["auto", "book", "donate", "pay", "subscribe"], + "nullable": true, + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "success_url": { + "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id_collection" + }, + "total_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details" + } + ], + "description": "Tax and discount details for the computed total amount.", + "nullable": true + }, + "ui_mode": { + "description": "The UI mode of the Session. Defaults to `hosted`.", + "enum": ["embedded", "hosted"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "url": { + "description": "The URL to the Checkout Session. 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.`\nThis value is only present when the session is active.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "automatic_tax", + "created", + "custom_fields", + "custom_text", + "expires_at", + "id", + "livemode", + "mode", + "object", + "payment_method_types", + "payment_status", + "shipping_options" + ], + "title": "Session", + "type": "object", + "x-expandableFields": [ + "adaptive_pricing", + "after_expiration", + "automatic_tax", + "collected_information", + "consent", + "consent_collection", + "currency_conversion", + "custom_fields", + "custom_text", + "customer", + "customer_details", + "discounts", + "invoice", + "invoice_creation", + "line_items", + "payment_intent", + "payment_link", + "payment_method_configuration_details", + "payment_method_options", + "phone_number_collection", + "saved_payment_method_options", + "setup_intent", + "shipping_address_collection", + "shipping_cost", + "shipping_details", + "shipping_options", + "subscription", + "tax_id_collection", + "total_details" + ], + "x-resourceId": "checkout.session" + }, + "checkout_acss_debit_mandate_options": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.", + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic"], + "nullable": true, + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal"], + "nullable": true, + "type": "string" + } + }, + "title": "CheckoutAcssDebitMandateOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_acss_debit_payment_method_options": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account. Returned when the Session is in `setup` mode.", + "enum": ["cad", "usd"], + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/checkout_acss_debit_mandate_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutAcssDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "checkout_affirm_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAffirmPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_afterpay_clearpay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAfterpayClearpayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_alipay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAlipayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_amazon_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "CheckoutAmazonPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_au_becs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutAuBecsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bacs_debit_payment_method_options": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/checkout_payment_method_options_mandate_options_bacs_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutBacsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "checkout_bancontact_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutBancontactPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_boleto_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "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.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "CheckoutBoletoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_installments_options": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates if installments are enabled", + "type": "boolean" + } + }, + "title": "CheckoutCardInstallmentsOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_payment_method_options": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/checkout_card_installments_options" + }, + "request_extended_authorization": { + "description": "Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "description": "Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "description": "Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "description": "Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_three_d_secure": { + "description": "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.", + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "restrictions": { + "$ref": "#/components/schemas/payment_pages_private_card_payment_method_options_resource_restrictions" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["request_three_d_secure"], + "title": "CheckoutCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["installments", "restrictions"] + }, + "checkout_cashapp_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutCashappPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_customer_balance_bank_transfer_payment_method_options": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "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`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutCustomerBalanceBankTransferPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"] + }, + "checkout_customer_balance_payment_method_options": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/checkout_customer_balance_bank_transfer_payment_method_options" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": ["bank_transfer"], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutCustomerBalancePaymentMethodOptions", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "checkout_eps_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutEpsPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_fpx_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutFpxPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_giropay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutGiropayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_grab_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutGrabPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_ideal_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutIdealPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_kakao_pay_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "CheckoutKakaoPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_klarna_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "CheckoutKlarnaPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_konbini_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutKonbiniPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_kr_card_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "CheckoutKrCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_link_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "CheckoutLinkPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_mobilepay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutMobilepayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_multibanco_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutMultibancoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_naver_pay_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "CheckoutNaverPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_oxxo_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "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.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "CheckoutOxxoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_p24_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutP24PaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_payco_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "CheckoutPaycoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_payment_method_options_mandate_options_bacs_debit": { + "description": "", + "properties": { + "reference_prefix": { + "description": "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'.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "checkout_payment_method_options_mandate_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "checkout_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": { + "reference_prefix": { + "description": "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'.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "checkout_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paynow_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutPaynowPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paypal_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the PayPal checkout page that the customer is redirected to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "CheckoutPaypalPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_pix_payment_method_options": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds after which Pix payment will expire.", + "nullable": true, + "type": "integer" + } + }, + "title": "CheckoutPixPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_revolut_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "CheckoutRevolutPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_samsung_pay_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "CheckoutSamsungPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_sepa_debit_payment_method_options": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/checkout_payment_method_options_mandate_options_sepa_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutSepaDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "checkout_session_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" + }, + "affirm": { + "$ref": "#/components/schemas/checkout_affirm_payment_method_options" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/checkout_afterpay_clearpay_payment_method_options" + }, + "alipay": { + "$ref": "#/components/schemas/checkout_alipay_payment_method_options" + }, + "amazon_pay": { + "$ref": "#/components/schemas/checkout_amazon_pay_payment_method_options" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/checkout_au_becs_debit_payment_method_options" + }, + "bacs_debit": { + "$ref": "#/components/schemas/checkout_bacs_debit_payment_method_options" + }, + "bancontact": { + "$ref": "#/components/schemas/checkout_bancontact_payment_method_options" + }, + "boleto": { + "$ref": "#/components/schemas/checkout_boleto_payment_method_options" + }, + "card": { + "$ref": "#/components/schemas/checkout_card_payment_method_options" + }, + "cashapp": { + "$ref": "#/components/schemas/checkout_cashapp_payment_method_options" + }, + "customer_balance": { + "$ref": "#/components/schemas/checkout_customer_balance_payment_method_options" + }, + "eps": { + "$ref": "#/components/schemas/checkout_eps_payment_method_options" + }, + "fpx": { + "$ref": "#/components/schemas/checkout_fpx_payment_method_options" + }, + "giropay": { + "$ref": "#/components/schemas/checkout_giropay_payment_method_options" + }, + "grabpay": { + "$ref": "#/components/schemas/checkout_grab_pay_payment_method_options" + }, + "ideal": { + "$ref": "#/components/schemas/checkout_ideal_payment_method_options" + }, + "kakao_pay": { + "$ref": "#/components/schemas/checkout_kakao_pay_payment_method_options" + }, + "klarna": { + "$ref": "#/components/schemas/checkout_klarna_payment_method_options" + }, + "konbini": { + "$ref": "#/components/schemas/checkout_konbini_payment_method_options" + }, + "kr_card": { + "$ref": "#/components/schemas/checkout_kr_card_payment_method_options" + }, + "link": { + "$ref": "#/components/schemas/checkout_link_payment_method_options" + }, + "mobilepay": { + "$ref": "#/components/schemas/checkout_mobilepay_payment_method_options" + }, + "multibanco": { + "$ref": "#/components/schemas/checkout_multibanco_payment_method_options" + }, + "naver_pay": { + "$ref": "#/components/schemas/checkout_naver_pay_payment_method_options" + }, + "oxxo": { + "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" + }, + "p24": { + "$ref": "#/components/schemas/checkout_p24_payment_method_options" + }, + "payco": { + "$ref": "#/components/schemas/checkout_payco_payment_method_options" + }, + "paynow": { + "$ref": "#/components/schemas/checkout_paynow_payment_method_options" + }, + "paypal": { + "$ref": "#/components/schemas/checkout_paypal_payment_method_options" + }, + "pix": { + "$ref": "#/components/schemas/checkout_pix_payment_method_options" + }, + "revolut_pay": { + "$ref": "#/components/schemas/checkout_revolut_pay_payment_method_options" + }, + "samsung_pay": { + "$ref": "#/components/schemas/checkout_samsung_pay_payment_method_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/checkout_sepa_debit_payment_method_options" + }, + "sofort": { + "$ref": "#/components/schemas/checkout_sofort_payment_method_options" + }, + "swish": { + "$ref": "#/components/schemas/checkout_swish_payment_method_options" + }, + "us_bank_account": { + "$ref": "#/components/schemas/checkout_us_bank_account_payment_method_options" + } + }, + "title": "CheckoutSessionPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "payco", + "paynow", + "paypal", + "pix", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "us_bank_account" + ] + }, + "checkout_sofort_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutSofortPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_swish_payment_method_options": { + "description": "", + "properties": { + "reference": { + "description": "The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "CheckoutSwishPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_us_bank_account_payment_method_options": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutUsBankAccountPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["financial_connections"] + }, + "climate.order": { + "description": "Orders represent your intent to purchase a particular Climate product. When you create an order, the\npayment is deducted from your merchant balance.", + "properties": { + "amount_fees": { + "description": "Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total amount of the carbon removal in the currency's smallest unit.", + "type": "integer" + }, + "amount_total": { + "description": "Total amount of the order including fees in the currency's smallest unit.", + "type": "integer" + }, + "beneficiary": { + "$ref": "#/components/schemas/climate_removals_beneficiary" + }, + "canceled_at": { + "description": "Time at which the order was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_reason": { + "description": "Reason for the cancellation of this order.", + "enum": ["expired", "product_unavailable", "requested"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "certificate": { + "description": "For delivered orders, a URL to a delivery certificate for the order.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "confirmed_at": { + "description": "Time at which the order was confirmed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order.", + "maxLength": 5000, + "type": "string" + }, + "delayed_at": { + "description": "Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "delivered_at": { + "description": "Time at which the order was delivered. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "delivery_details": { + "description": "Details about the delivery of carbon removal for this order.", + "items": { + "$ref": "#/components/schemas/climate_removals_order_deliveries" + }, + "type": "array" + }, + "expected_delivery_year": { + "description": "The year this order is expected to be delivered.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "metric_tons": { + "description": "Quantity of carbon removal that is included in this order.", + "format": "decimal", + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["climate.order"], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/climate.product" + } + ], + "description": "Unique ID for the Climate `Product` this order is purchasing.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/climate.product" + } + ] + } + }, + "product_substituted_at": { + "description": "Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "status": { + "description": "The current status of this order.", + "enum": [ + "awaiting_funds", + "canceled", + "confirmed", + "delivered", + "open" + ], + "type": "string" + } + }, + "required": [ + "amount_fees", + "amount_subtotal", + "amount_total", + "created", + "currency", + "delivery_details", + "expected_delivery_year", + "id", + "livemode", + "metadata", + "metric_tons", + "object", + "product", + "status" + ], + "title": "ClimateRemovalsOrders", + "type": "object", + "x-expandableFields": ["beneficiary", "delivery_details", "product"], + "x-resourceId": "climate.order" + }, + "climate.product": { + "description": "A Climate product represents a type of carbon removal unit available for reservation.\nYou can retrieve it to see the current price and availability.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_prices_per_metric_ton": { + "additionalProperties": { + "$ref": "#/components/schemas/climate_removals_products_price" + }, + "description": "Current prices for a metric ton of carbon removal in a currency's smallest unit.", + "type": "object" + }, + "delivery_year": { + "description": "The year in which the carbon removal is expected to be delivered.", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object. For convenience, Climate product IDs are human-readable strings\nthat start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)\nfor a list of available carbon removal products.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metric_tons_available": { + "description": "The quantity of metric tons available for reservation.", + "format": "decimal", + "type": "string" + }, + "name": { + "description": "The Climate product's name.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["climate.product"], + "type": "string" + }, + "suppliers": { + "description": "The carbon removal suppliers that fulfill orders for this Climate product.", + "items": { + "$ref": "#/components/schemas/climate.supplier" + }, + "type": "array" + } + }, + "required": [ + "created", + "current_prices_per_metric_ton", + "id", + "livemode", + "metric_tons_available", + "name", + "object", + "suppliers" + ], + "title": "ClimateRemovalsProducts", + "type": "object", + "x-expandableFields": ["current_prices_per_metric_ton", "suppliers"], + "x-resourceId": "climate.product" + }, + "climate.supplier": { + "description": "A supplier of carbon removal.", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "info_url": { + "description": "Link to a webpage to learn more about the supplier.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locations": { + "description": "The locations in which this supplier operates.", + "items": { + "$ref": "#/components/schemas/climate_removals_location" + }, + "type": "array" + }, + "name": { + "description": "Name of this carbon removal supplier.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object’s type. Objects of the same type share the same value.", + "enum": ["climate.supplier"], + "type": "string" + }, + "removal_pathway": { + "description": "The scientific pathway used for carbon removal.", + "enum": [ + "biomass_carbon_removal_and_storage", + "direct_air_capture", + "enhanced_weathering" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "id", + "info_url", + "livemode", + "locations", + "name", + "object", + "removal_pathway" + ], + "title": "ClimateRemovalsSuppliers", + "type": "object", + "x-expandableFields": ["locations"], + "x-resourceId": "climate.supplier" + }, + "climate_removals_beneficiary": { + "description": "", + "properties": { + "public_name": { + "description": "Publicly displayable name for the end beneficiary of carbon removal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["public_name"], + "title": "ClimateRemovalsBeneficiary", + "type": "object", + "x-expandableFields": [] + }, + "climate_removals_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the supplier is located.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country where the supplier is located.", + "maxLength": 5000, + "type": "string" + }, + "latitude": { + "description": "The geographic latitude where the supplier is located.", + "nullable": true, + "type": "number" + }, + "longitude": { + "description": "The geographic longitude where the supplier is located.", + "nullable": true, + "type": "number" + }, + "region": { + "description": "The state/county/province/region where the supplier is located.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["country"], + "title": "ClimateRemovalsLocation", + "type": "object", + "x-expandableFields": [] + }, + "climate_removals_order_deliveries": { + "description": "The delivery of a specified quantity of carbon for an order.", + "properties": { + "delivered_at": { + "description": "Time at which the delivery occurred. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/climate_removals_location" + } + ], + "description": "Specific location of this delivery.", + "nullable": true + }, + "metric_tons": { + "description": "Quantity of carbon removal supplied by this delivery.", + "maxLength": 5000, + "type": "string" + }, + "registry_url": { + "description": "Once retired, a URL to the registry entry for the tons from this delivery.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "supplier": { + "$ref": "#/components/schemas/climate.supplier" + } + }, + "required": ["delivered_at", "metric_tons", "supplier"], + "title": "ClimateRemovalsOrderDeliveries", + "type": "object", + "x-expandableFields": ["location", "supplier"] + }, + "climate_removals_products_price": { + "description": "", + "properties": { + "amount_fees": { + "description": "Fees for one metric ton of carbon removal in the currency's smallest unit.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.", + "type": "integer" + }, + "amount_total": { + "description": "Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.", + "type": "integer" + } + }, + "required": ["amount_fees", "amount_subtotal", "amount_total"], + "title": "ClimateRemovalsProductsPrice", + "type": "object", + "x-expandableFields": [] + }, + "confirmation_token": { + "description": "ConfirmationTokens help transport client side data collected by Stripe JS over\nto your server for confirming a PaymentIntent or SetupIntent. If the confirmation\nis successful, values present on the ConfirmationToken are written onto the Intent.\n\nTo learn more about how to use ConfirmationToken, visit the related guides:\n- [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server)\n- [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/confirmation_tokens_resource_mandate_data" + } + ], + "description": "Data used for generating a Mandate.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["confirmation_token"], + "type": "string" + }, + "payment_intent": { + "description": "ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/confirmation_tokens_resource_payment_method_options" + } + ], + "description": "Payment-method-specific configuration for this ConfirmationToken.", + "nullable": true + }, + "payment_method_preview": { + "anyOf": [ + { + "$ref": "#/components/schemas/confirmation_tokens_resource_payment_method_preview" + } + ], + "description": "Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.", + "nullable": true + }, + "return_url": { + "description": "Return URL used to confirm the Intent.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this ConfirmationToken's payment method.\n\nThe 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.", + "enum": ["off_session", "on_session"], + "nullable": true, + "type": "string" + }, + "setup_intent": { + "description": "ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/confirmation_tokens_resource_shipping" + } + ], + "description": "Shipping information collected on this ConfirmationToken.", + "nullable": true + }, + "use_stripe_sdk": { + "description": "Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.", + "type": "boolean" + } + }, + "required": ["created", "id", "livemode", "object", "use_stripe_sdk"], + "title": "ConfirmationTokensResourceConfirmationToken", + "type": "object", + "x-expandableFields": [ + "mandate_data", + "payment_method_options", + "payment_method_preview", + "shipping" + ], + "x-resourceId": "confirmation_token" + }, + "confirmation_tokens_resource_mandate_data": { + "description": "Data used for generating a Mandate.", + "properties": { + "customer_acceptance": { + "$ref": "#/components/schemas/confirmation_tokens_resource_mandate_data_resource_customer_acceptance" + } + }, + "required": ["customer_acceptance"], + "title": "ConfirmationTokensResourceMandateData", + "type": "object", + "x-expandableFields": ["customer_acceptance"] + }, + "confirmation_tokens_resource_mandate_data_resource_customer_acceptance": { + "description": "This hash contains details about the customer acceptance of the Mandate.", + "properties": { + "online": { + "anyOf": [ + { + "$ref": "#/components/schemas/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online" + } + ], + "description": "If this is a Mandate accepted online, this hash contains details about the online acceptance.", + "nullable": true + }, + "type": { + "description": "The type of customer acceptance information included with the Mandate.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "ConfirmationTokensResourceMandateDataResourceCustomerAcceptance", + "type": "object", + "x-expandableFields": ["online"] + }, + "confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online": { + "description": "This hash contains details about the online acceptance.", + "properties": { + "ip_address": { + "description": "The IP address from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline", + "type": "object", + "x-expandableFields": [] + }, + "confirmation_tokens_resource_payment_method_options": { + "description": "Payment-method-specific configuration", + "properties": { + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/confirmation_tokens_resource_payment_method_options_resource_card" + } + ], + "description": "This hash contains the card payment method options.", + "nullable": true + } + }, + "title": "ConfirmationTokensResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": ["card"] + }, + "confirmation_tokens_resource_payment_method_options_resource_card": { + "description": "This hash contains the card payment method options.", + "properties": { + "cvc_token": { + "description": "The `cvc_update` Token collected from the Payment Element.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "ConfirmationTokensResourcePaymentMethodOptionsResourceCard", + "type": "object", + "x-expandableFields": [] + }, + "confirmation_tokens_resource_payment_method_preview": { + "description": "Details of the PaymentMethod collected by Payment Element", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + }, + "allow_redisplay": { + "description": "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”.", + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "$ref": "#/components/schemas/payment_method_alma" + }, + "amazon_pay": { + "$ref": "#/components/schemas/payment_method_amazon_pay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_card_present" + }, + "cashapp": { + "$ref": "#/components/schemas/payment_method_cashapp" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_grabpay" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_interac_present" + }, + "kakao_pay": { + "$ref": "#/components/schemas/payment_method_kakao_pay" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_konbini" + }, + "kr_card": { + "$ref": "#/components/schemas/payment_method_kr_card" + }, + "link": { + "$ref": "#/components/schemas/payment_method_link" + }, + "mobilepay": { + "$ref": "#/components/schemas/payment_method_mobilepay" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_multibanco" + }, + "naver_pay": { + "$ref": "#/components/schemas/payment_method_naver_pay" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_p24" + }, + "pay_by_bank": { + "$ref": "#/components/schemas/payment_method_pay_by_bank" + }, + "payco": { + "$ref": "#/components/schemas/payment_method_payco" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_paynow" + }, + "paypal": { + "$ref": "#/components/schemas/payment_method_paypal" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_promptpay" + }, + "revolut_pay": { + "$ref": "#/components/schemas/payment_method_revolut_pay" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_samsung_pay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_sofort" + }, + "swish": { + "$ref": "#/components/schemas/payment_method_swish" + }, + "twint": { + "$ref": "#/components/schemas/payment_method_twint" + }, + "type": { + "description": "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.", + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_wechat_pay" + }, + "zip": { + "$ref": "#/components/schemas/payment_method_zip" + } + }, + "required": ["billing_details", "type"], + "title": "ConfirmationTokensResourcePaymentMethodPreview", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ] + }, + "confirmation_tokens_resource_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "ConfirmationTokensResourceShipping", + "type": "object", + "x-expandableFields": ["address"] + }, + "connect_account_reference": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The connected account being referenced when `type` is `account`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "type": { + "description": "Type of the account referenced.", + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "ConnectAccountReference", + "type": "object", + "x-expandableFields": ["account"] + }, + "connect_collection_transfer": { + "description": "", + "properties": { + "amount": { + "description": "Amount transferred, in cents (or local equivalent).", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["connect_collection_transfer"], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "destination", + "id", + "livemode", + "object" + ], + "title": "ConnectCollectionTransfer", + "type": "object", + "x-expandableFields": ["destination"] + }, + "connect_embedded_account_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_account_features_claim" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedAccountConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_account_features_claim": { + "description": "", + "properties": { + "disable_stripe_user_authentication": { + "description": "Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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.", + "type": "boolean" + }, + "external_account_collection": { + "description": "Whether to allow platforms to control bank account collection for their connected accounts. 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. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.", + "type": "boolean" + } + }, + "required": [ + "disable_stripe_user_authentication", + "external_account_collection" + ], + "title": "ConnectEmbeddedAccountFeaturesClaim", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_account_session_create_components": { + "description": "", + "properties": { + "account_management": { + "$ref": "#/components/schemas/connect_embedded_account_config_claim" + }, + "account_onboarding": { + "$ref": "#/components/schemas/connect_embedded_account_config_claim" + }, + "balances": { + "$ref": "#/components/schemas/connect_embedded_payouts_config" + }, + "documents": { + "$ref": "#/components/schemas/connect_embedded_base_config_claim" + }, + "financial_account": { + "$ref": "#/components/schemas/connect_embedded_financial_account_config_claim" + }, + "financial_account_transactions": { + "$ref": "#/components/schemas/connect_embedded_financial_account_transactions_config_claim" + }, + "issuing_card": { + "$ref": "#/components/schemas/connect_embedded_issuing_card_config_claim" + }, + "issuing_cards_list": { + "$ref": "#/components/schemas/connect_embedded_issuing_cards_list_config_claim" + }, + "notification_banner": { + "$ref": "#/components/schemas/connect_embedded_account_config_claim" + }, + "payment_details": { + "$ref": "#/components/schemas/connect_embedded_payments_config_claim" + }, + "payments": { + "$ref": "#/components/schemas/connect_embedded_payments_config_claim" + }, + "payouts": { + "$ref": "#/components/schemas/connect_embedded_payouts_config" + }, + "payouts_list": { + "$ref": "#/components/schemas/connect_embedded_base_config_claim" + }, + "tax_registrations": { + "$ref": "#/components/schemas/connect_embedded_base_config_claim" + }, + "tax_settings": { + "$ref": "#/components/schemas/connect_embedded_base_config_claim" + } + }, + "required": [ + "account_management", + "account_onboarding", + "balances", + "documents", + "financial_account", + "financial_account_transactions", + "issuing_card", + "issuing_cards_list", + "notification_banner", + "payment_details", + "payments", + "payouts", + "payouts_list", + "tax_registrations", + "tax_settings" + ], + "title": "ConnectEmbeddedAccountSessionCreateComponents", + "type": "object", + "x-expandableFields": [ + "account_management", + "account_onboarding", + "balances", + "documents", + "financial_account", + "financial_account_transactions", + "issuing_card", + "issuing_cards_list", + "notification_banner", + "payment_details", + "payments", + "payouts", + "payouts_list", + "tax_registrations", + "tax_settings" + ] + }, + "connect_embedded_base_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_base_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedBaseConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_base_features": { + "description": "", + "properties": {}, + "title": "ConnectEmbeddedBaseFeatures", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_financial_account_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_financial_account_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedFinancialAccountConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_financial_account_features": { + "description": "", + "properties": { + "disable_stripe_user_authentication": { + "description": "Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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.", + "type": "boolean" + }, + "external_account_collection": { + "description": "Whether to allow external accounts to be linked for money transfer.", + "type": "boolean" + }, + "send_money": { + "description": "Whether to allow sending money.", + "type": "boolean" + }, + "transfer_balance": { + "description": "Whether to allow transferring balance.", + "type": "boolean" + } + }, + "required": [ + "disable_stripe_user_authentication", + "external_account_collection", + "send_money", + "transfer_balance" + ], + "title": "ConnectEmbeddedFinancialAccountFeatures", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_financial_account_transactions_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_financial_account_transactions_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedFinancialAccountTransactionsConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_financial_account_transactions_features": { + "description": "", + "properties": { + "card_spend_dispute_management": { + "description": "Whether to allow card spend dispute management features.", + "type": "boolean" + } + }, + "required": ["card_spend_dispute_management"], + "title": "ConnectEmbeddedFinancialAccountTransactionsFeatures", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_issuing_card_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_issuing_card_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedIssuingCardConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_issuing_card_features": { + "description": "", + "properties": { + "card_management": { + "description": "Whether to allow card management features.", + "type": "boolean" + }, + "card_spend_dispute_management": { + "description": "Whether to allow card spend dispute management features.", + "type": "boolean" + }, + "cardholder_management": { + "description": "Whether to allow cardholder management features.", + "type": "boolean" + }, + "spend_control_management": { + "description": "Whether to allow spend control management features.", + "type": "boolean" + } + }, + "required": [ + "card_management", + "card_spend_dispute_management", + "cardholder_management", + "spend_control_management" + ], + "title": "ConnectEmbeddedIssuingCardFeatures", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_issuing_cards_list_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_issuing_cards_list_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedIssuingCardsListConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_issuing_cards_list_features": { + "description": "", + "properties": { + "card_management": { + "description": "Whether to allow card management features.", + "type": "boolean" + }, + "card_spend_dispute_management": { + "description": "Whether to allow card spend dispute management features.", + "type": "boolean" + }, + "cardholder_management": { + "description": "Whether to allow cardholder management features.", + "type": "boolean" + }, + "disable_stripe_user_authentication": { + "description": "Disables Stripe user authentication for this embedded component. 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.", + "type": "boolean" + }, + "spend_control_management": { + "description": "Whether to allow spend control management features.", + "type": "boolean" + } + }, + "required": [ + "card_management", + "card_spend_dispute_management", + "cardholder_management", + "disable_stripe_user_authentication", + "spend_control_management" + ], + "title": "ConnectEmbeddedIssuingCardsListFeatures", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_payments_config_claim": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_payments_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedPaymentsConfigClaim", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_payments_features": { + "description": "", + "properties": { + "capture_payments": { + "description": "Whether to allow capturing and cancelling payment intents. This is `true` by default.", + "type": "boolean" + }, + "destination_on_behalf_of_charge_management": { + "description": "Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.", + "type": "boolean" + }, + "dispute_management": { + "description": "Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.", + "type": "boolean" + }, + "refund_management": { + "description": "Whether to allow sending refunds. This is `true` by default.", + "type": "boolean" + } + }, + "required": [ + "capture_payments", + "destination_on_behalf_of_charge_management", + "dispute_management", + "refund_management" + ], + "title": "ConnectEmbeddedPaymentsFeatures", + "type": "object", + "x-expandableFields": [] + }, + "connect_embedded_payouts_config": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_payouts_features" + } + }, + "required": ["enabled", "features"], + "title": "ConnectEmbeddedPayoutsConfig", + "type": "object", + "x-expandableFields": ["features"] + }, + "connect_embedded_payouts_features": { + "description": "", + "properties": { + "disable_stripe_user_authentication": { + "description": "Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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.", + "type": "boolean" + }, + "edit_payout_schedule": { + "description": "Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.", + "type": "boolean" + }, + "external_account_collection": { + "description": "Whether to allow platforms to control bank account collection for their connected accounts. 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. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.", + "type": "boolean" + }, + "instant_payouts": { + "description": "Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.", + "type": "boolean" + }, + "standard_payouts": { + "description": "Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.", + "type": "boolean" + } + }, + "required": [ + "disable_stripe_user_authentication", + "edit_payout_schedule", + "external_account_collection", + "instant_payouts", + "standard_payouts" + ], + "title": "ConnectEmbeddedPayoutsFeatures", + "type": "object", + "x-expandableFields": [] + }, + "country_spec": { + "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", + "properties": { + "default_currency": { + "description": "The default currency for this country. This applies to both payment methods and bank accounts.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object. Represented as the ISO country code for this country.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["country_spec"], + "type": "string" + }, + "supported_bank_account_currencies": { + "additionalProperties": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": "Currencies that can be accepted in the specific country (for transfers).", + "type": "object" + }, + "supported_payment_currencies": { + "description": "Currencies that can be accepted in the specified country (for payments).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_payment_methods": { + "description": "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).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_transfer_countries": { + "description": "Countries that can accept transfers from the specified country.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "verification_fields": { + "$ref": "#/components/schemas/country_spec_verification_fields" + } + }, + "required": [ + "default_currency", + "id", + "object", + "supported_bank_account_currencies", + "supported_payment_currencies", + "supported_payment_methods", + "supported_transfer_countries", + "verification_fields" + ], + "title": "CountrySpec", + "type": "object", + "x-expandableFields": ["verification_fields"], + "x-resourceId": "country_spec" + }, + "country_spec_verification_field_details": { + "description": "", + "properties": { + "additional": { + "description": "Additional fields which are only required for some users.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "minimum": { + "description": "Fields which every account must eventually provide.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["additional", "minimum"], + "title": "CountrySpecVerificationFieldDetails", + "type": "object", + "x-expandableFields": [] + }, + "country_spec_verification_fields": { + "description": "", + "properties": { + "company": { + "$ref": "#/components/schemas/country_spec_verification_field_details" + }, + "individual": { + "$ref": "#/components/schemas/country_spec_verification_field_details" + } + }, + "required": ["company", "individual"], + "title": "CountrySpecVerificationFields", + "type": "object", + "x-expandableFields": ["company", "individual"] + }, + "coupon": { + "description": "A coupon contains information about a percent-off or amount-off discount you\nmight 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),\n[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).", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "nullable": true, + "type": "integer" + }, + "applies_to": { + "$ref": "#/components/schemas/coupon_applies_to" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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.", + "format": "currency", + "nullable": true, + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/coupon_currency_option" + }, + "description": "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).", + "type": "object" + }, + "duration": { + "description": "One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.", + "enum": ["forever", "once", "repeating"], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.", + "nullable": true, + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "name": { + "description": "Name of the coupon displayed to customers on for instance invoices or receipts.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["coupon"], + "type": "string" + }, + "percent_off": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "redeem_by": { + "description": "Date after which the coupon can no longer be redeemed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "times_redeemed": { + "description": "Number of times this coupon has been applied to a customer.", + "type": "integer" + }, + "valid": { + "description": "Taking account of the above properties, whether this coupon can still be applied to a customer.", + "type": "boolean" + } + }, + "required": [ + "created", + "duration", + "id", + "livemode", + "object", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": ["applies_to", "currency_options"], + "x-resourceId": "coupon" + }, + "coupon_applies_to": { + "description": "", + "properties": { + "products": { + "description": "A list of product IDs this coupon applies to", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["products"], + "title": "CouponAppliesTo", + "type": "object", + "x-expandableFields": [] + }, + "coupon_currency_option": { + "description": "", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": "integer" + } + }, + "required": ["amount_off"], + "title": "CouponCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "credit_balance": { + "description": "", + "properties": { + "available_balance": { + "$ref": "#/components/schemas/billing_credit_grants_resource_amount" + }, + "ledger_balance": { + "$ref": "#/components/schemas/billing_credit_grants_resource_amount" + } + }, + "required": ["available_balance", "ledger_balance"], + "title": "CreditBalance", + "type": "object", + "x-expandableFields": ["available_balance", "ledger_balance"] + }, + "credit_note": { + "description": "Issue a credit note to adjust an invoice's amount after the invoice is finalized.\n\nRelated guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes)", + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer_balance_transaction" + } + ], + "description": "Customer balance transaction related to this credit note.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer_balance_transaction" + } + ] + } + }, + "discount_amount": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.", + "type": "integer" + }, + "discount_amounts": { + "description": "The aggregate amounts calculated per discount for all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": "array" + }, + "effective_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "Line items that make up the credit note", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "memo": { + "description": "Customer-facing text that appears on the credit note PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["credit_note"], + "type": "string" + }, + "out_of_band_amount": { + "description": "Amount that was credited outside of Stripe.", + "nullable": true, + "type": "integer" + }, + "pdf": { + "description": "The link to download the PDF of the credit note.", + "maxLength": 5000, + "type": "string" + }, + "pretax_credit_amounts": { + "description": "The pretax credit amounts (ex: discount, credit grants, etc) for all line items.", + "items": { + "$ref": "#/components/schemas/credit_notes_pretax_credit_amount" + }, + "type": "array" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "nullable": true, + "type": "string" + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Refund related to this credit note.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_resource_shipping_cost" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied to the invoice.", + "nullable": true + }, + "status": { + "description": "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).", + "enum": ["issued", "void"], + "type": "string", + "x-stripeBypassValidation": true + }, + "subtotal": { + "description": "The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.", + "nullable": true, + "type": "integer" + }, + "tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/credit_note_tax_amount" + }, + "type": "array" + }, + "total": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.", + "type": "integer" + }, + "total_excluding_tax": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.", + "nullable": true, + "type": "integer" + }, + "type": { + "description": "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.", + "enum": ["post_payment", "pre_payment"], + "type": "string" + }, + "voided_at": { + "description": "The time that the credit note was voided.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount", + "amount_shipping", + "created", + "currency", + "customer", + "discount_amount", + "discount_amounts", + "id", + "invoice", + "lines", + "livemode", + "number", + "object", + "pdf", + "pretax_credit_amounts", + "status", + "subtotal", + "tax_amounts", + "total", + "type" + ], + "title": "CreditNote", + "type": "object", + "x-expandableFields": [ + "customer", + "customer_balance_transaction", + "discount_amounts", + "invoice", + "lines", + "pretax_credit_amounts", + "refund", + "shipping_cost", + "tax_amounts" + ], + "x-resourceId": "credit_note" + }, + "credit_note_line_item": { + "description": "The credit note line item object", + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.", + "nullable": true, + "type": "integer" + }, + "description": { + "description": "Description of the item being credited.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount_amount": { + "description": "The integer amount in cents (or local equivalent) representing the discount being credited for this line item.", + "type": "integer" + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "description": "ID of the invoice line item being credited", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["credit_note_line_item"], + "type": "string" + }, + "pretax_credit_amounts": { + "description": "The pretax credit amounts (ex: discount, credit grants, etc) for this line item.", + "items": { + "$ref": "#/components/schemas/credit_notes_pretax_credit_amount" + }, + "type": "array" + }, + "quantity": { + "description": "The number of units of product being credited.", + "nullable": true, + "type": "integer" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/credit_note_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "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.", + "enum": ["custom_line_item", "invoice_line_item"], + "type": "string" + }, + "unit_amount": { + "description": "The cost of each unit of product being credited.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "discount_amount", + "discount_amounts", + "id", + "livemode", + "object", + "pretax_credit_amounts", + "tax_amounts", + "tax_rates", + "type" + ], + "title": "CreditNoteLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "pretax_credit_amounts", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "credit_note_line_item" + }, + "credit_note_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in cents (or local equivalent), of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "taxability_reason": { + "description": "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.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in cents (or local equivalent).", + "nullable": true, + "type": "integer" + } + }, + "required": ["amount", "inclusive", "tax_rate"], + "title": "CreditNoteTaxAmount", + "type": "object", + "x-expandableFields": ["tax_rate"] + }, + "credit_notes_pretax_credit_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in cents (or local equivalent), of the pretax credit amount.", + "type": "integer" + }, + "credit_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing.credit_balance_transaction" + } + ], + "description": "The credit balance transaction that was applied to get this pretax credit amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing.credit_balance_transaction" + } + ] + } + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this pretax credit amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "type": { + "description": "Type of the pretax credit amount referenced.", + "enum": ["credit_balance_transaction", "discount"], + "type": "string" + } + }, + "required": ["amount", "type"], + "title": "CreditNotesPretaxCreditAmount", + "type": "object", + "x-expandableFields": ["credit_balance_transaction", "discount"] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "nullable": true + }, + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "unspecified"], + "nullable": true, + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "unit_amount": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "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`.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": ["custom_unit_amount", "tiers"] + }, + "custom_unit_amount": { + "description": "", + "properties": { + "maximum": { + "description": "The maximum unit amount the customer can specify for this item.", + "nullable": true, + "type": "integer" + }, + "minimum": { + "description": "The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.", + "nullable": true, + "type": "integer" + }, + "preset": { + "description": "The starting unit amount which can be updated by the customer.", + "nullable": true, + "type": "integer" + } + }, + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [] + }, + "customer": { + "description": "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,\nand track payments that belong to the same customer.", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The customer's address.", + "nullable": true + }, + "balance": { + "description": "The current balance, if any, that's stored on the customer. 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.", + "type": "integer" + }, + "cash_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/cash_balance" + } + ], + "description": "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.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "ID of the default payment source for the customer.\n\nIf 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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "delinquent": { + "description": "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`.\n\nIf an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.\n\nIf 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`.", + "nullable": true, + "type": "boolean" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "Describes the current discount active on the customer, if there is one.", + "nullable": true + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_credit_balance": { + "additionalProperties": { + "type": "integer" + }, + "description": "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.", + "type": "object" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_customer_setting" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "next_invoice_sequence": { + "description": "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.", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer"], + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_locales": { + "description": "The customer's preferred locales (languages), ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer.", + "nullable": true + }, + "sources": { + "description": "The customer's payment sources, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": ["data"] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": ["data"] + }, + "tax": { + "$ref": "#/components/schemas/customer_tax" + }, + "tax_exempt": { + "description": "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\"**.", + "enum": ["exempt", "none", "reverse"], + "nullable": true, + "type": "string" + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": ["data"] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock that this customer belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": ["created", "id", "livemode", "object"], + "title": "Customer", + "type": "object", + "x-expandableFields": [ + "address", + "cash_balance", + "default_source", + "discount", + "invoice_settings", + "shipping", + "sources", + "subscriptions", + "tax", + "tax_ids", + "test_clock" + ], + "x-resourceId": "customer" + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the customer accepts the mandate.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "offline": { + "$ref": "#/components/schemas/offline_acceptance" + }, + "online": { + "$ref": "#/components/schemas/online_acceptance" + }, + "type": { + "description": "The mandate includes the type of customer acceptance information, such as: `online` or `offline`.", + "enum": ["offline", "online"], + "type": "string" + } + }, + "required": ["type"], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": ["offline", "online"] + }, + "customer_balance_customer_balance_settings": { + "description": "", + "properties": { + "reconciliation_mode": { + "description": "The configuration for how funds that land in the customer cash balance are reconciled.", + "enum": ["automatic", "manual"], + "type": "string" + }, + "using_merchant_default": { + "description": "A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance", + "type": "boolean" + } + }, + "required": ["reconciliation_mode", "using_merchant_default"], + "title": "CustomerBalanceCustomerBalanceSettings", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft": { + "description": "", + "properties": { + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "linked_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + ], + "description": "The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + ] + } + } + }, + "required": ["balance_transaction", "linked_transaction"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft", + "type": "object", + "x-expandableFields": ["balance_transaction", "linked_transaction"] + }, + "customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": ["payment_intent"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction", + "type": "object", + "x-expandableFields": ["payment_intent"] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer" + } + }, + "required": ["bank_transfer"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer" + }, + "gb_bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer" + }, + "jp_bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer" + }, + "reference": { + "description": "The user-supplied reference field on the bank transfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "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`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer" + } + }, + "required": ["type"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "us_bank_transfer" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer": { + "description": "", + "properties": { + "bic": { + "description": "The BIC of the bank of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "iban_last4": { + "description": "The last 4 digits of the IBAN of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer": { + "description": "", + "properties": { + "account_number_last4": { + "description": "The last 4 digits of the account number of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sort_code": { + "description": "The sort code of the bank of the sender of the funding", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer": { + "description": "", + "properties": { + "sender_bank": { + "description": "The name of the bank of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sender_branch": { + "description": "The name of the bank branch of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer": { + "description": "", + "properties": { + "network": { + "description": "The banking network used for this funding.", + "enum": ["ach", "domestic_wire_us", "swift"], + "type": "string" + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction": { + "description": "", + "properties": { + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + } + }, + "required": ["refund"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction", + "type": "object", + "x-expandableFields": ["refund"] + }, + "customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance": { + "description": "", + "properties": { + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + } + }, + "required": ["balance_transaction"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance", + "type": "object", + "x-expandableFields": ["balance_transaction"] + }, + "customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": ["payment_intent"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction", + "type": "object", + "x-expandableFields": ["payment_intent"] + }, + "customer_balance_transaction": { + "description": "Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value,\nwhich denotes a debit or credit that's automatically applied to their next invoice upon finalization.\nYou may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),\nor by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.\n\nRelated guide: [Customer balance](https://stripe.com/docs/billing/customer/balance)", + "properties": { + "amount": { + "description": "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`.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "credit_note": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/credit_note" + } + ], + "description": "The ID of the credit note (if any) related to the transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/credit_note" + } + ] + } + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The ID of the customer the transaction belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "ending_balance": { + "description": "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.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The ID of the invoice (if any) related to the transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer_balance_transaction"], + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.", + "enum": [ + "adjustment", + "applied_to_invoice", + "credit_note", + "initial", + "invoice_overpaid", + "invoice_too_large", + "invoice_too_small", + "migration", + "unapplied_from_invoice", + "unspent_receiver_credit" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "object", + "type" + ], + "title": "CustomerBalanceTransaction", + "type": "object", + "x-expandableFields": ["credit_note", "customer", "invoice"], + "x-resourceId": "customer_balance_transaction" + }, + "customer_cash_balance_transaction": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "adjusted_for_overdraft": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft" + }, + "applied_to_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The customer whose available cash balance changed as a result of this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "ending_balance": { + "description": "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).", + "type": "integer" + }, + "funded": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "net_amount": { + "description": "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.", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer_cash_balance_transaction"], + "type": "string" + }, + "refunded_from_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction" + }, + "transferred_to_balance": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance" + }, + "type": { + "description": "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.", + "enum": [ + "adjusted_for_overdraft", + "applied_to_payment", + "funded", + "funding_reversed", + "refunded_from_payment", + "return_canceled", + "return_initiated", + "transferred_to_balance", + "unapplied_from_payment" + ], + "type": "string" + }, + "unapplied_from_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction" + } + }, + "required": [ + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "net_amount", + "object", + "type" + ], + "title": "CustomerCashBalanceTransaction", + "type": "object", + "x-expandableFields": [ + "adjusted_for_overdraft", + "applied_to_payment", + "customer", + "funded", + "refunded_from_payment", + "transferred_to_balance", + "unapplied_from_payment" + ], + "x-resourceId": "customer_cash_balance_transaction" + }, + "customer_session": { + "description": "A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access\ncontrol over a Customer.\n\nRelated guides: [Customer Session with the Payment Element](/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods),\n[Customer Session with the Pricing Table](/payments/checkout/pricing-table#customer-session),\n[Customer Session with the Buy Button](/payment-links/buy-button#pass-an-existing-customer).", + "properties": { + "client_secret": { + "description": "The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.\n\nThe 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.", + "maxLength": 5000, + "type": "string" + }, + "components": { + "$ref": "#/components/schemas/customer_session_resource_components" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The Customer the Customer Session was created for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "expires_at": { + "description": "The timestamp at which this Customer Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer_session"], + "type": "string" + } + }, + "required": [ + "client_secret", + "created", + "customer", + "expires_at", + "livemode", + "object" + ], + "title": "CustomerSessionResourceCustomerSession", + "type": "object", + "x-expandableFields": ["components", "customer"], + "x-resourceId": "customer_session" + }, + "customer_session_resource_components": { + "description": "Configuration for the components supported by this Customer Session.", + "properties": { + "buy_button": { + "$ref": "#/components/schemas/customer_session_resource_components_resource_buy_button" + }, + "payment_element": { + "$ref": "#/components/schemas/customer_session_resource_components_resource_payment_element" + }, + "pricing_table": { + "$ref": "#/components/schemas/customer_session_resource_components_resource_pricing_table" + } + }, + "required": ["buy_button", "payment_element", "pricing_table"], + "title": "CustomerSessionResourceComponents", + "type": "object", + "x-expandableFields": ["buy_button", "payment_element", "pricing_table"] + }, + "customer_session_resource_components_resource_buy_button": { + "description": "This hash contains whether the buy button is enabled.", + "properties": { + "enabled": { + "description": "Whether the buy button is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "CustomerSessionResourceComponentsResourceBuyButton", + "type": "object", + "x-expandableFields": [] + }, + "customer_session_resource_components_resource_payment_element": { + "description": "This hash contains whether the Payment Element is enabled and the features it supports.", + "properties": { + "enabled": { + "description": "Whether the Payment Element is enabled.", + "type": "boolean" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer_session_resource_components_resource_payment_element_resource_features" + } + ], + "description": "This hash defines whether the Payment Element supports certain features.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "CustomerSessionResourceComponentsResourcePaymentElement", + "type": "object", + "x-expandableFields": ["features"] + }, + "customer_session_resource_components_resource_payment_element_resource_features": { + "description": "This hash contains the features the Payment Element supports.", + "properties": { + "payment_method_allow_redisplay_filters": { + "description": "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.\n\nIf not specified, defaults to [\"always\"]. In order to display all saved payment methods, specify [\"always\", \"limited\", \"unspecified\"].", + "items": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "type": "array" + }, + "payment_method_redisplay": { + "description": "Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.", + "enum": ["disabled", "enabled"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_method_redisplay_limit": { + "description": "Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.", + "nullable": true, + "type": "integer" + }, + "payment_method_remove": { + "description": "Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.\n\nAllowing 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).", + "enum": ["disabled", "enabled"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_method_save": { + "description": "Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.\n\nIf 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`.", + "enum": ["disabled", "enabled"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_method_save_usage": { + "description": "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.\n\nWhen using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.", + "enum": ["off_session", "on_session"], + "nullable": true, + "type": "string" + } + }, + "required": [ + "payment_method_allow_redisplay_filters", + "payment_method_redisplay", + "payment_method_remove", + "payment_method_save" + ], + "title": "CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures", + "type": "object", + "x-expandableFields": [] + }, + "customer_session_resource_components_resource_pricing_table": { + "description": "This hash contains whether the pricing table is enabled.", + "properties": { + "enabled": { + "description": "Whether the pricing table is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "CustomerSessionResourceComponentsResourcePricingTable", + "type": "object", + "x-expandableFields": [] + }, + "customer_tax": { + "description": "", + "properties": { + "automatic_tax": { + "description": "Surfaces if automatic tax computation is possible given the current customer location information.", + "enum": [ + "failed", + "not_collecting", + "supported", + "unrecognized_location" + ], + "type": "string" + }, + "ip_address": { + "description": "A recent IP address of the customer used for tax reporting and tax location inference.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer_tax_location" + } + ], + "description": "The customer's location as identified by Stripe Tax.", + "nullable": true + } + }, + "required": ["automatic_tax"], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": ["location"] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The customer's country as identified by Stripe Tax.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "The data source used to infer the customer's location.", + "enum": [ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination" + ], + "type": "string" + }, + "state": { + "description": "The customer's state, county, province, or region as identified by Stripe Tax.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["country", "source"], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [] + }, + "deleted_account": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedAccount", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_account" + }, + "deleted_apple_pay_domain": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["apple_pay_domain"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_apple_pay_domain" + }, + "deleted_application": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["application"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [] + }, + "deleted_bank_account": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["bank_account"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "deleted_card": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["card"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedCard", + "type": "object", + "x-expandableFields": [] + }, + "deleted_coupon": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["coupon"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedCoupon", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_coupon" + }, + "deleted_customer": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedCustomer", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_customer" + }, + "deleted_discount": { + "description": "", + "properties": { + "checkout_session": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer associated with this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_item": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["discount"], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + } + ], + "description": "The promotion code applied to create this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "subscription_item": { + "description": "The subscription item that this coupon is applied to, if it is applied to a particular subscription item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["coupon", "deleted", "id", "object", "start"], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": ["coupon", "customer", "promotion_code"], + "x-resourceId": "deleted_discount" + }, + "deleted_external_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_external_account", + "x-stripeBypassValidation": true + }, + "deleted_invoice": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoice"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedInvoice", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoice" + }, + "deleted_invoiceitem": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoiceitem"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedInvoiceItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoiceitem" + }, + "deleted_payment_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_payment_source", + "x-stripeBypassValidation": true + }, + "deleted_person": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["person"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedPerson", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_person" + }, + "deleted_plan": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["plan"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedPlan", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_plan" + }, + "deleted_price": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["price"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedPrice", + "type": "object", + "x-expandableFields": [] + }, + "deleted_product": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["product"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedProduct", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_product" + }, + "deleted_product_feature": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["product_feature"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedProductFeature", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_product_feature" + }, + "deleted_radar.value_list": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "RadarListDeletedList", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list" + }, + "deleted_radar.value_list_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list_item"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "RadarListDeletedListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list_item" + }, + "deleted_subscription_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["subscription_item"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedSubscriptionItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_subscription_item" + }, + "deleted_tax_id": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_id"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "deleted_tax_id", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_tax_id" + }, + "deleted_terminal.configuration": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.configuration"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "TerminalConfigurationDeletedConfiguration", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.configuration" + }, + "deleted_terminal.location": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.location"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "TerminalLocationDeletedLocation", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.location" + }, + "deleted_terminal.reader": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.reader"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "TerminalReaderDeletedReader", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.reader" + }, + "deleted_test_helpers.test_clock": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["test_helpers.test_clock"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedTestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_test_helpers.test_clock" + }, + "deleted_webhook_endpoint": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["webhook_endpoint"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "NotificationWebhookEndpointDeleted", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_webhook_endpoint" + }, + "destination_details_unimplemented": { + "description": "", + "properties": {}, + "title": "destination_details_unimplemented", + "type": "object", + "x-expandableFields": [] + }, + "discount": { + "description": "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).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)", + "properties": { + "checkout_session": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer associated with this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "end": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_item": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["discount"], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + } + ], + "description": "The promotion code applied to create this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "subscription_item": { + "description": "The subscription item that this coupon is applied to, if it is applied to a particular subscription item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["coupon", "id", "object", "start"], + "title": "Discount", + "type": "object", + "x-expandableFields": ["coupon", "customer", "promotion_code"], + "x-resourceId": "discount" + }, + "discounts_resource_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in cents (or local equivalent), of the discount.", + "type": "integer" + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + } + }, + "required": ["amount", "discount"], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": ["discount"] + }, + "discounts_resource_stackable_discount": { + "description": "", + "properties": { + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + } + ], + "description": "ID of the coupon to create a new discount for.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + } + ] + } + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "ID of an existing discount on the object (or one of its ancestors) to reuse.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + } + ], + "description": "ID of the promotion code to create a new discount for.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + } + }, + "title": "DiscountsResourceStackableDiscount", + "type": "object", + "x-expandableFields": ["coupon", "discount", "promotion_code"] + }, + "dispute": { + "description": "A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you have the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate.\n\nRelated guide: [Disputes and fraud](https://stripe.com/docs/disputes)", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that's disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "enhanced_eligibility_types": { + "description": "List of eligibility types that are included in `enhanced_evidence`.", + "items": { + "enum": ["visa_compelling_evidence_3"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "evidence": { + "$ref": "#/components/schemas/dispute_evidence" + }, + "evidence_details": { + "$ref": "#/components/schemas/dispute_evidence_details" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_charge_refundable": { + "description": "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.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["dispute"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the PaymentIntent that's disputed.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/dispute_payment_method_details" + }, + "reason": { + "description": "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`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.", + "enum": [ + "lost", + "needs_response", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string" + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "enhanced_eligibility_types", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent", + "payment_method_details" + ], + "x-resourceId": "dispute" + }, + "dispute_enhanced_eligibility": { + "description": "", + "properties": { + "visa_compelling_evidence_3": { + "$ref": "#/components/schemas/dispute_enhanced_eligibility_visa_compelling_evidence3" + }, + "visa_compliance": { + "$ref": "#/components/schemas/dispute_enhanced_eligibility_visa_compliance" + } + }, + "title": "DisputeEnhancedEligibility", + "type": "object", + "x-expandableFields": ["visa_compelling_evidence_3", "visa_compliance"] + }, + "dispute_enhanced_eligibility_visa_compelling_evidence3": { + "description": "", + "properties": { + "required_actions": { + "description": "List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.", + "items": { + "enum": [ + "missing_customer_identifiers", + "missing_disputed_transaction_description", + "missing_merchandise_or_services", + "missing_prior_undisputed_transaction_description", + "missing_prior_undisputed_transactions" + ], + "type": "string" + }, + "type": "array" + }, + "status": { + "description": "Visa Compelling Evidence 3.0 eligibility status.", + "enum": ["not_qualified", "qualified", "requires_action"], + "type": "string" + } + }, + "required": ["required_actions", "status"], + "title": "DisputeEnhancedEligibilityVisaCompellingEvidence3", + "type": "object", + "x-expandableFields": [] + }, + "dispute_enhanced_eligibility_visa_compliance": { + "description": "", + "properties": { + "status": { + "description": "Visa compliance eligibility status.", + "enum": ["fee_acknowledged", "requires_fee_acknowledgement"], + "type": "string" + } + }, + "required": ["status"], + "title": "DisputeEnhancedEligibilityVisaCompliance", + "type": "object", + "x-expandableFields": [] + }, + "dispute_enhanced_evidence": { + "description": "", + "properties": { + "visa_compelling_evidence_3": { + "$ref": "#/components/schemas/dispute_enhanced_evidence_visa_compelling_evidence3" + }, + "visa_compliance": { + "$ref": "#/components/schemas/dispute_enhanced_evidence_visa_compliance" + } + }, + "title": "DisputeEnhancedEvidence", + "type": "object", + "x-expandableFields": ["visa_compelling_evidence_3", "visa_compliance"] + }, + "dispute_enhanced_evidence_visa_compelling_evidence3": { + "description": "", + "properties": { + "disputed_transaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/dispute_visa_compelling_evidence3_disputed_transaction" + } + ], + "description": "Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.", + "nullable": true + }, + "prior_undisputed_transactions": { + "description": "List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.", + "items": { + "$ref": "#/components/schemas/dispute_visa_compelling_evidence3_prior_undisputed_transaction" + }, + "type": "array" + } + }, + "required": ["prior_undisputed_transactions"], + "title": "DisputeEnhancedEvidenceVisaCompellingEvidence3", + "type": "object", + "x-expandableFields": [ + "disputed_transaction", + "prior_undisputed_transactions" + ] + }, + "dispute_enhanced_evidence_visa_compliance": { + "description": "", + "properties": { + "fee_acknowledged": { + "description": "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.", + "type": "boolean" + } + }, + "required": ["fee_acknowledged"], + "title": "DisputeEnhancedEvidenceVisaCompliance", + "type": "object", + "x-expandableFields": [] + }, + "dispute_evidence": { + "description": "", + "properties": { + "access_activity_log": { + "description": "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.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "billing_address": { + "description": "The billing address provided by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cancellation_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cancellation_policy_disclosure": { + "description": "An explanation of how and when the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "cancellation_rebuttal": { + "description": "A justification for why the customer's subscription was not canceled.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "customer_communication": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_name": { + "description": "The name of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_signature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_explanation": { + "description": "An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "duplicate_charge_id": { + "description": "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "enhanced_evidence": { + "$ref": "#/components/schemas/dispute_enhanced_evidence" + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy_disclosure": { + "description": "Documentation demonstrating that the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "refund_refusal_explanation": { + "description": "A justification for why the customer is not entitled to a refund.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "service_date": { + "description": "The date on which the customer received or began receiving the purchased service, in a clear human-readable format.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_address": { + "description": "The address to which a physical product was shipped. You should try to include as complete address information as possible.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_carrier": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_date": { + "description": "The date on which a physical product began its route to the shipping address, in a clear human-readable format.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_tracking_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "uncategorized_file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "nullable": true, + "type": "string" + } + }, + "required": ["enhanced_evidence"], + "title": "DisputeEvidence", + "type": "object", + "x-expandableFields": [ + "cancellation_policy", + "customer_communication", + "customer_signature", + "duplicate_charge_documentation", + "enhanced_evidence", + "receipt", + "refund_policy", + "service_documentation", + "shipping_documentation", + "uncategorized_file" + ] + }, + "dispute_evidence_details": { + "description": "", + "properties": { + "due_by": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "enhanced_eligibility": { + "$ref": "#/components/schemas/dispute_enhanced_eligibility" + }, + "has_evidence": { + "description": "Whether evidence has been staged for this dispute.", + "type": "boolean" + }, + "past_due": { + "description": "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.", + "type": "boolean" + }, + "submission_count": { + "description": "The number of times evidence has been submitted. Typically, you may only submit evidence once.", + "type": "integer" + } + }, + "required": [ + "enhanced_eligibility", + "has_evidence", + "past_due", + "submission_count" + ], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": ["enhanced_eligibility"] + }, + "dispute_payment_method_details": { + "description": "", + "properties": { + "amazon_pay": { + "$ref": "#/components/schemas/dispute_payment_method_details_amazon_pay" + }, + "card": { + "$ref": "#/components/schemas/dispute_payment_method_details_card" + }, + "klarna": { + "$ref": "#/components/schemas/dispute_payment_method_details_klarna" + }, + "paypal": { + "$ref": "#/components/schemas/dispute_payment_method_details_paypal" + }, + "type": { + "description": "Payment method type.", + "enum": ["amazon_pay", "card", "klarna", "paypal"], + "type": "string" + } + }, + "required": ["type"], + "title": "DisputePaymentMethodDetails", + "type": "object", + "x-expandableFields": ["amazon_pay", "card", "klarna", "paypal"] + }, + "dispute_payment_method_details_amazon_pay": { + "description": "", + "properties": { + "dispute_type": { + "description": "The AmazonPay dispute type, chargeback or claim", + "enum": ["chargeback", "claim"], + "nullable": true, + "type": "string" + } + }, + "title": "DisputePaymentMethodDetailsAmazonPay", + "type": "object", + "x-expandableFields": [] + }, + "dispute_payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "case_type": { + "description": "The type of dispute opened. Different case types may have varying fees and financial impact.", + "enum": ["chargeback", "inquiry"], + "type": "string", + "x-stripeBypassValidation": true + }, + "network_reason_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["brand", "case_type"], + "title": "DisputePaymentMethodDetailsCard", + "type": "object", + "x-expandableFields": [] + }, + "dispute_payment_method_details_klarna": { + "description": "", + "properties": { + "reason_code": { + "description": "The reason for the dispute as defined by Klarna", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "DisputePaymentMethodDetailsKlarna", + "type": "object", + "x-expandableFields": [] + }, + "dispute_payment_method_details_paypal": { + "description": "", + "properties": { + "case_id": { + "description": "The ID of the dispute in PayPal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reason_code": { + "description": "The reason for the dispute as defined by PayPal", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "DisputePaymentMethodDetailsPaypal", + "type": "object", + "x-expandableFields": [] + }, + "dispute_transaction_shipping_address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "DisputeTransactionShippingAddress", + "type": "object", + "x-expandableFields": [] + }, + "dispute_visa_compelling_evidence3_disputed_transaction": { + "description": "", + "properties": { + "customer_account_id": { + "description": "User Account ID used to log into business platform. Must be recognizable by the user.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_device_fingerprint": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_device_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "merchandise_or_services": { + "description": "Categorization of disputed payment.", + "enum": ["merchandise", "services"], + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/dispute_transaction_shipping_address" + } + ], + "description": "The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.", + "nullable": true + } + }, + "title": "DisputeVisaCompellingEvidence3DisputedTransaction", + "type": "object", + "x-expandableFields": ["shipping_address"] + }, + "dispute_visa_compelling_evidence3_prior_undisputed_transaction": { + "description": "", + "properties": { + "charge": { + "description": "Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.", + "maxLength": 5000, + "type": "string" + }, + "customer_account_id": { + "description": "User Account ID used to log into business platform. Must be recognizable by the user.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_device_fingerprint": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_device_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/dispute_transaction_shipping_address" + } + ], + "description": "The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.", + "nullable": true + } + }, + "required": ["charge"], + "title": "DisputeVisaCompellingEvidence3PriorUndisputedTransaction", + "type": "object", + "x-expandableFields": ["shipping_address"] + }, + "email_sent": { + "description": "", + "properties": { + "email_sent_at": { + "description": "The timestamp when the email was sent.", + "format": "unix-time", + "type": "integer" + }, + "email_sent_to": { + "description": "The recipient's email address.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["email_sent_at", "email_sent_to"], + "title": "EmailSent", + "type": "object", + "x-expandableFields": [] + }, + "entitlements.active_entitlement": { + "description": "An active entitlement describes access to a feature for a customer.", + "properties": { + "feature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/entitlements.feature" + } + ], + "description": "The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/entitlements.feature" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A unique key you provide as your own system identifier. This may be up to 80 characters.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["entitlements.active_entitlement"], + "type": "string" + } + }, + "required": ["feature", "id", "livemode", "lookup_key", "object"], + "title": "ActiveEntitlement", + "type": "object", + "x-expandableFields": ["feature"], + "x-resourceId": "entitlements.active_entitlement" + }, + "entitlements.feature": { + "description": "A feature represents a monetizable ability or functionality in your system.\nFeatures can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.", + "properties": { + "active": { + "description": "Inactive features cannot be attached to new products and will not be returned from the features list endpoint.", + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A unique key you provide as your own system identifier. This may be up to 80 characters.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "The feature's name, for your own purpose, not meant to be displayable to the customer.", + "maxLength": 80, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["entitlements.feature"], + "type": "string" + } + }, + "required": [ + "active", + "id", + "livemode", + "lookup_key", + "metadata", + "name", + "object" + ], + "title": "Feature", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "entitlements.feature" + }, + "ephemeral_key": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires": { + "description": "Time at which the key will expire. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["ephemeral_key"], + "type": "string" + }, + "secret": { + "description": "The key's secret. You can use this value to make authorized requests to the Stripe API.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["created", "expires", "id", "livemode", "object"], + "title": "EphemeralKey", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "ephemeral_key" + }, + "error": { + "description": "An error response from the Stripe API", + "properties": { + "error": { + "$ref": "#/components/schemas/api_errors" + } + }, + "required": ["error"], + "type": "object" + }, + "event": { + "description": "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent, and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Certain API requests might create multiple\nevents. For example, if you create a new subscription for a\ncustomer, you receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The event's data\nfield embeds the resource's state at the time of the change. For\nexample, a `charge.succeeded` event contains a charge, and an\n`invoice.payment_failed` event contains an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. You can manage\nwebhooks in your\n[account settings](https://dashboard.stripe.com/account/webhooks). Learn how\nto [listen for events](https://docs.stripe.com/webhooks)\nso that your integration can automatically trigger reactions.\n\nWhen using [Connect](https://docs.stripe.com/connect), you can also receive event notifications\nthat occur in connected accounts. For these events, there's an\nadditional `account` attribute in the received `Event` object.\n\nWe only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)\nfor 30 days.", + "properties": { + "account": { + "description": "The connected account that originates the event.", + "maxLength": 5000, + "type": "string" + }, + "api_version": { + "description": "The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data": { + "$ref": "#/components/schemas/notification_event_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["event"], + "type": "string" + }, + "pending_webhooks": { + "description": "Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.", + "type": "integer" + }, + "request": { + "anyOf": [ + { + "$ref": "#/components/schemas/notification_event_request" + } + ], + "description": "Information on the API request that triggers the event.", + "nullable": true + }, + "type": { + "description": "Description of the event (for example, `invoice.created` or `charge.refunded`).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data", + "id", + "livemode", + "object", + "pending_webhooks", + "type" + ], + "title": "NotificationEvent", + "type": "object", + "x-expandableFields": ["data", "request"], + "x-resourceId": "event" + }, + "exchange_rate": { + "description": "`ExchangeRate` objects allow you to determine the rates that Stripe is currently\nusing to convert from one currency to another. Since this number is variable\nthroughout the day, there are various reasons why you might want to know the current\nrate (for example, to dynamically price an item for a user with a default\npayment in a foreign currency).\n\nPlease refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details.\n\n*[Note: this integration path is supported but no longer recommended]* Additionally,\nyou can guarantee that a charge is made with an exchange rate that you expect is\ncurrent. To do so, you must pass in the exchange_rate to charges endpoints. If the\nvalue is no longer up to date, the charge won't go through. Please refer to our\n[Using with charges](https://stripe.com/docs/exchange-rates) guide for more details.\n\n-----\n\n \n\n*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:*\n\n- *localize prices for processing payments on Stripe*\n- *reconcile Stripe transactions*\n- *determine how much money to send to a connected account*\n- *determine app fees to charge a connected account*\n\n*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.*", + "properties": { + "id": { + "description": "Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["exchange_rate"], + "type": "string" + }, + "rates": { + "additionalProperties": { + "type": "number" + }, + "description": "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.", + "type": "object" + } + }, + "required": ["id", "object", "rates"], + "title": "ExchangeRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "exchange_rate" + }, + "external_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-resourceId": "external_account", + "x-stripeBypassValidation": true + }, + "external_account_requirements": { + "description": "", + "properties": { + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "nullable": true, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "ExternalAccountRequirements", + "type": "object", + "x-expandableFields": ["errors"] + }, + "fee": { + "description": "", + "properties": { + "amount": { + "description": "Amount of the fee, in cents.", + "type": "integer" + }, + "application": { + "description": "ID of the Connect application that earned the fee.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency", "type"], + "title": "Fee", + "type": "object", + "x-expandableFields": [] + }, + "fee_refund": { + "description": "`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee)", + "properties": { + "amount": { + "description": "Amount, in cents (or local equivalent).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["fee_refund"], + "type": "string" + } + }, + "required": ["amount", "created", "currency", "fee", "id", "object"], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": ["balance_transaction", "fee"], + "x-resourceId": "fee_refund" + }, + "file": { + "description": "This object represents files hosted on Stripe's servers. You can upload\nfiles with the [create file](https://stripe.com/docs/api#create_file) request\n(for example, when uploading dispute evidence). Stripe also\ncreates files independently (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File upload guide](https://stripe.com/docs/file-upload)", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The file expires and isn't available at this time in epoch seconds.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "filename": { + "description": "The suitable name for saving the file to a filesystem.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "links": { + "description": "A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FileResourceFileLinkList", + "type": "object", + "x-expandableFields": ["data"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["file"], + "type": "string" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "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", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "size": { + "description": "The size of the file object in bytes.", + "type": "integer" + }, + "title": { + "description": "A suitable title for the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "Use your live secret API key to download the file from this URL.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["created", "id", "object", "purpose", "size"], + "title": "File", + "type": "object", + "x-expandableFields": ["links"], + "x-resourceId": "file" + }, + "file_link": { + "description": "To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that you can use to\nretrieve the contents of the file without authentication.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expired": { + "description": "Returns if the link is already expired.", + "type": "boolean" + }, + "expires_at": { + "description": "Time that the link expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object this link points to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["file_link"], + "type": "string" + }, + "url": { + "description": "The publicly accessible URL to download the file.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "created", + "expired", + "file", + "id", + "livemode", + "metadata", + "object" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": ["file"], + "x-resourceId": "file_link" + }, + "financial_connections.account": { + "description": "A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_accountholder" + } + ], + "description": "The account holder that this account belongs to.", + "nullable": true + }, + "balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_balance" + } + ], + "description": "The most recent information about the account's balance.", + "nullable": true + }, + "balance_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_balance_refresh" + } + ], + "description": "The state of the most recent attempt to refresh the account balance.", + "nullable": true + }, + "category": { + "description": "The type of the account. Account category is further divided in `subcategory`.", + "enum": ["cash", "credit", "investment", "other"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "display_name": { + "description": "A human-readable name that has been assigned to this account, either by the account holder or by the institution.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "institution_name": { + "description": "The name of the institution that holds this account.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the account number. If present, this will be 4 numeric characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.account"], + "type": "string" + }, + "ownership": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/financial_connections.account_ownership" + } + ], + "description": "The most recent information about the account's owners.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/financial_connections.account_ownership" + } + ] + } + }, + "ownership_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_ownership_refresh" + } + ], + "description": "The state of the most recent attempt to refresh the account owners.", + "nullable": true + }, + "permissions": { + "description": "The list of permissions granted by this account.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "status": { + "description": "The status of the link to the account.", + "enum": ["active", "disconnected", "inactive"], + "type": "string" + }, + "subcategory": { + "description": "If `category` is `cash`, one of:\n\n - `checking`\n - `savings`\n - `other`\n\nIf `category` is `credit`, one of:\n\n - `mortgage`\n - `line_of_credit`\n - `credit_card`\n - `other`\n\nIf `category` is `investment` or `other`, this will be `other`.", + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "other", + "savings" + ], + "type": "string" + }, + "subscriptions": { + "description": "The list of data refresh subscriptions requested on this account.", + "items": { + "enum": ["transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "supported_payment_method_types": { + "description": "The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.", + "items": { + "enum": ["link", "us_bank_account"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "transaction_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_transaction_refresh" + } + ], + "description": "The state of the most recent attempt to refresh the account transactions.", + "nullable": true + } + }, + "required": [ + "category", + "created", + "id", + "institution_name", + "livemode", + "object", + "status", + "subcategory", + "supported_payment_method_types" + ], + "title": "BankConnectionsResourceLinkedAccount", + "type": "object", + "x-expandableFields": [ + "account_holder", + "balance", + "balance_refresh", + "ownership", + "ownership_refresh", + "transaction_refresh" + ], + "x-resourceId": "financial_connections.account" + }, + "financial_connections.account_owner": { + "description": "Describes an owner of an account.", + "properties": { + "email": { + "description": "The email address of the owner.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The full name of the owner.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.account_owner"], + "type": "string" + }, + "ownership": { + "description": "The ownership object that this owner belongs to.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The raw phone number of the owner.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "raw_address": { + "description": "The raw physical address of the owner.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "refreshed_at": { + "description": "The timestamp of the refresh that updated this owner.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": ["id", "name", "object", "ownership"], + "title": "BankConnectionsResourceOwner", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "financial_connections.account_owner" + }, + "financial_connections.account_ownership": { + "description": "Describes a snapshot of the owners of an account at a particular point in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.account_ownership"], + "type": "string" + }, + "owners": { + "description": "A paginated list of owners for this account.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": ["data"] + } + }, + "required": ["created", "id", "object", "owners"], + "title": "BankConnectionsResourceOwnership", + "type": "object", + "x-expandableFields": ["owners"] + }, + "financial_connections.session": { + "description": "A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_accountholder" + } + ], + "description": "The account holder for whom accounts are collected in this session.", + "nullable": true + }, + "accounts": { + "description": "The accounts that were collected as part of this Session.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": ["data"] + }, + "client_secret": { + "description": "A value that will be passed to the client to launch the authentication flow.", + "maxLength": 5000, + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/bank_connections_resource_link_account_session_filters" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.session"], + "type": "string" + }, + "permissions": { + "description": "Permissions requested for accounts collected during this session.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "description": "Data features requested to be retrieved upon account creation.", + "items": { + "enum": ["balances", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "return_url": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "accounts", + "client_secret", + "id", + "livemode", + "object", + "permissions" + ], + "title": "BankConnectionsResourceLinkAccountSession", + "type": "object", + "x-expandableFields": ["account_holder", "accounts", "filters"], + "x-resourceId": "financial_connections.session" + }, + "financial_connections.transaction": { + "description": "A Transaction represents a real transaction that affects a Financial Connections Account balance.", + "properties": { + "account": { + "description": "The ID of the Financial Connections Account this transaction belongs to.", + "maxLength": 5000, + "type": "string" + }, + "amount": { + "description": "The amount of this transaction, in cents (or local equivalent).", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "The description of this transaction.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.transaction"], + "type": "string" + }, + "status": { + "description": "The status of the transaction.", + "enum": ["pending", "posted", "void"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/bank_connections_resource_transaction_resource_status_transitions" + }, + "transacted_at": { + "description": "Time at which the transaction was transacted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "transaction_refresh": { + "description": "The token of the transaction refresh that last updated or created this transaction.", + "maxLength": 5000, + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "account", + "amount", + "currency", + "description", + "id", + "livemode", + "object", + "status", + "status_transitions", + "transacted_at", + "transaction_refresh", + "updated" + ], + "title": "BankConnectionsResourceTransaction", + "type": "object", + "x-expandableFields": ["status_transitions"], + "x-resourceId": "financial_connections.transaction" + }, + "financial_reporting_finance_report_run_run_parameters": { + "description": "", + "properties": { + "columns": { + "description": "The set of output columns requested for inclusion in the report run.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "description": "Connected account ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Currency of objects to be included in the report run.", + "format": "currency", + "type": "string" + }, + "interval_end": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "payout": { + "description": "Payout ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "reporting_category": { + "description": "Category of balance transactions to be included in the report run.", + "maxLength": 5000, + "type": "string" + }, + "timezone": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "FinancialReportingFinanceReportRunRunParameters", + "type": "object", + "x-expandableFields": [] + }, + "forwarded_request_context": { + "description": "Metadata about the forwarded request.", + "properties": { + "destination_duration": { + "description": "The time it took in milliseconds for the destination endpoint to respond.", + "type": "integer" + }, + "destination_ip_address": { + "description": "The IP address of the destination.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["destination_duration", "destination_ip_address"], + "title": "ForwardedRequestContext", + "type": "object", + "x-expandableFields": [] + }, + "forwarded_request_details": { + "description": "Details about the request forwarded to the destination endpoint.", + "properties": { + "body": { + "description": "The body payload to send to the destination endpoint.", + "maxLength": 5000, + "type": "string" + }, + "headers": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/forwarded_request_header" + }, + "type": "array" + }, + "http_method": { + "description": "The HTTP method used to call the destination endpoint.", + "enum": ["POST"], + "type": "string" + } + }, + "required": ["body", "headers", "http_method"], + "title": "ForwardedRequestDetails", + "type": "object", + "x-expandableFields": ["headers"] + }, + "forwarded_request_header": { + "description": "Header data.", + "properties": { + "name": { + "description": "The header name.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The header value.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "ForwardedRequestHeader", + "type": "object", + "x-expandableFields": [] + }, + "forwarded_response_details": { + "description": "Details about the response from the destination endpoint.", + "properties": { + "body": { + "description": "The response body from the destination endpoint to Stripe.", + "maxLength": 5000, + "type": "string" + }, + "headers": { + "description": "HTTP headers that the destination endpoint returned.", + "items": { + "$ref": "#/components/schemas/forwarded_request_header" + }, + "type": "array" + }, + "status": { + "description": "The HTTP status code that the destination endpoint returned.", + "type": "integer" + } + }, + "required": ["body", "headers", "status"], + "title": "ForwardedResponseDetails", + "type": "object", + "x-expandableFields": ["headers"] + }, + "forwarding.request": { + "description": "Instructs Stripe to make a request on your behalf using the destination URL. The destination URL\nis activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials\nprovided during onboarding, and injects card details from the payment_method into the request.\n\nStripe redacts all sensitive fields and headers, including authentication credentials and card numbers,\nbefore storing the request and response data in the forwarding Request object, which are subject to a\n30-day retention period.\n\nYou can provide a Stripe idempotency key to make sure that requests with the same key result in only one\noutbound request. The Stripe idempotency key provided should be unique and different from any idempotency\nkeys provided on the underlying third-party request.\n\nForwarding Requests are synchronous requests that return a response or time out according to\nStripe’s limits.\n\nRelated guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["forwarding.request"], + "type": "string" + }, + "payment_method": { + "description": "The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.", + "maxLength": 5000, + "type": "string" + }, + "replacements": { + "description": "The field kinds to be replaced in the forwarded request.", + "items": { + "enum": [ + "card_cvc", + "card_expiry", + "card_number", + "cardholder_name", + "request_signature" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "request_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/forwarded_request_context" + } + ], + "description": "Context about the request from Stripe's servers to the destination endpoint.", + "nullable": true + }, + "request_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/forwarded_request_details" + } + ], + "description": "The request that was sent to the destination endpoint. We redact any sensitive fields.", + "nullable": true + }, + "response_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/forwarded_response_details" + } + ], + "description": "The response that the destination endpoint returned to us. We redact any sensitive fields.", + "nullable": true + }, + "url": { + "description": "The destination URL for the forwarded request. Must be supported by the config.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "replacements" + ], + "title": "ForwardingRequest", + "type": "object", + "x-expandableFields": [ + "request_context", + "request_details", + "response_details" + ], + "x-resourceId": "forwarding.request" + }, + "funding_instructions": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is\nautomatically applied to future invoices and payments using the `customer_balance` payment method.\nCustomers can fund this balance by initiating a bank transfer to any account in the\n`financial_addresses` field.\nRelated guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "funding_type": { + "description": "The `funding_type` of the returned instructions", + "enum": ["bank_transfer"], + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["funding_instructions"], + "type": "string" + } + }, + "required": [ + "bank_transfer", + "currency", + "funding_type", + "livemode", + "object" + ], + "title": "CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions", + "type": "object", + "x-expandableFields": ["bank_transfer"], + "x-resourceId": "funding_instructions" + }, + "funding_instructions_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The country of the bank account to fund", + "maxLength": 5000, + "type": "string" + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund a particular balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "type": { + "description": "The bank_transfer type", + "enum": ["eu_bank_transfer", "jp_bank_transfer"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["country", "financial_addresses", "type"], + "title": "FundingInstructionsBankTransfer", + "type": "object", + "x-expandableFields": ["financial_addresses"] + }, + "funding_instructions_bank_transfer_aba_record": { + "description": "ABA Records contain U.S. bank account details per the ABA format.", + "properties": { + "account_holder_address": { + "$ref": "#/components/schemas/address" + }, + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The ABA account number", + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The account type", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { + "$ref": "#/components/schemas/address" + }, + "bank_name": { + "description": "The bank name", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "The ABA routing number", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_address", + "account_holder_name", + "account_number", + "account_type", + "bank_address", + "bank_name", + "routing_number" + ], + "title": "FundingInstructionsBankTransferABARecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"] + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "aba": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_aba_record" + }, + "iban": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_iban_record" + }, + "sort_code": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_sort_code_record" + }, + "spei": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_spei_record" + }, + "supported_networks": { + "description": "The payment networks supported by this FinancialAddress", + "items": { + "enum": [ + "ach", + "bacs", + "domestic_wire_us", + "fps", + "sepa", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "swift": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_swift_record" + }, + "type": { + "description": "The type of financial address", + "enum": ["aba", "iban", "sort_code", "spei", "swift", "zengin"], + "type": "string", + "x-stripeBypassValidation": true + }, + "zengin": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_zengin_record" + } + }, + "required": ["type"], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": [ + "aba", + "iban", + "sort_code", + "spei", + "swift", + "zengin" + ] + }, + "funding_instructions_bank_transfer_iban_record": { + "description": "Iban Records contain E.U. bank account details per the SEPA format.", + "properties": { + "account_holder_address": { + "$ref": "#/components/schemas/address" + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { + "$ref": "#/components/schemas/address" + }, + "bic": { + "description": "The BIC/SWIFT code of the account.", + "maxLength": 5000, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "iban": { + "description": "The IBAN of the account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_address", + "account_holder_name", + "bank_address", + "bic", + "country", + "iban" + ], + "title": "FundingInstructionsBankTransferIbanRecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"] + }, + "funding_instructions_bank_transfer_sort_code_record": { + "description": "Sort Code Records contain U.K. bank account details per the sort code format.", + "properties": { + "account_holder_address": { + "$ref": "#/components/schemas/address" + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { + "$ref": "#/components/schemas/address" + }, + "sort_code": { + "description": "The six-digit sort code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_address", + "account_holder_name", + "account_number", + "bank_address", + "sort_code" + ], + "title": "FundingInstructionsBankTransferSortCodeRecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"] + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "account_holder_address": { + "$ref": "#/components/schemas/address" + }, + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { + "$ref": "#/components/schemas/address" + }, + "bank_code": { + "description": "The three-digit bank code", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "The short banking institution name", + "maxLength": 5000, + "type": "string" + }, + "clabe": { + "description": "The CLABE number", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_address", + "account_holder_name", + "bank_address", + "bank_code", + "bank_name", + "clabe" + ], + "title": "FundingInstructionsBankTransferSpeiRecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"] + }, + "funding_instructions_bank_transfer_swift_record": { + "description": "SWIFT Records contain U.S. bank account details per the SWIFT format.", + "properties": { + "account_holder_address": { + "$ref": "#/components/schemas/address" + }, + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The account type", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { + "$ref": "#/components/schemas/address" + }, + "bank_name": { + "description": "The bank name", + "maxLength": 5000, + "type": "string" + }, + "swift_code": { + "description": "The SWIFT code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_address", + "account_holder_name", + "account_number", + "account_type", + "bank_address", + "bank_name", + "swift_code" + ], + "title": "FundingInstructionsBankTransferSwiftRecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "account_holder_address": { + "$ref": "#/components/schemas/address" + }, + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "The bank account type. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_address": { + "$ref": "#/components/schemas/address" + }, + "bank_code": { + "description": "The bank code of the account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "The bank name of the account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "branch_code": { + "description": "The branch code of the account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "branch_name": { + "description": "The branch name of the account", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["account_holder_address", "bank_address"], + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"] + }, + "gelato_data_document_report_date_of_birth": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataDocumentReportDateOfBirth", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_expiration_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataDocumentReportExpirationDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_issued_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataDocumentReportIssuedDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_id_number_report_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataIdNumberReportDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_verified_outputs_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataVerifiedOutputsDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_document_report": { + "description": "Result from a document check", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Address as it appears in the document.", + "nullable": true + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_date_of_birth" + } + ], + "description": "Date of birth as it appears in the document.", + "nullable": true + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_document_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "expiration_date": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_expiration_date" + } + ], + "description": "Expiration date of the document.", + "nullable": true + }, + "files": { + "description": "Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "first_name": { + "description": "First name as it appears in the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issued_date": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_issued_date" + } + ], + "description": "Issued date of the document.", + "nullable": true + }, + "issuing_country": { + "description": "Issuing country of the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "Last name as it appears in the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "number": { + "description": "Document ID number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `document` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "Type of the document.", + "enum": ["driving_license", "id_card", "passport"], + "nullable": true, + "type": "string" + } + }, + "required": ["status"], + "title": "GelatoDocumentReport", + "type": "object", + "x-expandableFields": [ + "address", + "dob", + "error", + "expiration_date", + "issued_date" + ] + }, + "gelato_document_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "document_expired", + "document_type_not_supported", + "document_unverified_other" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoDocumentReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_email_report": { + "description": "Result from a email check", + "properties": { + "email": { + "description": "Email to be verified.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_email_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "status": { + "description": "Status of this `email` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status"], + "title": "GelatoEmailReport", + "type": "object", + "x-expandableFields": ["error"] + }, + "gelato_email_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": ["email_unverified_other", "email_verification_declined"], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoEmailReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_id_number_report": { + "description": "Result from an id_number check", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_id_number_report_date" + } + ], + "description": "Date of birth.", + "nullable": true + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_id_number_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "first_name": { + "description": "First name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number": { + "description": "ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number_type": { + "description": "Type of ID number.", + "enum": ["br_cpf", "sg_nric", "us_ssn"], + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "Last name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `id_number` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status"], + "title": "GelatoIdNumberReport", + "type": "object", + "x-expandableFields": ["dob", "error"] + }, + "gelato_id_number_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other" + ], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoIdNumberReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_phone_report": { + "description": "Result from a phone check", + "properties": { + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_phone_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "phone": { + "description": "Phone to be verified.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `phone` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status"], + "title": "GelatoPhoneReport", + "type": "object", + "x-expandableFields": ["error"] + }, + "gelato_phone_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": ["phone_unverified_other", "phone_verification_declined"], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoPhoneReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_provided_details": { + "description": "", + "properties": { + "email": { + "description": "Email of user being verified", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Phone number of user being verified", + "maxLength": 5000, + "type": "string" + } + }, + "title": "GelatoProvidedDetails", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "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.", + "items": { + "enum": ["driving_license", "id_card", "passport"], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "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.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "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).", + "type": "boolean" + } + }, + "title": "GelatoReportDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoReportIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_selfie_report": { + "description": "Result from a selfie check", + "properties": { + "document": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_selfie_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "selfie": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `selfie` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status"], + "title": "GelatoSelfieReport", + "type": "object", + "x-expandableFields": ["error"] + }, + "gelato_selfie_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other" + ], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoSelfieReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "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.", + "items": { + "enum": ["driving_license", "id_card", "passport"], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "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.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "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).", + "type": "boolean" + } + }, + "title": "GelatoSessionDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_email_options": { + "description": "", + "properties": { + "require_verification": { + "description": "Request one time password verification of `provided_details.email`.", + "type": "boolean" + } + }, + "title": "GelatoSessionEmailOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoSessionIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_last_error": { + "description": "Shows last VerificationSession error", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification or user-session failure.", + "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" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A message that explains the reason for verification or user-session failure.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoSessionLastError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_phone_options": { + "description": "", + "properties": { + "require_verification": { + "description": "Request one time password verification of `provided_details.phone`.", + "type": "boolean" + } + }, + "title": "GelatoSessionPhoneOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_verification_report_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/gelato_report_document_options" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_report_id_number_options" + } + }, + "title": "GelatoVerificationReportOptions", + "type": "object", + "x-expandableFields": ["document", "id_number"] + }, + "gelato_verification_session_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/gelato_session_document_options" + }, + "email": { + "$ref": "#/components/schemas/gelato_session_email_options" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_session_id_number_options" + }, + "phone": { + "$ref": "#/components/schemas/gelato_session_phone_options" + } + }, + "title": "GelatoVerificationSessionOptions", + "type": "object", + "x-expandableFields": ["document", "email", "id_number", "phone"] + }, + "gelato_verified_outputs": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The user's verified address.", + "nullable": true + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_verified_outputs_date" + } + ], + "description": "The user’s verified date of birth.", + "nullable": true + }, + "email": { + "description": "The user's verified email address", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's verified first name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number": { + "description": "The user's verified id number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number_type": { + "description": "The user's verified id number type.", + "enum": ["br_cpf", "sg_nric", "us_ssn"], + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "The user's verified last name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "The user's verified phone number", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoVerifiedOutputs", + "type": "object", + "x-expandableFields": ["address", "dob"] + }, + "identity.verification_report": { + "description": "A VerificationReport is the result of an attempt to collect and verify data from a user.\nThe collection of verification checks performed is determined from the `type` and `options`\nparameters used. You can find the result of each verification check performed in the\nappropriate sub-resource: `document`, `id_number`, `selfie`.\n\nEach VerificationReport contains a copy of any data collected by the user as well as\nreference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)\nAPI. To configure and create VerificationReports, use the\n[VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.\n\nRelated guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).", + "properties": { + "client_reference_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "document": { + "$ref": "#/components/schemas/gelato_document_report" + }, + "email": { + "$ref": "#/components/schemas/gelato_email_report" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_id_number_report" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["identity.verification_report"], + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/gelato_verification_report_options" + }, + "phone": { + "$ref": "#/components/schemas/gelato_phone_report" + }, + "selfie": { + "$ref": "#/components/schemas/gelato_selfie_report" + }, + "type": { + "description": "Type of report.", + "enum": ["document", "id_number", "verification_flow"], + "type": "string", + "x-stripeBypassValidation": true + }, + "verification_flow": { + "description": "The configuration token of a verification flow from the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "verification_session": { + "description": "ID of the VerificationSession that created this report.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["created", "id", "livemode", "object", "type"], + "title": "GelatoVerificationReport", + "type": "object", + "x-expandableFields": [ + "document", + "email", + "id_number", + "options", + "phone", + "selfie" + ], + "x-resourceId": "identity.verification_report" + }, + "identity.verification_session": { + "description": "A VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what [verification\ncheck](/docs/identity/verification-checks) to perform. Only create one VerificationSession for\neach verification in your system.\n\nA VerificationSession transitions through [multiple\nstatuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user's verified data after\nverification checks are complete.\n\nRelated guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)", + "properties": { + "client_reference_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "client_secret": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_session_last_error" + } + ], + "description": "If present, this property tells you the last error encountered when processing the verification.", + "nullable": true + }, + "last_verification_report": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/identity.verification_report" + } + ], + "description": "ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/identity.verification_report" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["identity.verification_session"], + "type": "string" + }, + "options": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_verification_session_options" + } + ], + "description": "A set of options for the session’s verification checks.", + "nullable": true + }, + "provided_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_provided_details" + } + ], + "description": "Details provided about the user being verified. These details may be shown to the user.", + "nullable": true + }, + "redaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/verification_session_redaction" + } + ], + "description": "Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.", + "nullable": true + }, + "related_customer": { + "description": "Token referencing a Customer resource.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "enum": ["canceled", "processing", "requires_input", "verified"], + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": ["document", "id_number", "verification_flow"], + "type": "string", + "x-stripeBypassValidation": true + }, + "url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verification_flow": { + "description": "The configuration token of a verification flow from the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "verified_outputs": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_verified_outputs" + } + ], + "description": "The user’s verified data.", + "nullable": true + } + }, + "required": [ + "created", + "id", + "livemode", + "metadata", + "object", + "status", + "type" + ], + "title": "GelatoVerificationSession", + "type": "object", + "x-expandableFields": [ + "last_error", + "last_verification_report", + "options", + "provided_details", + "redaction", + "verified_outputs" + ], + "x-resourceId": "identity.verification_session" + }, + "inbound_transfers": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the InboundTransfer.", + "enum": ["us_bank_account"], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/inbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "InboundTransfers", + "type": "object", + "x-expandableFields": ["billing_details", "us_bank_account"] + }, + "inbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings"], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the mandate used to make this payment.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "network": { + "description": "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.", + "enum": ["ach"], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["network"], + "title": "inbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": ["mandate"] + }, + "internal_card": { + "description": "", + "properties": { + "brand": { + "description": "Brand of the card used in the transaction", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country of the card", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card's expiration month", + "nullable": true, + "type": "integer" + }, + "exp_year": { + "description": "Two digit number representing the card's expiration year", + "nullable": true, + "type": "integer" + }, + "last4": { + "description": "The last 4 digits of the card", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "internal_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice": { + "description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)", + "properties": { + "account_country": { + "description": "The country of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_name": { + "description": "The public name of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "amount_due": { + "description": "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`.", + "type": "integer" + }, + "amount_paid": { + "description": "The amount, in cents (or local equivalent), that was paid.", + "type": "integer" + }, + "amount_remaining": { + "description": "The difference between amount_due and amount_paid, in cents (or local equivalent).", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the invoice.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.", + "nullable": true, + "type": "integer" + }, + "attempt_count": { + "description": "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.", + "type": "integer" + }, + "attempted": { + "description": "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.", + "type": "boolean" + }, + "auto_advance": { + "description": "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.", + "type": "boolean" + }, + "automatic_tax": { + "$ref": "#/components/schemas/automatic_tax" + }, + "automatically_finalizes_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "billing_reason": { + "description": "Indicates the reason why the invoice was created.\n\n* `manual`: Unrelated to a subscription, for example, created via the invoice editor.\n* `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.\n* `subscription_create`: A new subscription was created.\n* `subscription_cycle`: A subscription advanced into a new period.\n* `subscription_threshold`: A subscription reached a billing threshold.\n* `subscription_update`: A subscription was updated.\n* `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming" + ], + "nullable": true, + "type": "string" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the latest charge generated for this invoice, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "collection_method": { + "description": "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.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer who will be billed.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + }, + "customer_email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_phone": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "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.", + "nullable": true + }, + "customer_tax_exempt": { + "description": "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.", + "enum": ["exempt", "none", "reverse"], + "nullable": true, + "type": "string" + }, + "customer_tax_ids": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/invoices_resource_invoice_tax_id" + }, + "nullable": true, + "type": "array" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.", + "nullable": true + }, + "discounts": { + "description": "The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "type": "array" + }, + "due_date": { + "description": "The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "effective_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ending_balance": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "from_invoice": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_resource_from_invoice" + } + ], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.", + "nullable": true + }, + "hosted_invoice_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.", + "maxLength": 5000, + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "$ref": "#/components/schemas/connect_account_reference" + }, + "last_finalization_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.", + "nullable": true + }, + "latest_revision": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The ID of the most recent non-draft revision of this invoice", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "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.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "next_payment_attempt": { + "description": "The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoice"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_settings": { + "$ref": "#/components/schemas/invoices_payment_settings" + }, + "period_end": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "post_payment_credit_notes_amount": { + "description": "Total amount of all post-payment credit notes issued for this invoice.", + "type": "integer" + }, + "pre_payment_credit_notes_amount": { + "description": "Total amount of all pre-payment credit notes issued for this invoice.", + "type": "integer" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote this invoice was generated from.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "rendering": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_resource_invoice_rendering" + } + ], + "description": "The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_resource_shipping_cost" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied on the invoice.", + "nullable": true + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "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.", + "nullable": true + }, + "starting_balance": { + "description": "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.", + "type": "integer" + }, + "statement_descriptor": { + "description": "Extra information about an invoice for the customer's credit card statement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "enum": ["draft", "open", "paid", "uncollectible", "void"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/invoices_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that this invoice was prepared for, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_details_data" + } + ], + "description": "Details about the subscription that created this invoice.", + "nullable": true + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "type": "integer" + }, + "subtotal": { + "description": "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", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "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", + "nullable": true, + "type": "integer" + }, + "tax": { + "description": "The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.", + "nullable": true, + "type": "integer" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this invoice belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "threshold_reason": { + "$ref": "#/components/schemas/invoice_threshold_reason" + }, + "total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "total_discount_amounts": { + "description": "The aggregate amounts calculated per discount across all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "nullable": true, + "type": "array" + }, + "total_excluding_tax": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.", + "nullable": true, + "type": "integer" + }, + "total_pretax_credit_amounts": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/invoices_resource_pretax_credit_amount" + }, + "nullable": true, + "type": "array" + }, + "total_tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_transfer_data" + } + ], + "description": "The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.", + "nullable": true + }, + "webhooks_delivered_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount_due", + "amount_paid", + "amount_remaining", + "amount_shipping", + "attempt_count", + "attempted", + "automatic_tax", + "collection_method", + "created", + "currency", + "default_tax_rates", + "discounts", + "issuer", + "lines", + "livemode", + "object", + "paid", + "paid_out_of_band", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "starting_balance", + "status_transitions", + "subtotal", + "total", + "total_tax_amounts" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "charge", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "from_invoice", + "issuer", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "payment_intent", + "payment_settings", + "quote", + "rendering", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "subscription_details", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_pretax_credit_amounts", + "total_tax_amounts", + "transfer_data" + ], + "x-resourceId": "invoice" + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "nullable": true, + "type": "boolean" + } + }, + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_item_threshold_reason": { + "description": "", + "properties": { + "line_item_ids": { + "description": "The IDs of the line items that triggered the threshold invoice.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "usage_gte": { + "description": "The quantity threshold boundary that applied to the given line item.", + "type": "integer" + } + }, + "required": ["line_item_ids", "usage_gte"], + "title": "InvoiceItemThresholdReason", + "type": "object", + "x-expandableFields": [] + }, + "invoice_line_item_period": { + "description": "", + "properties": { + "end": { + "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.", + "format": "unix-time", + "type": "integer" + }, + "start": { + "description": "The start of the period. This value is inclusive.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "InvoiceLineItemPeriod", + "type": "object", + "x-expandableFields": [] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "nullable": true, + "type": "integer" + }, + "amount_type": { + "description": "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.", + "enum": ["fixed", "maximum"], + "nullable": true, + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "nullable": true, + "type": "string" + } + }, + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "invoice_payment_method_options_acss_debit_mandate_options": { + "description": "", + "properties": { + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal"], + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "required": ["preferred_language"], + "title": "invoice_payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/invoice_installments_card" + }, + "request_three_d_secure": { + "description": "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.", + "enum": ["any", "automatic", "challenge"], + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": ["installments"] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": ["bank_transfer"], + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer" + }, + "type": { + "description": "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`.", + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"] + }, + "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": ["BE", "DE", "ES", "FR", "IE", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections"] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "filters": { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options_filters" + }, + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string" + }, + "type": "array" + }, + "prefetch": { + "description": "Data features requested to be retrieved upon account creation.", + "items": { + "enum": ["balances", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": ["filters"] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options_filters": { + "description": "", + "properties": { + "account_subcategories": { + "description": "The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.", + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options_filters", + "type": "object", + "x-expandableFields": [] + }, + "invoice_rendering_pdf": { + "description": "", + "properties": { + "page_size": { + "description": "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.", + "enum": ["a4", "auto", "letter"], + "nullable": true, + "type": "string" + } + }, + "title": "InvoiceRenderingPdf", + "type": "object", + "x-expandableFields": [] + }, + "invoice_rendering_template": { + "description": "Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates\ncan be created from within the Dashboard, and they can be used over the API when creating invoices.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "nickname": { + "description": "A brief description of the template, hidden from customers", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoice_rendering_template"], + "type": "string" + }, + "status": { + "description": "The status of the template, one of `active` or `archived`.", + "enum": ["active", "archived"], + "type": "string" + }, + "version": { + "description": "Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering", + "type": "integer" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "status", + "version" + ], + "title": "InvoiceRenderingTemplate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "invoice_rendering_template" + }, + "invoice_setting_checkout_rendering_options": { + "description": "", + "properties": { + "amount_tax_display": { + "description": "How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "invoice_setting_checkout_rendering_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_custom_field": { + "description": "", + "properties": { + "name": { + "description": "The name of the custom field.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value of the custom field.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "InvoiceSettingCustomField", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_rendering_options": { + "description": "", + "properties": { + "amount_tax_display": { + "description": "How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "template": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "InvoiceSettingCustomerRenderingOptions", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_customer_rendering_options" + } + ], + "description": "Default options for invoice PDF rendering for this customer.", + "nullable": true + } + }, + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": [ + "custom_fields", + "default_payment_method", + "rendering_options" + ] + }, + "invoice_setting_quote_setting": { + "description": "", + "properties": { + "days_until_due": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "issuer": { + "$ref": "#/components/schemas/connect_account_reference" + } + }, + "required": ["issuer"], + "title": "InvoiceSettingQuoteSetting", + "type": "object", + "x-expandableFields": ["issuer"] + }, + "invoice_setting_subscription_schedule_phase_setting": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "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.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "days_until_due": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "issuer": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "nullable": true + } + }, + "title": "InvoiceSettingSubscriptionSchedulePhaseSetting", + "type": "object", + "x-expandableFields": ["account_tax_ids", "issuer"] + }, + "invoice_setting_subscription_schedule_setting": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "days_until_due": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "issuer": { + "$ref": "#/components/schemas/connect_account_reference" + } + }, + "required": ["issuer"], + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": ["account_tax_ids", "issuer"] + }, + "invoice_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in cents (or local equivalent), of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "taxability_reason": { + "description": "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.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in cents (or local equivalent).", + "nullable": true, + "type": "integer" + } + }, + "required": ["amount", "inclusive", "tax_rate"], + "title": "InvoiceTaxAmount", + "type": "object", + "x-expandableFields": ["tax_rate"] + }, + "invoice_threshold_reason": { + "description": "", + "properties": { + "amount_gte": { + "description": "The total invoice amount threshold boundary if it triggered the threshold invoice.", + "nullable": true, + "type": "integer" + }, + "item_reasons": { + "description": "Indicates which line items triggered a threshold invoice.", + "items": { + "$ref": "#/components/schemas/invoice_item_threshold_reason" + }, + "type": "array" + } + }, + "required": ["item_reasons"], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": ["item_reasons"] + }, + "invoice_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "InvoiceTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "invoiceitem": { + "description": "Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an\ninvoice by creating or updating it with an `invoice` field, at which point it will be included as\n[an invoice line item](https://stripe.com/docs/api/invoices/line_item) within\n[invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).\n\nInvoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined\nwith a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge\nor credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges\n(to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.\n\nRelated 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).", + "properties": { + "amount": { + "description": "Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "date": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discountable": { + "description": "If true, discounts will apply to this invoice item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The ID of the invoice this invoice item belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoiceitem"], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The price of the invoice item.", + "nullable": true + }, + "proration": { + "description": "Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.", + "type": "boolean" + }, + "quantity": { + "description": "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.", + "type": "integer" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that this invoice item has been created for, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_item": { + "description": "The subscription item that this invoice item has been created for, if any.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this invoice item belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "unit_amount": { + "description": "Unit amount (in the `currency` specified) of the invoice item.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "customer", + "date", + "discountable", + "id", + "livemode", + "object", + "period", + "proration", + "quantity" + ], + "title": "InvoiceItem", + "type": "object", + "x-expandableFields": [ + "customer", + "discounts", + "invoice", + "period", + "price", + "subscription", + "tax_rates", + "test_clock" + ], + "x-resourceId": "invoiceitem" + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + } + ], + "description": "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.", + "nullable": true + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + } + ], + "description": "If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_card" + } + ], + "description": "If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + } + ], + "description": "If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + } + ], + "description": "If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_sepa_debit" + } + ], + "description": "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.", + "nullable": true + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + } + ], + "description": "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.", + "nullable": true + } + }, + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "sepa_debit", + "us_bank_account" + ] + }, + "invoices_payment_settings": { + "description": "", + "properties": { + "default_mandate": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_payment_method_options" + } + ], + "description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent.", + "nullable": true + }, + "payment_method_types": { + "description": "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).", + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + } + }, + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": ["payment_method_options"] + }, + "invoices_resource_from_invoice": { + "description": "", + "properties": { + "action": { + "description": "The relation between this invoice and the cloned invoice", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + } + }, + "required": ["action", "invoice"], + "title": "InvoicesResourceFromInvoice", + "type": "object", + "x-expandableFields": ["invoice"] + }, + "invoices_resource_invoice_rendering": { + "description": "", + "properties": { + "amount_tax_display": { + "description": "How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "pdf": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_rendering_pdf" + } + ], + "description": "Invoice pdf rendering options", + "nullable": true + }, + "template": { + "description": "ID of the rendering template that the invoice is formatted by.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "template_version": { + "description": "Version of the rendering template that the invoice is using.", + "nullable": true, + "type": "integer" + } + }, + "title": "InvoicesResourceInvoiceRendering", + "type": "object", + "x-expandableFields": ["pdf"] + }, + "invoices_resource_invoice_tax_id": { + "description": "", + "properties": { + "type": { + "description": "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`, or `unknown`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["type"], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [] + }, + "invoices_resource_line_items_credited_items": { + "description": "", + "properties": { + "invoice": { + "description": "Invoice containing the credited invoice line items", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_items": { + "description": "Credited invoice line items", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["invoice", "invoice_line_items"], + "title": "InvoicesResourceLineItemsCreditedItems", + "type": "object", + "x-expandableFields": [] + }, + "invoices_resource_line_items_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_resource_line_items_credited_items" + } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies.", + "nullable": true + } + }, + "title": "InvoicesResourceLineItemsProrationDetails", + "type": "object", + "x-expandableFields": ["credited_items"] + }, + "invoices_resource_pretax_credit_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in cents (or local equivalent), of the pretax credit amount.", + "type": "integer" + }, + "credit_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing.credit_balance_transaction" + } + ], + "description": "The credit balance transaction that was applied to get this pretax credit amount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing.credit_balance_transaction" + } + ] + } + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this pretax credit amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "type": { + "description": "Type of the pretax credit amount referenced.", + "enum": ["credit_balance_transaction", "discount"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["amount", "type"], + "title": "InvoicesResourcePretaxCreditAmount", + "type": "object", + "x-expandableFields": ["credit_balance_transaction", "discount"] + }, + "invoices_resource_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the ShippingRate for this invoice.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["amount_subtotal", "amount_tax", "amount_total"], + "title": "InvoicesResourceShippingCost", + "type": "object", + "x-expandableFields": ["shipping_rate", "taxes"] + }, + "invoices_resource_status_transitions": { + "description": "", + "properties": { + "finalized_at": { + "description": "The time that the invoice draft was finalized.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "marked_uncollectible_at": { + "description": "The time that the invoice was marked uncollectible.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "paid_at": { + "description": "The time that the invoice was paid.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "voided_at": { + "description": "The time that the invoice was voided.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "InvoicesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "issuing.authorization": { + "description": "When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "approved": { + "description": "Whether the authorization has been approved.", + "type": "boolean" + }, + "authorization_method": { + "description": "How the card details were provided.", + "enum": ["chip", "contactless", "keyed_in", "online", "swipe"], + "type": "string" + }, + "balance_transactions": { + "description": "List of balance transactions associated with this authorization.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "card": { + "$ref": "#/components/schemas/issuing.card" + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ], + "description": "The cardholder to whom this authorization belongs.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "fleet": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fleet_data" + } + ], + "description": "Fleet-specific information for authorizations using Fleet cards.", + "nullable": true + }, + "fraud_challenges": { + "description": "Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.", + "items": { + "$ref": "#/components/schemas/issuing_authorization_fraud_challenge" + }, + "nullable": true, + "type": "array" + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fuel_data" + } + ], + "description": "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.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "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.", + "type": "integer" + }, + "merchant_currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_network_data" + } + ], + "description": "Details about the authorization, such as identifiers, set by the card network.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.authorization"], + "type": "string" + }, + "pending_request": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_pending_request" + } + ], + "description": "The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.", + "nullable": true + }, + "request_history": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/issuing_authorization_request" + }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": ["closed", "pending", "reversed"], + "type": "string", + "x-stripeBypassValidation": true + }, + "token": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.token" + } + ], + "description": "[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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.token" + } + ] + } + }, + "transactions": { + "description": "List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.", + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_treasury" + } + ], + "description": "[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).", + "nullable": true + }, + "verification_data": { + "$ref": "#/components/schemas/issuing_authorization_verification_data" + }, + "verified_by_fraud_challenge": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "wallet": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "approved", + "authorization_method", + "balance_transactions", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "request_history", + "status", + "transactions", + "verification_data" + ], + "title": "IssuingAuthorization", + "type": "object", + "x-expandableFields": [ + "amount_details", + "balance_transactions", + "card", + "cardholder", + "fleet", + "fraud_challenges", + "fuel", + "merchant_data", + "network_data", + "pending_request", + "request_history", + "token", + "transactions", + "treasury", + "verification_data" + ], + "x-resourceId": "issuing.authorization" + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.", + "properties": { + "brand": { + "description": "The brand of the card.", + "maxLength": 5000, + "type": "string" + }, + "cancellation_reason": { + "description": "The reason why the card was canceled.", + "enum": ["design_rejected", "lost", "stolen"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "cardholder": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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.", + "format": "currency", + "type": "string" + }, + "cvc": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "The expiration month of the card.", + "type": "integer" + }, + "exp_year": { + "description": "The expiration year of the card.", + "type": "integer" + }, + "financial_account": { + "description": "The financial account this card is attached to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the card number.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "number": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.card"], + "type": "string" + }, + "personalization_design": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.personalization_design" + } + ], + "description": "The personalization design object belonging to this card.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.personalization_design" + } + ] + } + }, + "replaced_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The latest card that replaces this card, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_for": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card this card replaces, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_reason": { + "description": "The reason why the previous card needed to be replaced.", + "enum": ["damaged", "expired", "lost", "stolen"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping" + } + ], + "description": "Where and how the card will be shipped.", + "nullable": true + }, + "spending_controls": { + "$ref": "#/components/schemas/issuing_card_authorization_controls" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": ["active", "canceled", "inactive"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "The type of the card.", + "enum": ["physical", "virtual"], + "type": "string" + }, + "wallets": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_wallets" + } + ], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay).", + "nullable": true + } + }, + "required": [ + "brand", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "livemode", + "metadata", + "object", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "personalization_design", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card" + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)", + "properties": { + "billing": { + "$ref": "#/components/schemas/issuing_cardholder_address" + }, + "company": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_company" + } + ], + "description": "Additional information about a `company` cardholder.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "email": { + "description": "The cardholder's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual" + } + ], + "description": "Additional information about an `individual` cardholder.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.cardholder"], + "type": "string" + }, + "phone_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_locales": { + "description": "The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.\n 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.", + "items": { + "enum": ["de", "en", "es", "fr", "it"], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "requirements": { + "$ref": "#/components/schemas/issuing_cardholder_requirements" + }, + "spending_controls": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_authorization_controls" + } + ], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "nullable": true + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards.", + "enum": ["active", "blocked", "inactive"], + "type": "string" + }, + "type": { + "description": "One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.", + "enum": ["company", "individual"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "created", + "id", + "livemode", + "metadata", + "name", + "object", + "requirements", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder" + }, + "issuing.dispute": { + "description": "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.\n\nRelated guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of balance transactions associated with the dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "nullable": true, + "type": "array" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "The currency the `transaction` was made in.", + "format": "currency", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/issuing_dispute_evidence" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "loss_reason": { + "description": "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.", + "enum": [ + "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" + ], + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.dispute"], + "type": "string" + }, + "status": { + "description": "Current status of the dispute.", + "enum": ["expired", "lost", "submitted", "unsubmitted", "won"], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.transaction" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_dispute_treasury" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts", + "nullable": true + } + }, + "required": [ + "amount", + "created", + "currency", + "evidence", + "id", + "livemode", + "metadata", + "object", + "status", + "transaction" + ], + "title": "IssuingDispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "evidence", + "transaction", + "treasury" + ], + "x-resourceId": "issuing.dispute" + }, + "issuing.personalization_design": { + "description": "A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.", + "properties": { + "card_logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "carrier_text": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_personalization_design_carrier_text" + } + ], + "description": "Hash containing carrier text, for use with physical bundles that support carrier text.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "Friendly display name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.personalization_design"], + "type": "string" + }, + "physical_bundle": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.physical_bundle" + } + ], + "description": "The physical bundle object belonging to this personalization design.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.physical_bundle" + } + ] + } + }, + "preferences": { + "$ref": "#/components/schemas/issuing_personalization_design_preferences" + }, + "rejection_reasons": { + "$ref": "#/components/schemas/issuing_personalization_design_rejection_reasons" + }, + "status": { + "description": "Whether this personalization design can be used to create cards.", + "enum": ["active", "inactive", "rejected", "review"], + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "metadata", + "object", + "physical_bundle", + "preferences", + "rejection_reasons", + "status" + ], + "title": "IssuingPersonalizationDesign", + "type": "object", + "x-expandableFields": [ + "card_logo", + "carrier_text", + "physical_bundle", + "preferences", + "rejection_reasons" + ], + "x-resourceId": "issuing.personalization_design" + }, + "issuing.physical_bundle": { + "description": "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.", + "properties": { + "features": { + "$ref": "#/components/schemas/issuing_physical_bundle_features" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "Friendly display name.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.physical_bundle"], + "type": "string" + }, + "status": { + "description": "Whether this physical bundle can be used to create cards.", + "enum": ["active", "inactive", "review"], + "type": "string" + }, + "type": { + "description": "Whether this physical bundle is a standard Stripe offering or custom-made for you.", + "enum": ["custom", "standard"], + "type": "string" + } + }, + "required": [ + "features", + "id", + "livemode", + "name", + "object", + "status", + "type" + ], + "title": "IssuingPhysicalBundle", + "type": "object", + "x-expandableFields": ["features"], + "x-resourceId": "issuing.physical_bundle" + }, + "issuing.settlement": { + "description": "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.", + "properties": { + "bin": { + "description": "The Bank Identification Number reflecting this settlement record.", + "maxLength": 5000, + "type": "string" + }, + "clearing_date": { + "description": "The date that the transactions are cleared and posted to user's accounts.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interchange_fees": { + "description": "The total interchange received as reimbursement for the transactions.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "net_total": { + "description": "The total net amount required to settle with the network.", + "type": "integer" + }, + "network": { + "description": "The card network for this settlement report. One of [\"visa\", \"maestro\"]", + "enum": ["maestro", "visa"], + "type": "string" + }, + "network_fees": { + "description": "The total amount of fees owed to the network.", + "type": "integer" + }, + "network_settlement_identifier": { + "description": "The Settlement Identification Number assigned by the network.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.settlement"], + "type": "string" + }, + "settlement_service": { + "description": "One of `international` or `uk_national_net`.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The current processing status of this settlement.", + "enum": ["complete", "pending"], + "type": "string" + }, + "transaction_count": { + "description": "The total number of transactions reflected in this settlement.", + "type": "integer" + }, + "transaction_volume": { + "description": "The total transaction amount reflected in this settlement.", + "type": "integer" + } + }, + "required": [ + "bin", + "clearing_date", + "created", + "currency", + "id", + "interchange_fees", + "livemode", + "metadata", + "net_total", + "network", + "network_fees", + "network_settlement_identifier", + "object", + "settlement_service", + "status", + "transaction_count", + "transaction_volume" + ], + "title": "IssuingSettlement", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "issuing.settlement" + }, + "issuing.token": { + "description": "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.", + "properties": { + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "Card associated with this token.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "device_fingerprint": { + "description": "The hashed ID derived from the device ID from the card network associated with the token.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the token.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The token service provider / card network associated with the token.", + "enum": ["mastercard", "visa"], + "type": "string" + }, + "network_data": { + "$ref": "#/components/schemas/issuing_network_token_network_data" + }, + "network_updated_at": { + "description": "Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.token"], + "type": "string" + }, + "status": { + "description": "The usage state of the token.", + "enum": ["active", "deleted", "requested", "suspended"], + "type": "string" + }, + "wallet_provider": { + "description": "The digital wallet for this token, if one was used.", + "enum": ["apple_pay", "google_pay", "samsung_pay"], + "type": "string" + } + }, + "required": [ + "card", + "created", + "id", + "livemode", + "network", + "network_updated_at", + "object", + "status" + ], + "title": "IssuingNetworkToken", + "type": "object", + "x-expandableFields": ["card", "network_data"], + "x-resourceId": "issuing.token" + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions)", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "authorization": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + } + ], + "description": "The `Authorization` object that led to this transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.authorization" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card used to make this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ], + "description": "The cardholder to whom this transaction belongs.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "dispute": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + } + ], + "description": "If you've disputed the transaction, the ID of the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.dispute" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "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.", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency with which the merchant is taking payment.", + "format": "currency", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_network_data" + } + ], + "description": "Details about the transaction, such as processing dates, set by the card network.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.transaction"], + "type": "string" + }, + "purchase_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_purchase_details" + } + ], + "description": "Additional purchase information that is optionally provided by the merchant.", + "nullable": true + }, + "token": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.token" + } + ], + "description": "[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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.token" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_treasury" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts", + "nullable": true + }, + "type": { + "description": "The nature of the transaction.", + "enum": ["capture", "refund"], + "type": "string", + "x-stripeBypassValidation": true + }, + "wallet": { + "description": "The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.", + "enum": ["apple_pay", "google_pay", "samsung_pay"], + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "type" + ], + "title": "IssuingTransaction", + "type": "object", + "x-expandableFields": [ + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "dispute", + "merchant_data", + "network_data", + "purchase_details", + "token", + "treasury" + ], + "x-resourceId": "issuing.transaction" + }, + "issuing_authorization_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "nullable": true, + "type": "integer" + }, + "cashback_amount": { + "description": "The amount of cash requested by the cardholder.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_authentication_exemption": { + "description": "", + "properties": { + "claimed_by": { + "description": "The entity that requested the exemption, either the acquiring merchant or the Issuing user.", + "enum": ["acquirer", "issuer"], + "type": "string" + }, + "type": { + "description": "The specific exemption claimed for this authorization.", + "enum": [ + "low_value_transaction", + "transaction_risk_analysis", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["claimed_by", "type"], + "title": "IssuingAuthorizationAuthenticationExemption", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_fleet_cardholder_prompt_data": { + "description": "", + "properties": { + "alphanumeric_id": { + "description": "[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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "driver_id": { + "description": "Driver ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "odometer": { + "description": "Odometer reading.", + "nullable": true, + "type": "integer" + }, + "unspecified_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_id": { + "description": "User ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "vehicle_number": { + "description": "Vehicle number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationFleetCardholderPromptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_fleet_data": { + "description": "", + "properties": { + "cardholder_prompt_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fleet_cardholder_prompt_data" + } + ], + "description": "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.", + "nullable": true + }, + "purchase_type": { + "description": "The type of purchase.", + "enum": [ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase" + ], + "nullable": true, + "type": "string" + }, + "reported_breakdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fleet_reported_breakdown" + } + ], + "description": "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.", + "nullable": true + }, + "service_type": { + "description": "The type of fuel service.", + "enum": ["full_service", "non_fuel_transaction", "self_service"], + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationFleetData", + "type": "object", + "x-expandableFields": ["cardholder_prompt_data", "reported_breakdown"] + }, + "issuing_authorization_fleet_fuel_price_data": { + "description": "", + "properties": { + "gross_amount_decimal": { + "description": "Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationFleetFuelPriceData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_fleet_non_fuel_price_data": { + "description": "", + "properties": { + "gross_amount_decimal": { + "description": "Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationFleetNonFuelPriceData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_fleet_reported_breakdown": { + "description": "", + "properties": { + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fleet_fuel_price_data" + } + ], + "description": "Breakdown of fuel portion of the purchase.", + "nullable": true + }, + "non_fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fleet_non_fuel_price_data" + } + ], + "description": "Breakdown of non-fuel portion of the purchase.", + "nullable": true + }, + "tax": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_fleet_tax_data" + } + ], + "description": "Information about tax included in this transaction.", + "nullable": true + } + }, + "title": "IssuingAuthorizationFleetReportedBreakdown", + "type": "object", + "x-expandableFields": ["fuel", "non_fuel", "tax"] + }, + "issuing_authorization_fleet_tax_data": { + "description": "", + "properties": { + "local_amount_decimal": { + "description": "Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "national_amount_decimal": { + "description": "Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationFleetTaxData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_fraud_challenge": { + "description": "", + "properties": { + "channel": { + "description": "The method by which the fraud challenge was delivered to the cardholder.", + "enum": ["sms"], + "type": "string" + }, + "status": { + "description": "The status of the fraud challenge.", + "enum": [ + "expired", + "pending", + "rejected", + "undeliverable", + "verified" + ], + "type": "string" + }, + "undeliverable_reason": { + "description": "If the challenge is not deliverable, the reason why.", + "enum": ["no_phone_number", "unsupported_phone_number"], + "nullable": true, + "type": "string" + } + }, + "required": ["channel", "status"], + "title": "IssuingAuthorizationFraudChallenge", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_fuel_data": { + "description": "", + "properties": { + "industry_product_code": { + "description": "[Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity_decimal": { + "description": "The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of fuel that was purchased.", + "enum": [ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super" + ], + "nullable": true, + "type": "string" + }, + "unit": { + "description": "The units for `quantity_decimal`.", + "enum": [ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon" + ], + "nullable": true, + "type": "string" + }, + "unit_cost_decimal": { + "description": "The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "category_code": { + "description": "The merchant category code for the seller’s business", + "maxLength": 5000, + "type": "string" + }, + "city": { + "description": "City where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Country where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Name of the seller", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_id": { + "description": "Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.", + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "description": "Postal code where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_id": { + "description": "The seller's tax identification number. Currently populated for French merchants only.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_id": { + "description": "An ID assigned by the seller to the location of the sale.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "URL provided by the merchant on a 3DS request", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["category", "category_code", "network_id"], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_network_data": { + "description": "", + "properties": { + "acquiring_institution_id": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "system_trace_audit_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_pending_request": { + "description": "", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "is_amount_controllable": { + "description": "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.", + "type": "boolean" + }, + "merchant_amount": { + "description": "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).", + "type": "integer" + }, + "merchant_currency": { + "description": "The local currency the merchant is requesting to authorize.", + "format": "currency", + "type": "string" + }, + "network_risk_score": { + "description": "The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": ["amount_details"] + }, + "issuing_authorization_request": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "approved": { + "description": "Whether this request was approved.", + "type": "boolean" + }, + "authorization_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "merchant_amount": { + "description": "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).", + "type": "integer" + }, + "merchant_currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "network_risk_score": { + "description": "The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.", + "nullable": true, + "type": "integer" + }, + "reason": { + "description": "When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.", + "enum": [ + "account_disabled", + "card_active", + "card_canceled", + "card_expired", + "card_inactive", + "cardholder_blocked", + "cardholder_inactive", + "cardholder_verification_required", + "insecure_authorization_method", + "insufficient_funds", + "not_allowed", + "pin_blocked", + "spending_controls", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason_message": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "requested_at": { + "description": "Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount", + "approved", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "reason" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": ["amount_details"] + }, + "issuing_authorization_three_d_secure": { + "description": "", + "properties": { + "result": { + "description": "The outcome of the 3D Secure authentication request.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "failed", + "required" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["result"], + "title": "IssuingAuthorizationThreeDSecure", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["received_credits", "received_debits"], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_verification_data": { + "description": "", + "properties": { + "address_line1_check": { + "description": "Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.", + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "address_postal_code_check": { + "description": "Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.", + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "authentication_exemption": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_authentication_exemption" + } + ], + "description": "The exemption applied to this authorization.", + "nullable": true + }, + "cvc_check": { + "description": "Whether the cardholder provided a CVC and if it matched Stripe’s record.", + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "expiry_check": { + "description": "Whether the cardholder provided an expiry date and if it matched Stripe’s record.", + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "postal_code": { + "description": "The postal code submitted as part of the authorization used for postal code verification.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_three_d_secure" + } + ], + "description": "3D Secure details.", + "nullable": true + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "cvc_check", + "expiry_check" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": ["authentication_exemption", "three_d_secure"] + }, + "issuing_card_apple_pay": { + "description": "", + "properties": { + "eligible": { + "description": "Apple Pay Eligibility", + "type": "boolean" + }, + "ineligible_reason": { + "description": "Reason the card is ineligible for Apple Pay", + "enum": [ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["eligible"], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "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`.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "allowed_merchant_countries": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "blocked_categories": { + "description": "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`.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "blocked_merchant_countries": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "spending_limits": { + "description": "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).", + "items": { + "$ref": "#/components/schemas/issuing_card_spending_limit" + }, + "nullable": true, + "type": "array" + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`. Always the same as the currency of the card.", + "format": "currency", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": ["spending_limits"] + }, + "issuing_card_google_pay": { + "description": "", + "properties": { + "eligible": { + "description": "Google Pay Eligibility", + "type": "boolean" + }, + "ineligible_reason": { + "description": "Reason the card is ineligible for Google Pay", + "enum": [ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["eligible"], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "address_validation": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping_address_validation" + } + ], + "description": "Address validation details for the shipment.", + "nullable": true + }, + "carrier": { + "description": "The delivery company that shipped a card.", + "enum": ["dhl", "fedex", "royal_mail", "usps"], + "nullable": true, + "type": "string" + }, + "customs": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping_customs" + } + ], + "description": "Additional information that may be required for clearing customs.", + "nullable": true + }, + "eta": { + "description": "A unix timestamp representing a best estimate of when the card will be delivered.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "require_signature": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "service": { + "description": "Shipment service, such as `standard` or `express`.", + "enum": ["express", "priority", "standard"], + "type": "string", + "x-stripeBypassValidation": true + }, + "status": { + "description": "The delivery status of the card.", + "enum": [ + "canceled", + "delivered", + "failure", + "pending", + "returned", + "shipped", + "submitted" + ], + "nullable": true, + "type": "string" + }, + "tracking_number": { + "description": "A tracking number for a card shipment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tracking_url": { + "description": "A link to the shipping carrier's site where you can view detailed information about a card shipment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Packaging options.", + "enum": ["bulk", "individual"], + "type": "string" + } + }, + "required": ["address", "name", "service", "type"], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": ["address", "address_validation", "customs"] + }, + "issuing_card_shipping_address_validation": { + "description": "", + "properties": { + "mode": { + "description": "The address validation capabilities to use.", + "enum": [ + "disabled", + "normalization_only", + "validation_and_normalization" + ], + "type": "string" + }, + "normalized_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The normalized shipping address.", + "nullable": true + }, + "result": { + "description": "The validation result for the shipping address.", + "enum": [ + "indeterminate", + "likely_deliverable", + "likely_undeliverable" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["mode"], + "title": "IssuingCardShippingAddressValidation", + "type": "object", + "x-expandableFields": ["normalized_address"] + }, + "issuing_card_shipping_customs": { + "description": "", + "properties": { + "eori_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "categories": { + "description": "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.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/issuing_card_apple_pay" + }, + "google_pay": { + "$ref": "#/components/schemas/issuing_card_google_pay" + }, + "primary_account_identifier": { + "description": "Unique identifier for a card used with digital wallets", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["apple_pay", "google_pay"], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": ["apple_pay", "google_pay"] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + } + }, + "required": ["address"], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": ["address"] + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "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`.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "allowed_merchant_countries": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "blocked_categories": { + "description": "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`.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "blocked_merchant_countries": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across this cardholder's cards.", + "items": { + "$ref": "#/components/schemas/issuing_cardholder_spending_limit" + }, + "nullable": true, + "type": "array" + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`.", + "format": "currency", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": ["spending_limits"] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_user_terms_acceptance" + } + ], + "description": "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.", + "nullable": true + } + }, + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": ["user_terms_acceptance"] + }, + "issuing_cardholder_company": { + "description": "", + "properties": { + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + } + }, + "required": ["tax_id_provided"], + "title": "IssuingCardholderCompany", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": ["back", "front"] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_card_issuing" + } + ], + "description": "Information related to the card_issuing program for this cardholder.", + "nullable": true + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual_dob" + } + ], + "description": "The date of birth of this cardholder.", + "nullable": true + }, + "first_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_verification" + } + ], + "description": "Government-issued ID document for this cardholder.", + "nullable": true + } + }, + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": ["card_issuing", "dob", "verification"] + }, + "issuing_cardholder_individual_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of birth.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_requirements": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.", + "enum": [ + "listed", + "rejected.listed", + "requirements.past_due", + "under_review" + ], + "nullable": true, + "type": "string" + }, + "past_due": { + "description": "Array of fields that need to be collected in order to verify and re-enable the cardholder.", + "items": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + } + }, + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "categories": { + "description": "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.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_user_terms_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the cardholder accepted the Authorized User Terms.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_id_document" + } + ], + "description": "An identifying document, either a passport or local ID card.", + "nullable": true + } + }, + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": ["document"] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_policy_provided": { + "description": "Whether the cardholder was provided with a cancellation policy.", + "nullable": true, + "type": "boolean" + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": ["merchandise", "service"], + "nullable": true, + "type": "string" + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": ["merchant_rejected", "successful"], + "nullable": true, + "type": "string" + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "card_statement": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cash_receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "check_image": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "original_transaction": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { + "$ref": "#/components/schemas/issuing_dispute_canceled_evidence" + }, + "duplicate": { + "$ref": "#/components/schemas/issuing_dispute_duplicate_evidence" + }, + "fraudulent": { + "$ref": "#/components/schemas/issuing_dispute_fraudulent_evidence" + }, + "merchandise_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_merchandise_not_as_described_evidence" + }, + "no_valid_authorization": { + "$ref": "#/components/schemas/issuing_dispute_no_valid_authorization_evidence" + }, + "not_received": { + "$ref": "#/components/schemas/issuing_dispute_not_received_evidence" + }, + "other": { + "$ref": "#/components/schemas/issuing_dispute_other_evidence" + }, + "reason": { + "description": "The reason for filing the dispute. Its value will match the field containing the evidence.", + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_service_not_as_described_evidence" + } + }, + "required": ["reason"], + "title": "IssuingDisputeEvidence", + "type": "object", + "x-expandableFields": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "return_description": { + "description": "Description of the cardholder's attempt to return the product.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": ["merchant_rejected", "successful"], + "nullable": true, + "type": "string" + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_no_valid_authorization_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeNoValidAuthorizationEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": ["merchandise", "service"], + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": ["merchandise", "service"], + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["received_debit"], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_network_token_address": { + "description": "", + "properties": { + "line1": { + "description": "The street address of the cardholder tokenizing the card.", + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "description": "The postal code of the cardholder tokenizing the card.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["line1", "postal_code"], + "title": "IssuingNetworkTokenAddress", + "type": "object", + "x-expandableFields": [] + }, + "issuing_network_token_device": { + "description": "", + "properties": { + "device_fingerprint": { + "description": "An obfuscated ID derived from the device ID.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The IP address of the device at provisioning time.", + "maxLength": 5000, + "type": "string" + }, + "location": { + "description": "The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the device used for tokenization.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "The phone number of the device used for tokenization.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of device used for tokenization.", + "enum": ["other", "phone", "watch"], + "type": "string" + } + }, + "title": "IssuingNetworkTokenDevice", + "type": "object", + "x-expandableFields": [] + }, + "issuing_network_token_mastercard": { + "description": "", + "properties": { + "card_reference_id": { + "description": "A unique reference ID from MasterCard to represent the card account number.", + "maxLength": 5000, + "type": "string" + }, + "token_reference_id": { + "description": "The network-unique identifier for the token.", + "maxLength": 5000, + "type": "string" + }, + "token_requestor_id": { + "description": "The ID of the entity requesting tokenization, specific to MasterCard.", + "maxLength": 5000, + "type": "string" + }, + "token_requestor_name": { + "description": "The name of the entity requesting tokenization, if known. This is directly provided from MasterCard.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["token_reference_id", "token_requestor_id"], + "title": "IssuingNetworkTokenMastercard", + "type": "object", + "x-expandableFields": [] + }, + "issuing_network_token_network_data": { + "description": "", + "properties": { + "device": { + "$ref": "#/components/schemas/issuing_network_token_device" + }, + "mastercard": { + "$ref": "#/components/schemas/issuing_network_token_mastercard" + }, + "type": { + "description": "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.", + "enum": ["mastercard", "visa"], + "type": "string" + }, + "visa": { + "$ref": "#/components/schemas/issuing_network_token_visa" + }, + "wallet_provider": { + "$ref": "#/components/schemas/issuing_network_token_wallet_provider" + } + }, + "required": ["type"], + "title": "IssuingNetworkTokenNetworkData", + "type": "object", + "x-expandableFields": [ + "device", + "mastercard", + "visa", + "wallet_provider" + ] + }, + "issuing_network_token_visa": { + "description": "", + "properties": { + "card_reference_id": { + "description": "A unique reference ID from Visa to represent the card account number.", + "maxLength": 5000, + "type": "string" + }, + "token_reference_id": { + "description": "The network-unique identifier for the token.", + "maxLength": 5000, + "type": "string" + }, + "token_requestor_id": { + "description": "The ID of the entity requesting tokenization, specific to Visa.", + "maxLength": 5000, + "type": "string" + }, + "token_risk_score": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "card_reference_id", + "token_reference_id", + "token_requestor_id" + ], + "title": "IssuingNetworkTokenVisa", + "type": "object", + "x-expandableFields": [] + }, + "issuing_network_token_wallet_provider": { + "description": "", + "properties": { + "account_id": { + "description": "The wallet provider-given account ID of the digital wallet the token belongs to.", + "maxLength": 5000, + "type": "string" + }, + "account_trust_score": { + "description": "An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy.", + "type": "integer" + }, + "card_number_source": { + "description": "The method used for tokenizing a card.", + "enum": ["app", "manual", "on_file", "other"], + "type": "string" + }, + "cardholder_address": { + "$ref": "#/components/schemas/issuing_network_token_address" + }, + "cardholder_name": { + "description": "The name of the cardholder tokenizing the card.", + "maxLength": 5000, + "type": "string" + }, + "device_trust_score": { + "description": "An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy.", + "type": "integer" + }, + "hashed_account_email_address": { + "description": "The hashed email address of the cardholder's account with the wallet provider.", + "maxLength": 5000, + "type": "string" + }, + "reason_codes": { + "description": "The reasons for suggested tokenization given by the card network.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "type": "array" + }, + "suggested_decision": { + "description": "The recommendation on responding to the tokenization request.", + "enum": ["approve", "decline", "require_auth"], + "type": "string" + }, + "suggested_decision_version": { + "description": "The version of the standard for mapping reason codes followed by the wallet provider.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "IssuingNetworkTokenWalletProvider", + "type": "object", + "x-expandableFields": ["cardholder_address"] + }, + "issuing_personalization_design_carrier_text": { + "description": "", + "properties": { + "footer_body": { + "description": "The footer body text of the carrier letter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "footer_title": { + "description": "The footer title text of the carrier letter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "header_body": { + "description": "The header body text of the carrier letter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "header_title": { + "description": "The header title text of the carrier letter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingPersonalizationDesignCarrierText", + "type": "object", + "x-expandableFields": [] + }, + "issuing_personalization_design_preferences": { + "description": "", + "properties": { + "is_default": { + "description": "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.", + "type": "boolean" + }, + "is_platform_default": { + "description": "Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.", + "nullable": true, + "type": "boolean" + } + }, + "required": ["is_default"], + "title": "IssuingPersonalizationDesignPreferences", + "type": "object", + "x-expandableFields": [] + }, + "issuing_personalization_design_rejection_reasons": { + "description": "", + "properties": { + "card_logo": { + "description": "The reason(s) the card logo was rejected.", + "items": { + "enum": [ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "carrier_text": { + "description": "The reason(s) the carrier text was rejected.", + "items": { + "enum": [ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "IssuingPersonalizationDesignRejectionReasons", + "type": "object", + "x-expandableFields": [] + }, + "issuing_physical_bundle_features": { + "description": "", + "properties": { + "card_logo": { + "description": "The policy for how to use card logo images in a card design with this physical bundle.", + "enum": ["optional", "required", "unsupported"], + "type": "string" + }, + "carrier_text": { + "description": "The policy for how to use carrier letter text in a card design with this physical bundle.", + "enum": ["optional", "required", "unsupported"], + "type": "string" + }, + "second_line": { + "description": "The policy for how to use a second line on a card with this physical bundle.", + "enum": ["optional", "required", "unsupported"], + "type": "string" + } + }, + "required": ["card_logo", "carrier_text", "second_line"], + "title": "IssuingPhysicalBundleFeatures", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "nullable": true, + "type": "integer" + }, + "cashback_amount": { + "description": "The amount of cash requested by the cardholder.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fleet_cardholder_prompt_data": { + "description": "", + "properties": { + "driver_id": { + "description": "Driver ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "odometer": { + "description": "Odometer reading.", + "nullable": true, + "type": "integer" + }, + "unspecified_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_id": { + "description": "User ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "vehicle_number": { + "description": "Vehicle number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFleetCardholderPromptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fleet_data": { + "description": "", + "properties": { + "cardholder_prompt_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fleet_cardholder_prompt_data" + } + ], + "description": "Answers to prompts presented to cardholder at point of sale.", + "nullable": true + }, + "purchase_type": { + "description": "The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reported_breakdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fleet_reported_breakdown" + } + ], + "description": "More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.", + "nullable": true + }, + "service_type": { + "description": "The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFleetData", + "type": "object", + "x-expandableFields": ["cardholder_prompt_data", "reported_breakdown"] + }, + "issuing_transaction_fleet_fuel_price_data": { + "description": "", + "properties": { + "gross_amount_decimal": { + "description": "Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFleetFuelPriceData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fleet_non_fuel_price_data": { + "description": "", + "properties": { + "gross_amount_decimal": { + "description": "Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFleetNonFuelPriceData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fleet_reported_breakdown": { + "description": "", + "properties": { + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fleet_fuel_price_data" + } + ], + "description": "Breakdown of fuel portion of the purchase.", + "nullable": true + }, + "non_fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fleet_non_fuel_price_data" + } + ], + "description": "Breakdown of non-fuel portion of the purchase.", + "nullable": true + }, + "tax": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fleet_tax_data" + } + ], + "description": "Information about tax included in this transaction.", + "nullable": true + } + }, + "title": "IssuingTransactionFleetReportedBreakdown", + "type": "object", + "x-expandableFields": ["fuel", "non_fuel", "tax"] + }, + "issuing_transaction_fleet_tax_data": { + "description": "", + "properties": { + "local_amount_decimal": { + "description": "Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "national_amount_decimal": { + "description": "Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFleetTaxData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_flight_data": { + "description": "", + "properties": { + "departure_at": { + "description": "The time that the flight departed.", + "nullable": true, + "type": "integer" + }, + "passenger_name": { + "description": "The name of the passenger.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "refundable": { + "description": "Whether the ticket is refundable.", + "nullable": true, + "type": "boolean" + }, + "segments": { + "description": "The legs of the trip.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_flight_data_leg" + }, + "nullable": true, + "type": "array" + }, + "travel_agency": { + "description": "The travel agency that issued the ticket.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": ["segments"] + }, + "issuing_transaction_flight_data_leg": { + "description": "", + "properties": { + "arrival_airport_code": { + "description": "The three-letter IATA airport code of the flight's destination.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "carrier": { + "description": "The airline carrier code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "departure_airport_code": { + "description": "The three-letter IATA airport code that the flight departed from.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flight_number": { + "description": "The flight number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_class": { + "description": "The flight's service class.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "stopover_allowed": { + "description": "Whether a stopover is allowed on this flight.", + "nullable": true, + "type": "boolean" + } + }, + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fuel_data": { + "description": "", + "properties": { + "industry_product_code": { + "description": "[Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity_decimal": { + "description": "The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.", + "maxLength": 5000, + "type": "string" + }, + "unit": { + "description": "The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.", + "maxLength": 5000, + "type": "string" + }, + "unit_cost_decimal": { + "description": "The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "type": "string" + } + }, + "required": ["type", "unit", "unit_cost_decimal"], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_lodging_data": { + "description": "", + "properties": { + "check_in_at": { + "description": "The time of checking into the lodging.", + "nullable": true, + "type": "integer" + }, + "nights": { + "description": "The number of nights stayed at the lodging.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_network_data": { + "description": "", + "properties": { + "authorization_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "processing_date": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "fleet": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fleet_data" + } + ], + "description": "Fleet-specific information for transactions using Fleet cards.", + "nullable": true + }, + "flight": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_flight_data" + } + ], + "description": "Information about the flight that was purchased with this transaction.", + "nullable": true + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fuel_data" + } + ], + "description": "Information about fuel that was purchased with this transaction.", + "nullable": true + }, + "lodging": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_lodging_data" + } + ], + "description": "Information about lodging that was purchased with this transaction.", + "nullable": true + }, + "receipt": { + "description": "The line items in the purchase.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_receipt_data" + }, + "nullable": true, + "type": "array" + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": ["fleet", "flight", "fuel", "lodging", "receipt"] + }, + "issuing_transaction_receipt_data": { + "description": "", + "properties": { + "description": { + "description": "The description of the item. The maximum length of this field is 26 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The quantity of the item.", + "nullable": true, + "type": "number" + }, + "total": { + "description": "The total for this line item in cents.", + "nullable": true, + "type": "integer" + }, + "unit_cost": { + "description": "The unit cost of the item in cents.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [] + }, + "item": { + "description": "A line item.", + "properties": { + "amount_discount": { + "description": "Total discount amount applied. If no discounts were applied, defaults to 0.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["item"], + "type": "string" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The price used to generate the line item.", + "nullable": true + }, + "quantity": { + "description": "The quantity of products being purchased.", + "nullable": true, + "type": "integer" + }, + "taxes": { + "description": "The taxes applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_discount", + "amount_subtotal", + "amount_tax", + "amount_total", + "currency", + "id", + "object" + ], + "title": "LineItem", + "type": "object", + "x-expandableFields": ["discounts", "price", "taxes"], + "x-resourceId": "item" + }, + "klarna_address": { + "description": "", + "properties": { + "country": { + "description": "The payer address country", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "klarna_address", + "type": "object", + "x-expandableFields": [] + }, + "klarna_payer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/klarna_address" + } + ], + "description": "The payer's address", + "nullable": true + } + }, + "title": "klarna_payer_details", + "type": "object", + "x-expandableFields": ["address"] + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "description": "The Kana variation of the company's primary address (Japan only).", + "nullable": true + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "description": "The Kanji variation of the company's primary address (Japan only).", + "nullable": true + }, + "directors_provided": { + "description": "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).", + "type": "boolean" + }, + "directorship_declaration": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_directorship_declaration" + } + ], + "description": "This hash is used to attest that the director information provided to Stripe is both current and correct.", + "nullable": true + }, + "executives_provided": { + "description": "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.", + "type": "boolean" + }, + "export_license_id": { + "description": "The export license ID number of the company, also referred as Import Export Code (India only).", + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "description": "The purpose code to use for export transactions (India only).", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The company's legal name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "owners_provided": { + "description": "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).", + "type": "boolean" + }, + "ownership_declaration": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_ubo_declaration" + } + ], + "description": "This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.", + "nullable": true + }, + "ownership_exemption_reason": { + "enum": [ + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution" + ], + "type": "string" + }, + "phone": { + "description": "The company's phone number (used for verification).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.", + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + }, + "tax_id_registrar": { + "description": "The jurisdiction in which the `tax_id` is registered (Germany-based companies only).", + "maxLength": 5000, + "type": "string" + }, + "vat_id_provided": { + "description": "Whether the company's business VAT number was provided.", + "type": "boolean" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_company_verification" + } + ], + "description": "Information on the verification state of the company.", + "nullable": true + } + }, + "title": "LegalEntityCompany", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "directorship_declaration", + "ownership_declaration", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/legal_entity_company_verification_document" + } + }, + "required": ["document"], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": ["document"] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "details_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": ["back", "front"] + }, + "legal_entity_directorship_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the directorship declaration attestation was made.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the directorship declaration attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user-agent string from the browser where the directorship declaration attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "LegalEntityDirectorshipDeclaration", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of birth.", + "nullable": true, + "type": "integer" + } + }, + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_japan_address": { + "description": "", + "properties": { + "city": { + "description": "City/Ward.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line1": { + "description": "Block/Building number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Building details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "Prefecture.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "town": { + "description": "Town/cho-me.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + } + ], + "description": "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.", + "nullable": true + }, + "details": { + "description": "A user-displayable string describing the verification state for the person. For example, this may say \"Provided identity information could not be verified\".", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "details_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "document": { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["status"], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": ["additional_document", "document"] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "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\".", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "details_code": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": ["back", "front"] + }, + "legal_entity_ubo_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the beneficial owner attestation was made.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the beneficial owner attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user-agent string from the browser where the beneficial owner attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [] + }, + "line_item": { + "description": "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.\n\nEach 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).", + "properties": { + "amount": { + "description": "The amount, in cents (or local equivalent).", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "nullable": true, + "type": "array" + }, + "discountable": { + "description": "If true, discounts will apply to this line item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The ID of the invoice that contains this line item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_item": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoiceitem" + } + ], + "description": "The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoiceitem" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["line_item"], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "pretax_credit_amounts": { + "description": "Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.", + "items": { + "$ref": "#/components/schemas/invoices_resource_pretax_credit_amount" + }, + "nullable": true, + "type": "array" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The price of the line item.", + "nullable": true + }, + "proration": { + "description": "Whether this is a proration.", + "type": "boolean" + }, + "proration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_resource_line_items_proration_details" + } + ], + "description": "Additional details for proration line items", + "nullable": true + }, + "quantity": { + "description": "The quantity of the subscription, if the line item is a subscription or a proration.", + "nullable": true, + "type": "integer" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that the invoice item pertains to, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_item": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_item" + } + ], + "description": "The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_item" + } + ] + } + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.", + "enum": ["invoiceitem", "subscription"], + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "discountable", + "discounts", + "id", + "livemode", + "metadata", + "object", + "period", + "proration", + "tax_amounts", + "tax_rates", + "type" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "invoice_item", + "period", + "pretax_credit_amounts", + "price", + "proration_details", + "subscription", + "subscription_item", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "line_item" + }, + "line_items_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount discounted.", + "type": "integer" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + }, + "required": ["amount", "discount"], + "title": "LineItemsDiscountAmount", + "type": "object", + "x-expandableFields": ["discount"] + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "Amount of tax applied for this rate.", + "type": "integer" + }, + "rate": { + "$ref": "#/components/schemas/tax_rate" + }, + "taxability_reason": { + "description": "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.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in cents (or local equivalent).", + "nullable": true, + "type": "integer" + } + }, + "required": ["amount", "rate"], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": ["rate"] + }, + "linked_account_options_us_bank_account": { + "description": "", + "properties": { + "filters": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_us_bank_account_linked_account_options_filters" + }, + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string" + }, + "type": "array" + }, + "prefetch": { + "description": "Data features requested to be retrieved upon account creation.", + "items": { + "enum": ["balances", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "return_url": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_us_bank_account", + "type": "object", + "x-expandableFields": ["filters"] + }, + "login_link": { + "description": "Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["login_link"], + "type": "string" + }, + "url": { + "description": "The URL for the login link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["created", "object", "url"], + "title": "LoginLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "login_link" + }, + "mandate": { + "description": "A Mandate is a record of the permission that your customer gives you to debit their payment method.", + "properties": { + "customer_acceptance": { + "$ref": "#/components/schemas/customer_acceptance" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "multi_use": { + "$ref": "#/components/schemas/mandate_multi_use" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["mandate"], + "type": "string" + }, + "on_behalf_of": { + "description": "The account (if any) that the mandate is intended for.", + "maxLength": 5000, + "type": "string" + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/mandate_payment_method_details" + }, + "single_use": { + "$ref": "#/components/schemas/mandate_single_use" + }, + "status": { + "description": "The mandate status indicates whether or not you can use it to initiate a payment.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "type": { + "description": "The type of the mandate.", + "enum": ["multi_use", "single_use"], + "type": "string" + } + }, + "required": [ + "customer_acceptance", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "title": "Mandate", + "type": "object", + "x-expandableFields": [ + "customer_acceptance", + "multi_use", + "payment_method", + "payment_method_details", + "single_use" + ], + "x-resourceId": "mandate" + }, + "mandate_acss_debit": { + "description": "", + "properties": { + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic"], + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal"], + "type": "string" + } + }, + "required": ["payment_schedule", "transaction_type"], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_amazon_pay": { + "description": "", + "properties": {}, + "title": "mandate_amazon_pay", + "type": "object", + "x-expandableFields": [] + }, + "mandate_au_becs_debit": { + "description": "", + "properties": { + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["url"], + "title": "mandate_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "network_status": { + "description": "The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.", + "enum": ["accepted", "pending", "refused", "revoked"], + "type": "string" + }, + "reference": { + "description": "The unique reference identifying the mandate on the Bacs network.", + "maxLength": 5000, + "type": "string" + }, + "revocation_reason": { + "description": "When the mandate is revoked on the Bacs network this field displays the reason for the revocation.", + "enum": [ + "account_closed", + "bank_account_restricted", + "bank_ownership_changed", + "could_not_process", + "debit_not_authorized" + ], + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["network_status", "reference", "url"], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_cashapp": { + "description": "", + "properties": {}, + "title": "mandate_cashapp", + "type": "object", + "x-expandableFields": [] + }, + "mandate_kakao_pay": { + "description": "", + "properties": {}, + "title": "mandate_kakao_pay", + "type": "object", + "x-expandableFields": [] + }, + "mandate_kr_card": { + "description": "", + "properties": {}, + "title": "mandate_kr_card", + "type": "object", + "x-expandableFields": [] + }, + "mandate_link": { + "description": "", + "properties": {}, + "title": "mandate_link", + "type": "object", + "x-expandableFields": [] + }, + "mandate_multi_use": { + "description": "", + "properties": {}, + "title": "mandate_multi_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/mandate_acss_debit" + }, + "amazon_pay": { + "$ref": "#/components/schemas/mandate_amazon_pay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/mandate_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/mandate_bacs_debit" + }, + "card": { + "$ref": "#/components/schemas/card_mandate_payment_method_details" + }, + "cashapp": { + "$ref": "#/components/schemas/mandate_cashapp" + }, + "kakao_pay": { + "$ref": "#/components/schemas/mandate_kakao_pay" + }, + "kr_card": { + "$ref": "#/components/schemas/mandate_kr_card" + }, + "link": { + "$ref": "#/components/schemas/mandate_link" + }, + "paypal": { + "$ref": "#/components/schemas/mandate_paypal" + }, + "revolut_pay": { + "$ref": "#/components/schemas/mandate_revolut_pay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/mandate_sepa_debit" + }, + "type": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/mandate_us_bank_account" + } + }, + "required": ["type"], + "title": "mandate_payment_method_details", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "card", + "cashapp", + "kakao_pay", + "kr_card", + "link", + "paypal", + "revolut_pay", + "sepa_debit", + "us_bank_account" + ] + }, + "mandate_paypal": { + "description": "", + "properties": { + "billing_agreement_id": { + "description": "The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payer_id": { + "description": "PayPal account PayerID. This identifier uniquely identifies the PayPal customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "mandate_paypal", + "type": "object", + "x-expandableFields": [] + }, + "mandate_revolut_pay": { + "description": "", + "properties": {}, + "title": "mandate_revolut_pay", + "type": "object", + "x-expandableFields": [] + }, + "mandate_sepa_debit": { + "description": "", + "properties": { + "reference": { + "description": "The unique reference of the mandate.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["reference", "url"], + "title": "mandate_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_single_use": { + "description": "", + "properties": { + "amount": { + "description": "The amount of the payment on a single use mandate.", + "type": "integer" + }, + "currency": { + "description": "The currency of the payment on a single use mandate.", + "format": "currency", + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "mandate_single_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_us_bank_account": { + "description": "", + "properties": { + "collection_method": { + "description": "Mandate collection method", + "enum": ["paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "networks": { + "description": "", + "properties": { + "available": { + "description": "All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["available"], + "title": "networks", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_data": { + "description": "", + "properties": { + "object": { + "description": "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.", + "type": "object" + }, + "previous_attributes": { + "description": "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.", + "type": "object" + } + }, + "required": ["object"], + "title": "NotificationEventData", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_request": { + "description": "", + "properties": { + "id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "idempotency_key": { + "description": "The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "NotificationEventRequest", + "type": "object", + "x-expandableFields": [] + }, + "offline_acceptance": { + "description": "", + "properties": {}, + "title": "offline_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "online_acceptance": { + "description": "", + "properties": { + "ip_address": { + "description": "The customer accepts the mandate from this IP address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The customer accepts the mandate using the user agent of the browser.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/outbound_payments_payment_method_details_financial_account" + }, + "type": { + "description": "The type of the payment method used in the OutboundPayment.", + "enum": ["financial_account", "us_bank_account"], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/outbound_payments_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "OutboundPaymentsPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "outbound_payments_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "Token of the FinancialAccount.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails used to send funds.", + "enum": ["stripe"], + "type": "string" + } + }, + "required": ["id", "network"], + "title": "outbound_payments_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings"], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the mandate used to make this payment.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "network": { + "description": "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.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["network"], + "title": "outbound_payments_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": ["mandate"] + }, + "outbound_transfers_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details_financial_account" + }, + "type": { + "description": "The type of the payment method used in the OutboundTransfer.", + "enum": ["financial_account", "us_bank_account"], + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "OutboundTransfersPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "outbound_transfers_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "Token of the FinancialAccount.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails used to send funds.", + "enum": ["stripe"], + "type": "string" + } + }, + "required": ["id", "network"], + "title": "outbound_transfers_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings"], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the mandate used to make this payment.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "network": { + "description": "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.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["network"], + "title": "outbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": ["mandate"] + }, + "package_dimensions": { + "description": "", + "properties": { + "height": { + "description": "Height, in inches.", + "type": "number" + }, + "length": { + "description": "Length, in inches.", + "type": "number" + }, + "weight": { + "description": "Weight, in ounces.", + "type": "number" + }, + "width": { + "description": "Width, in inches.", + "type": "number" + } + }, + "required": ["height", "length", "weight", "width"], + "title": "PackageDimensions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "tip": { + "$ref": "#/components/schemas/payment_flows_amount_details_client_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": ["tip"] + }, + "payment_flows_amount_details_client": { + "description": "", + "properties": { + "tip": { + "$ref": "#/components/schemas/payment_flows_amount_details_client_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetailsClient", + "type": "object", + "x-expandableFields": ["tip"] + }, + "payment_flows_amount_details_client_resource_tip": { + "description": "", + "properties": { + "amount": { + "description": "Portion of the amount that corresponds to a tip.", + "type": "integer" + } + }, + "title": "PaymentFlowsAmountDetailsClientResourceTip", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_payment_intent": { + "description": "", + "properties": { + "allow_redirects": { + "description": "Controls whether this PaymentIntent will accept redirect-based payment methods.\n\nRedirect-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.", + "enum": ["always", "never"], + "type": "string" + }, + "enabled": { + "description": "Automatically calculates compatible payment methods", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentFlowsAutomaticPaymentMethodsPaymentIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_setup_intent": { + "description": "", + "properties": { + "allow_redirects": { + "description": "Controls whether this SetupIntent will accept redirect-based payment methods.\n\nRedirect-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.", + "enum": ["always", "never"], + "type": "string" + }, + "enabled": { + "description": "Automatically calculates compatible payment methods", + "nullable": true, + "type": "boolean" + } + }, + "title": "PaymentFlowsAutomaticPaymentMethodsSetupIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_installment_options": { + "description": "", + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + }, + "required": ["enabled"], + "title": "PaymentFlowsInstallmentOptions", + "type": "object", + "x-expandableFields": ["plan"] + }, + "payment_flows_private_payment_methods_alipay": { + "description": "", + "properties": {}, + "title": "PaymentFlowsPrivatePaymentMethodsAlipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_alipay_details": { + "description": "", + "properties": { + "buyer_id": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Transaction ID of this particular Alipay transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether or not the capture window is extended beyond the standard authorization.", + "enum": ["disabled", "enabled"], + "type": "string" + } + }, + "required": ["status"], + "title": "PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether or not the incremental authorization feature is supported.", + "enum": ["available", "unavailable"], + "type": "string" + } + }, + "required": ["status"], + "title": "PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture": { + "description": "", + "properties": { + "maximum_amount_capturable": { + "description": "The maximum amount that can be captured.", + "type": "integer" + }, + "status": { + "description": "Indicates whether or not the authorized amount can be over-captured.", + "enum": ["available", "unavailable"], + "type": "string" + } + }, + "required": ["maximum_amount_capturable", "status"], + "title": "PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceEnterpriseFeaturesOvercaptureOvercapture", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_card_details_api_resource_multicapture": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether or not multiple captures are supported.", + "enum": ["available", "unavailable"], + "type": "string" + } + }, + "required": ["status"], + "title": "PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceMulticapture", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_card_present_common_wallet": { + "description": "", + "properties": { + "type": { + "description": "The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.", + "enum": ["apple_pay", "google_pay", "samsung_pay", "unknown"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentFlowsPrivatePaymentMethodsCardPresentCommonWallet", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_kakao_pay_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_klarna_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of birth.", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_naver_pay_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_payco_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_samsung_pay_payment_method_options": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_us_bank_account_linked_account_options_filters": { + "description": "", + "properties": { + "account_subcategories": { + "description": "The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.", + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFilters", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent": { + "description": "A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "amount_capturable": { + "description": "Amount that can be captured from this PaymentIntent.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_amount_details" + }, + { + "$ref": "#/components/schemas/payment_flows_amount_details_client" + } + ] + }, + "amount_received": { + "description": "Amount that this PaymentIntent collects.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that created the PaymentIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee_amount": { + "description": "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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "nullable": true, + "type": "integer" + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" + } + ], + "description": "Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)", + "nullable": true + }, + "canceled_at": { + "description": "Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_reason": { + "description": "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`, or `automatic`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice" + ], + "nullable": true, + "type": "string" + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["automatic", "automatic_async", "manual"], + "type": "string" + }, + "client_secret": { + "description": "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe 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.\n\nRefer 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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "confirmation_method": { + "description": "Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.", + "enum": ["automatic", "manual"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf [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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice that created this PaymentIntent, if it exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "last_payment_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.", + "nullable": true + }, + "latest_charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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).", + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action" + } + ], + "description": "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.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_intent"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used in this PaymentIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_configuration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_config_biz_payment_method_configuration_details" + } + ], + "description": "Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent.", + "nullable": true + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options" + } + ], + "description": "Payment-method-specific configuration for this PaymentIntent.", + "nullable": true + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "processing": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_processing" + } + ], + "description": "If present, this property tells you about the processing state of the payment.", + "nullable": true + }, + "receipt_email": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + } + ], + "description": "ID of the review associated with this PaymentIntent, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["off_session", "on_session"], + "nullable": true, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for this PaymentIntent.", + "nullable": true + }, + "statement_descriptor": { + "description": "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).\n\nSetting 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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "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).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/transfer_data" + } + ], + "description": "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).", + "nullable": true + }, + "transfer_group": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "capture_method", + "confirmation_method", + "created", + "currency", + "id", + "livemode", + "object", + "payment_method_types", + "status" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "invoice", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_configuration_details", + "payment_method_options", + "processing", + "review", + "shipping", + "transfer_data" + ], + "x-resourceId": "payment_intent" + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/components/schemas/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": ["customer_notification"] + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_boleto" + }, + "card_await_notification": { + "$ref": "#/components/schemas/payment_intent_next_action_card_await_notification" + }, + "cashapp_handle_redirect_or_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code" + }, + "display_bank_transfer_instructions": { + "$ref": "#/components/schemas/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini" + }, + "multibanco_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_display_multibanco_details" + }, + "oxxo_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_pix_display_qr_code" + }, + "promptpay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" + }, + "swish_handle_redirect_or_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_swish_handle_redirect_or_display_qr_code" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "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.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" + } + }, + "required": ["type"], + "title": "PaymentIntentNextAction", + "type": "object", + "x-expandableFields": [ + "alipay_handle_redirect", + "boleto_display_details", + "card_await_notification", + "cashapp_handle_redirect_or_display_qr_code", + "display_bank_transfer_instructions", + "konbini_display_details", + "multibanco_display_details", + "oxxo_display_details", + "paynow_display_qr_code", + "pix_display_qr_code", + "promptpay_display_qr_code", + "redirect_to_url", + "swish_handle_redirect_or_display_qr_code", + "verify_with_microdeposits", + "wechat_pay_display_qr_code", + "wechat_pay_redirect_to_android_app", + "wechat_pay_redirect_to_ios_app" + ] + }, + "payment_intent_next_action_alipay_handle_redirect": { + "description": "", + "properties": { + "native_data": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "native_url": { + "description": "The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_boleto": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp after which the boleto expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "number": { + "description": "The boleto number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "pdf": { + "description": "The URL to the downloadable boleto voucher PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_card_await_notification": { + "description": "", + "properties": { + "charge_attempt_at": { + "description": "The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "customer_approval_required": { + "description": "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.", + "nullable": true, + "type": "boolean" + } + }, + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code": { + "description": "", + "properties": { + "hosted_instructions_url": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "mobile_auth_url": { + "description": "The url for mobile redirect based auth", + "maxLength": 5000, + "type": "string" + }, + "qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_cashapp_qr_code" + } + }, + "required": ["hosted_instructions_url", "mobile_auth_url", "qr_code"], + "title": "PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode", + "type": "object", + "x-expandableFields": ["qr_code"] + }, + "payment_intent_next_action_cashapp_qr_code": { + "description": "", + "properties": { + "expires_at": { + "description": "The date (unix timestamp) when the QR code expires.", + "format": "unix-time", + "type": "integer" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["expires_at", "image_url_png", "image_url_svg"], + "title": "PaymentIntentNextActionCashappQRCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_bank_transfer_instructions": { + "description": "", + "properties": { + "amount_remaining": { + "description": "The remaining amount that needs to be transferred to complete the payment.", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "nullable": true, + "type": "string" + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund the customer balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "hosted_instructions_url": { + "description": "A link to a hosted page that guides your customer through completing the transfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of bank transfer", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": ["financial_addresses"] + }, + "payment_intent_next_action_display_multibanco_details": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expires_at": { + "description": "The timestamp at which the Multibanco voucher expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionDisplayMultibancoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_oxxo_details": { + "description": "", + "properties": { + "expires_after": { + "description": "The timestamp after which the OXXO voucher expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "number": { + "description": "OXXO reference number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp at which the pending Konbini payment expires.", + "format": "unix-time", + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "stores": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_stores" + } + }, + "required": ["expires_at", "stores"], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": ["stores"] + }, + "payment_intent_next_action_konbini_familymart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_familymart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_lawson": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_lawson", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_ministop": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_ministop", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_seicomart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_seicomart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_familymart" + } + ], + "description": "FamilyMart instruction details.", + "nullable": true + }, + "lawson": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_lawson" + } + ], + "description": "Lawson instruction details.", + "nullable": true + }, + "ministop": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_ministop" + } + ], + "description": "Ministop instruction details.", + "nullable": true + }, + "seicomart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_seicomart" + } + ], + "description": "Seicomart instruction details.", + "nullable": true + } + }, + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": ["familymart", "lawson", "ministop", "seicomart"] + }, + "payment_intent_next_action_paynow_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "image_url_png", "image_url_svg"], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_pix_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "expires_at": { + "description": "The date (unix timestamp) when the PIX expires.", + "type": "integer" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted pix instructions page, which allows customers to view the pix QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render png QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render svg QR code", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentIntentNextActionPixDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_promptpay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The PNG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The SVG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPromptpayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_swish_handle_redirect_or_display_qr_code": { + "description": "", + "properties": { + "hosted_instructions_url": { + "description": "The URL to the hosted Swish instructions page, which allows customers to view the QR code.", + "maxLength": 5000, + "type": "string" + }, + "qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_swish_qr_code" + } + }, + "required": ["hosted_instructions_url", "qr_code"], + "title": "PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode", + "type": "object", + "x-expandableFields": ["qr_code"] + }, + "payment_intent_next_action_swish_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "image_url_png", "image_url_svg"], + "title": "PaymentIntentNextActionSwishQRCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": ["amounts", "descriptor_code"], + "nullable": true, + "type": "string" + } + }, + "required": ["arrival_date", "hosted_verification_url"], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The data being used to generate QR code", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_data_url": { + "description": "The base64 image data for a pre-generated QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionWechatPayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_android_app": { + "description": "", + "properties": { + "app_id": { + "description": "app_id is the APP ID registered on WeChat open platform", + "maxLength": 5000, + "type": "string" + }, + "nonce_str": { + "description": "nonce_str is a random string", + "maxLength": 5000, + "type": "string" + }, + "package": { + "description": "package is static value", + "maxLength": 5000, + "type": "string" + }, + "partner_id": { + "description": "an unique merchant ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "prepay_id": { + "description": "an unique trading ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "sign": { + "description": "A signature", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "Specifies the current time in epoch format", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToAndroidApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_ios_app": { + "description": "", + "properties": { + "native_url": { + "description": "An universal link that redirect to WeChat Pay app", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["native_url"], + "title": "PaymentIntentNextActionWechatPayRedirectToIOSApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "affirm": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_affirm" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alipay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_alipay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alma": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_alma" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "amazon_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_amazon_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_bacs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bancontact" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "boleto": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_boleto" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_card" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "cashapp": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_cashapp" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_customer_balance" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "eps": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "fpx": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_fpx" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "giropay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_giropay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_grabpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "ideal": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_ideal" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_interac_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "kakao_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_kakao_pay_payment_method_options" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "klarna": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_klarna" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_konbini" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "kr_card": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_kr_card" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "mobilepay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mobilepay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "multibanco": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_multibanco" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "naver_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_naver_pay_payment_method_options" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_oxxo" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "p24": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_p24" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pay_by_bank": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_pay_by_bank" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "payco": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_payco_payment_method_options" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paynow": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_paynow" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paypal": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_paypal" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pix": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_pix" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_promptpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "revolut_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_revolut_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "samsung_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_samsung_pay_payment_method_options" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sofort": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_sofort" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "swish": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_swish" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "twint": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_twint" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_wechat_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "zip": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_zip" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "payment_intent_payment_method_options_au_becs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_bacs_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_bacs_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "payment_intent_payment_method_options_blik": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_installments" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).", + "nullable": true + }, + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_mandate_options" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India.", + "nullable": true + }, + "network": { + "description": "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.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "request_extended_authorization": { + "description": "Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "description": "Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "description": "Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "description": "Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_three_d_secure": { + "description": "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.", + "enum": ["any", "automatic", "challenge"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "require_cvc_recollection": { + "description": "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).", + "type": "boolean" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": ["installments", "mandate_options"] + }, + "payment_intent_payment_method_options_eps": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_link": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic"], + "nullable": true, + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal"], + "nullable": true, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_bacs_debit": { + "description": "", + "properties": { + "reference_prefix": { + "description": "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'.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": { + "reference_prefix": { + "description": "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'.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mobilepay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mobilepay", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "payment_intent_payment_method_options_swish": { + "description": "", + "properties": { + "reference": { + "description": "A reference for this payment to be displayed in the Swish app.", + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_swish", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "mandate_options": { + "$ref": "#/components/schemas/payment_method_options_us_bank_account_mandate_options" + }, + "preferred_settlement_speed": { + "description": "Preferred transaction settlement speed", + "enum": ["fastest", "standard"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections", "mandate_options"] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_intent_card_processing" + }, + "type": { + "description": "Type of the payment method for which payment is in `processing` state, one of `card`.", + "enum": ["card"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentIntentProcessing", + "type": "object", + "x-expandableFields": ["card"] + }, + "payment_intent_processing_customer_notification": { + "description": "", + "properties": { + "approval_requested": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "completes_at": { + "description": "If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual", "manual_preferred"], + "type": "string" + }, + "installments": { + "$ref": "#/components/schemas/payment_flows_installment_options" + }, + "request_incremental_authorization_support": { + "description": "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.", + "type": "boolean" + }, + "require_cvc_recollection": { + "description": "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).", + "type": "boolean" + }, + "routing": { + "$ref": "#/components/schemas/payment_method_options_card_present_routing" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": ["installments", "routing"] + }, + "payment_link": { + "description": "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.\n\nWhen 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.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payment-links)", + "properties": { + "active": { + "description": "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.", + "type": "boolean" + }, + "after_completion": { + "$ref": "#/components/schemas/payment_links_resource_after_completion" + }, + "allow_promotion_codes": { + "description": "Whether user redeemable promotion codes are enabled.", + "type": "boolean" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "The ID of the Connect application that created the Payment Link.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "application_fee_percent": { + "description": "This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_links_resource_automatic_tax" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address. Defaults to `auto`.", + "enum": ["auto", "required"], + "type": "string" + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_consent_collection" + } + ], + "description": "When set, provides configuration to gather active consent from customers.", + "nullable": true + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 3 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_links_resource_custom_text" + }, + "customer_creation": { + "description": "Configuration for Customer creation during checkout.", + "enum": ["always", "if_required"], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "inactive_message": { + "description": "The custom message to be displayed to a customer when a payment link is no longer active.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_creation" + } + ], + "description": "Configuration for creating invoice for payment mode payment links.", + "nullable": true + }, + "line_items": { + "description": "The line items representing what is being sold.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_link"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_intent_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_payment_intent_data" + } + ], + "description": "Indicates the parameters to be passed to PaymentIntent creation during checkout.", + "nullable": true + }, + "payment_method_collection": { + "description": "Configuration for collecting a payment method during checkout. Defaults to `always`.", + "enum": ["always", "if_required"], + "type": "string" + }, + "payment_method_types": { + "description": "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).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" + }, + "restrictions": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_restrictions" + } + ], + "description": "Settings that restrict the usage of a payment link.", + "nullable": true + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" + } + ], + "description": "Configuration for collecting the customer's shipping address.", + "nullable": true + }, + "shipping_options": { + "description": "The shipping rate options applied to the session.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_shipping_option" + }, + "type": "array" + }, + "submit_type": { + "description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.", + "enum": ["auto", "book", "donate", "pay", "subscribe"], + "type": "string" + }, + "subscription_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_subscription_data" + } + ], + "description": "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`.", + "nullable": true + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_links_resource_tax_id_collection" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_transfer_data" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.", + "nullable": true + }, + "url": { + "description": "The public URL that can be shared with customers.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "active", + "after_completion", + "allow_promotion_codes", + "automatic_tax", + "billing_address_collection", + "currency", + "custom_fields", + "custom_text", + "customer_creation", + "id", + "livemode", + "metadata", + "object", + "payment_method_collection", + "phone_number_collection", + "shipping_options", + "submit_type", + "tax_id_collection", + "url" + ], + "title": "PaymentLink", + "type": "object", + "x-expandableFields": [ + "after_completion", + "application", + "automatic_tax", + "consent_collection", + "custom_fields", + "custom_text", + "invoice_creation", + "line_items", + "on_behalf_of", + "payment_intent_data", + "phone_number_collection", + "restrictions", + "shipping_address_collection", + "shipping_options", + "subscription_data", + "tax_id_collection", + "transfer_data" + ], + "x-resourceId": "payment_link" + }, + "payment_links_resource_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" + }, + "redirect": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" + }, + "type": { + "description": "The specified behavior after the purchase is complete.", + "enum": ["hosted_confirmation", "redirect"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentLinksResourceAfterCompletion", + "type": "object", + "x-expandableFields": ["hosted_confirmation", "redirect"] + }, + "payment_links_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, tax will be calculated automatically using the customer's location.", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourceAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "payment_links_resource_completed_sessions": { + "description": "", + "properties": { + "count": { + "description": "The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met.", + "type": "integer" + }, + "limit": { + "description": "The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.", + "type": "integer" + } + }, + "required": ["count", "limit"], + "title": "PaymentLinksResourceCompletedSessions", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_confirmation_page": { + "description": "", + "properties": { + "custom_message": { + "description": "The custom message that is displayed to the customer after the purchase is complete.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentLinksResourceCompletionBehaviorConfirmationPage", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_redirect": { + "description": "", + "properties": { + "url": { + "description": "The URL the customer will be redirected to after the purchase is complete.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["url"], + "title": "PaymentLinksResourceCompletionBehaviorRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_consent_collection": { + "description": "", + "properties": { + "payment_method_reuse_agreement": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_payment_method_reuse_agreement" + } + ], + "description": "Settings related to the payment method reuse text shown in the Checkout UI.", + "nullable": true + }, + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications.", + "enum": ["auto", "none"], + "nullable": true, + "type": "string" + }, + "terms_of_service": { + "description": "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.", + "enum": ["none", "required"], + "nullable": true, + "type": "string" + } + }, + "title": "PaymentLinksResourceConsentCollection", + "type": "object", + "x-expandableFields": ["payment_method_reuse_agreement"] + }, + "payment_links_resource_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" + }, + "key": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_label" + }, + "numeric": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_numeric" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_text" + }, + "type": { + "description": "The type of the field.", + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "optional", "type"], + "title": "PaymentLinksResourceCustomFields", + "type": "object", + "x-expandableFields": ["dropdown", "label", "numeric", "text"] + }, + "payment_links_resource_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown_option" + }, + "type": "array" + } + }, + "required": ["options"], + "title": "PaymentLinksResourceCustomFieldsDropdown", + "type": "object", + "x-expandableFields": ["options"] + }, + "payment_links_resource_custom_fields_dropdown_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "PaymentLinksResourceCustomFieldsDropdownOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of the label.", + "enum": ["custom"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentLinksResourceCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_numeric": { + "description": "", + "properties": { + "maximum_length": { + "description": "The maximum character length constraint for the customer's input.", + "nullable": true, + "type": "integer" + }, + "minimum_length": { + "description": "The minimum character length requirement for the customer's input.", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentLinksResourceCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_text": { + "description": "", + "properties": { + "maximum_length": { + "description": "The maximum character length constraint for the customer's input.", + "nullable": true, + "type": "integer" + }, + "minimum_length": { + "description": "The minimum character length requirement for the customer's input.", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentLinksResourceCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_text": { + "description": "", + "properties": { + "after_submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + } + ], + "description": "Custom text that should be displayed after the payment confirmation button.", + "nullable": true + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection.", + "nullable": true + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button.", + "nullable": true + }, + "terms_of_service_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + } + ], + "description": "Custom text that should be displayed in place of the default terms of service agreement text.", + "nullable": true + } + }, + "title": "PaymentLinksResourceCustomText", + "type": "object", + "x-expandableFields": [ + "after_submit", + "shipping_address", + "submit", + "terms_of_service_acceptance" + ] + }, + "payment_links_resource_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1200 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": ["message"], + "title": "PaymentLinksResourceCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Enable creating an invoice on successful payment.", + "type": "boolean" + }, + "invoice_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_settings" + } + ], + "description": "Configuration for the invoice. Default invoice values will be used if unspecified.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourceInvoiceCreation", + "type": "object", + "x-expandableFields": ["invoice_data"] + }, + "payment_links_resource_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "custom_fields": { + "description": "A list of up to 4 custom fields to be displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "nullable": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_checkout_rendering_options" + } + ], + "description": "Options for invoice PDF rendering.", + "nullable": true + } + }, + "title": "PaymentLinksResourceInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "issuer", + "rendering_options" + ] + }, + "payment_links_resource_payment_intent_data": { + "description": "", + "properties": { + "capture_method": { + "description": "Indicates when the funds will be captured from the customer's account.", + "enum": ["automatic", "automatic_async", "manual"], + "nullable": true, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with the payment method collected during checkout.", + "enum": ["off_session", "on_session"], + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "description": "For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transfer_group": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["metadata"], + "title": "PaymentLinksResourcePaymentIntentData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_payment_method_reuse_agreement": { + "description": "", + "properties": { + "position": { + "description": "Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.\n\nWhen set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.", + "enum": ["auto", "hidden"], + "type": "string" + } + }, + "required": ["position"], + "title": "PaymentLinksResourcePaymentMethodReuseAgreement", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a phone number will be collected during checkout.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourcePhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_restrictions": { + "description": "", + "properties": { + "completed_sessions": { + "$ref": "#/components/schemas/payment_links_resource_completed_sessions" + } + }, + "required": ["completed_sessions"], + "title": "PaymentLinksResourceRestrictions", + "type": "object", + "x-expandableFields": ["completed_sessions"] + }, + "payment_links_resource_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "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`.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "PaymentLinksResourceShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the Shipping Rate to use for this shipping option.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": ["shipping_amount", "shipping_rate"], + "title": "PaymentLinksResourceShippingOption", + "type": "object", + "x-expandableFields": ["shipping_rate"] + }, + "payment_links_resource_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_settings": { + "$ref": "#/components/schemas/payment_links_resource_subscription_data_invoice_settings" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "nullable": true, + "type": "integer" + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings" + } + ], + "description": "Settings related to subscription trials.", + "nullable": true + } + }, + "required": ["invoice_settings", "metadata"], + "title": "PaymentLinksResourceSubscriptionData", + "type": "object", + "x-expandableFields": ["invoice_settings", "trial_settings"] + }, + "payment_links_resource_subscription_data_invoice_settings": { + "description": "", + "properties": { + "issuer": { + "$ref": "#/components/schemas/connect_account_reference" + } + }, + "required": ["issuer"], + "title": "PaymentLinksResourceSubscriptionDataInvoiceSettings", + "type": "object", + "x-expandableFields": ["issuer"] + }, + "payment_links_resource_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session.", + "type": "boolean" + }, + "required": { + "enum": ["if_supported", "never"], + "type": "string" + } + }, + "required": ["enabled", "required"], + "title": "PaymentLinksResourceTaxIdCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The connected account receiving the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "PaymentLinksResourceTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + }, + "allow_redisplay": { + "description": "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”.", + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "$ref": "#/components/schemas/payment_method_alma" + }, + "amazon_pay": { + "$ref": "#/components/schemas/payment_method_amazon_pay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_card_present" + }, + "cashapp": { + "$ref": "#/components/schemas/payment_method_cashapp" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_grabpay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_interac_present" + }, + "kakao_pay": { + "$ref": "#/components/schemas/payment_method_kakao_pay" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_konbini" + }, + "kr_card": { + "$ref": "#/components/schemas/payment_method_kr_card" + }, + "link": { + "$ref": "#/components/schemas/payment_method_link" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "mobilepay": { + "$ref": "#/components/schemas/payment_method_mobilepay" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_multibanco" + }, + "naver_pay": { + "$ref": "#/components/schemas/payment_method_naver_pay" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_method"], + "type": "string" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_p24" + }, + "pay_by_bank": { + "$ref": "#/components/schemas/payment_method_pay_by_bank" + }, + "payco": { + "$ref": "#/components/schemas/payment_method_payco" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_paynow" + }, + "paypal": { + "$ref": "#/components/schemas/payment_method_paypal" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_promptpay" + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "revolut_pay": { + "$ref": "#/components/schemas/payment_method_revolut_pay" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_samsung_pay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_sofort" + }, + "swish": { + "$ref": "#/components/schemas/payment_method_swish" + }, + "twint": { + "$ref": "#/components/schemas/payment_method_twint" + }, + "type": { + "description": "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.", + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_wechat_pay" + }, + "zip": { + "$ref": "#/components/schemas/payment_method_zip" + } + }, + "required": [ + "billing_details", + "created", + "id", + "livemode", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "radar_options", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "x-resourceId": "payment_method" + }, + "payment_method_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "institution_number": { + "description": "Institution number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_afterpay_clearpay": { + "description": "", + "properties": {}, + "title": "payment_method_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_alma": { + "description": "", + "properties": {}, + "title": "payment_method_alma", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_amazon_pay": { + "description": "", + "properties": {}, + "title": "payment_method_amazon_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Six-digit number identifying bank and branch associated with this bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_blik": { + "description": "", + "properties": {}, + "title": "payment_method_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "Uniquely identifies the customer tax id (CNPJ or CPF)", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "payment_method_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_checks" + } + ], + "description": "Checks on Card address and CVC if provided.", + "nullable": true + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "display_brand": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_generated_card" + } + ], + "description": "Details of the original PaymentMethod that created this object.", + "nullable": true + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/networks" + } + ], + "description": "Contains information about card networks that can be used to process the payment.", + "nullable": true + }, + "regulated_status": { + "description": "Status of a card based on the card issuer.", + "enum": ["regulated", "unregulated"], + "nullable": true, + "type": "string" + }, + "three_d_secure_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_usage" + } + ], + "description": "Contains details on how this Card may be used for 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_wallet" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet.", + "nullable": true + } + }, + "required": ["brand", "exp_month", "exp_year", "funding", "last4"], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ] + }, + "payment_method_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_generated_card": { + "description": "", + "properties": { + "charge": { + "description": "The charge that created this object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/card_generated_from_payment_method_details" + } + ], + "description": "Transaction-specific details of the payment method used in the payment.", + "nullable": true + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": ["payment_method_details", "setup_attempt"] + }, + "payment_method_card_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "brand_product": { + "description": "The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_present_networks" + } + ], + "description": "Contains information about card networks that can be used to process the payment.", + "nullable": true + }, + "offline": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_offline" + } + ], + "description": "Details about payment methods collected offline.", + "nullable": true + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "read_method": { + "description": "How card details were read in this transaction.", + "enum": [ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2" + ], + "nullable": true, + "type": "string" + }, + "wallet": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_card_present_common_wallet" + } + }, + "required": ["exp_month", "exp_year"], + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": ["networks", "offline", "wallet"] + }, + "payment_method_card_present_networks": { + "description": "", + "properties": { + "available": { + "description": "All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "The preferred network for the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["available"], + "title": "payment_method_card_present_networks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" + }, + "link": { + "$ref": "#/components/schemas/payment_method_card_wallet_link" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" + }, + "type": { + "description": "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.", + "enum": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" + } + }, + "required": ["type"], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_link": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + }, + "email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + } + }, + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + }, + "email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + } + }, + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_cashapp": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique and immutable identifier assigned by Cash App to every buyer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cashtag": { + "description": "A public identifier for buyers using Cash App.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_cashapp", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_config_biz_payment_method_configuration_details": { + "description": "", + "properties": { + "id": { + "description": "ID of the payment method configuration used.", + "maxLength": 5000, + "type": "string" + }, + "parent": { + "description": "ID of the parent payment method configuration used.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["id"], + "title": "PaymentMethodConfigBizPaymentMethodConfigurationDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_config_resource_display_preference": { + "description": "", + "properties": { + "overridable": { + "description": "For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.", + "nullable": true, + "type": "boolean" + }, + "preference": { + "description": "The account's display preference.", + "enum": ["none", "off", "on"], + "type": "string" + }, + "value": { + "description": "The effective display preference value.", + "enum": ["off", "on"], + "type": "string" + } + }, + "required": ["preference", "value"], + "title": "PaymentMethodConfigResourceDisplayPreference", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_config_resource_payment_method_properties": { + "description": "", + "properties": { + "available": { + "description": "Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.", + "type": "boolean" + }, + "display_preference": { + "$ref": "#/components/schemas/payment_method_config_resource_display_preference" + } + }, + "required": ["available", "display_preference"], + "title": "PaymentMethodConfigResourcePaymentMethodProperties", + "type": "object", + "x-expandableFields": ["display_preference"] + }, + "payment_method_configuration": { + "description": "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.\n\nThere are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges):\n\n**Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect.\n\n**Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter.\n\nChild 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.\n\nRelated guides:\n- [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations)\n- [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)\n- [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations)", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "active": { + "description": "Whether the configuration can be used for new payments.", + "type": "boolean" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "alipay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "alma": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "amazon_pay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "application": { + "description": "For child configs, the Connect application associated with the configuration.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "card": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "cartes_bancaires": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "cashapp": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "is_default": { + "description": "The default configuration is used whenever a payment method configuration is not specified.", + "type": "boolean" + }, + "jcb": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "link": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mobilepay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "name": { + "description": "The configuration's name.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_method_configuration"], + "type": "string" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "parent": { + "description": "For child configs, the configuration's parent configuration.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "pay_by_bank": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "paypal": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "revolut_pay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "swish": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "twint": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + }, + "zip": { + "$ref": "#/components/schemas/payment_method_config_resource_payment_method_properties" + } + }, + "required": [ + "active", + "id", + "is_default", + "livemode", + "name", + "object" + ], + "title": "PaymentMethodConfigResourcePaymentMethodConfiguration", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cartes_bancaires", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "google_pay", + "grabpay", + "ideal", + "jcb", + "klarna", + "konbini", + "link", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "x-resourceId": "payment_method_configuration" + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/payment_method_details_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/payment_method_details_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_details_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + }, + "alma": { + "$ref": "#/components/schemas/payment_method_details_alma" + }, + "amazon_pay": { + "$ref": "#/components/schemas/payment_method_details_amazon_pay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "cashapp": { + "$ref": "#/components/schemas/payment_method_details_cashapp" + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_details_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_details_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_details_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_details_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_details_grabpay" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_details_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_details_interac_present" + }, + "kakao_pay": { + "$ref": "#/components/schemas/payment_method_details_kakao_pay" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_details_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_details_konbini" + }, + "kr_card": { + "$ref": "#/components/schemas/payment_method_details_kr_card" + }, + "link": { + "$ref": "#/components/schemas/payment_method_details_link" + }, + "mobilepay": { + "$ref": "#/components/schemas/payment_method_details_mobilepay" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_details_multibanco" + }, + "naver_pay": { + "$ref": "#/components/schemas/payment_method_details_naver_pay" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_details_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_details_p24" + }, + "pay_by_bank": { + "$ref": "#/components/schemas/payment_method_details_pay_by_bank" + }, + "payco": { + "$ref": "#/components/schemas/payment_method_details_payco" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_details_paynow" + }, + "paypal": { + "$ref": "#/components/schemas/payment_method_details_paypal" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_details_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_details_promptpay" + }, + "revolut_pay": { + "$ref": "#/components/schemas/payment_method_details_revolut_pay" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_details_samsung_pay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_details_sofort" + }, + "stripe_account": { + "$ref": "#/components/schemas/payment_method_details_stripe_account" + }, + "swish": { + "$ref": "#/components/schemas/payment_method_details_swish" + }, + "twint": { + "$ref": "#/components/schemas/payment_method_details_twint" + }, + "type": { + "description": "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.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_details_us_bank_account" + }, + "wechat": { + "$ref": "#/components/schemas/payment_method_details_wechat" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_details_wechat_pay" + }, + "zip": { + "$ref": "#/components/schemas/payment_method_details_zip" + } + }, + "required": ["type"], + "title": "payment_method_details", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "stripe_account", + "swish", + "twint", + "us_bank_account", + "wechat", + "wechat_pay", + "zip" + ] + }, + "payment_method_details_ach_credit_transfer": { + "description": "", + "properties": { + "account_number": { + "description": "Account number to transfer funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the routing number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "Routing transit number for the bank account to transfer funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "swift_code": { + "description": "SWIFT code of the bank associated with the routing number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_debit": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "Routing transit number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "institution_number": { + "description": "Institution number of the bank account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_affirm": { + "description": "", + "properties": { + "transaction_id": { + "description": "The Affirm transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_afterpay_clearpay": { + "description": "", + "properties": { + "order_id": { + "description": "The Afterpay order ID associated with this payment intent.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "Order identifier shown to the merchant in Afterpay’s online portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_alma": { + "description": "", + "properties": {}, + "title": "payment_method_details_alma", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_amazon_pay": { + "description": "", + "properties": { + "funding": { + "$ref": "#/components/schemas/amazon_pay_underlying_payment_method_funding_details" + } + }, + "title": "payment_method_details_amazon_pay", + "type": "object", + "x-expandableFields": ["funding"] + }, + "payment_method_details_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`", + "enum": ["de", "en", "fr", "nl"], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Bancontact directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_blik": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique and immutable identifier assigned by BLIK to every buyer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount.", + "nullable": true, + "type": "integer" + }, + "authorization_code": { + "description": "Authorization code on the charge.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "capture_before": { + "description": "When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.", + "format": "unix-time", + "type": "integer" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_checks" + } + ], + "description": "Check results by Card networks on Card address and CVC at time of payment.", + "nullable": true + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "extended_authorization": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "incremental_authorization": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).", + "nullable": true + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment or created by it.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "multicapture": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_multicapture" + }, + "network": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_token": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_network_token" + } + ], + "description": "If this card has network token credentials, this contains the details of the network token credentials.", + "nullable": true + }, + "network_transaction_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "overcapture": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture" + }, + "regulated_status": { + "description": "Status of a card based on the card issuer.", + "enum": ["regulated", "unregulated"], + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details_charge" + } + ], + "description": "Populated if this transaction used 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_wallet" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet.", + "nullable": true + } + }, + "required": ["exp_month", "exp_year"], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "extended_authorization", + "incremental_authorization", + "installments", + "multicapture", + "network_token", + "overcapture", + "three_d_secure", + "wallet" + ] + }, + "payment_method_details_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + ], + "description": "Installment plan selected for the payment.", + "nullable": true + } + }, + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": ["plan"] + }, + "payment_method_details_card_installments_plan": { + "description": "", + "properties": { + "count": { + "description": "For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.", + "nullable": true, + "type": "integer" + }, + "interval": { + "description": "For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.\nOne of `month`.", + "enum": ["month"], + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`.", + "enum": ["fixed_count"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_network_token": { + "description": "", + "properties": { + "used": { + "description": "Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.", + "type": "boolean" + } + }, + "required": ["used"], + "title": "payment_method_details_card_network_token", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "nullable": true, + "type": "integer" + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "brand_product": { + "description": "The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "capture_before": { + "description": "When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.", + "format": "unix-time", + "type": "integer" + }, + "cardholder_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_card": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "incremental_authorization_supported": { + "description": "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).", + "type": "boolean" + }, + "issuer": { + "description": "The name of the card's issuing bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_transaction_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "offline": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_offline" + } + ], + "description": "Details about payments collected offline.", + "nullable": true + }, + "overcapture_supported": { + "description": "Defines whether the authorized amount can be over-captured or not", + "type": "boolean" + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "read_method": { + "description": "How card details were read in this transaction.", + "enum": [ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2" + ], + "nullable": true, + "type": "string" + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_receipt" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions.", + "nullable": true + }, + "wallet": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_card_present_common_wallet" + } + }, + "required": [ + "exp_month", + "exp_year", + "incremental_authorization_supported", + "overcapture_supported" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": ["offline", "receipt", "wallet"] + }, + "payment_method_details_card_present_offline": { + "description": "", + "properties": { + "stored_at": { + "description": "Time at which the payment was collected while offline", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "type": { + "description": "The method used to process this payment method offline. Only deferred is allowed.", + "enum": ["deferred"], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_card_present_offline", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": ["checking", "credit", "prepaid", "unknown"], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_verification_method": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + }, + "link": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_link" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + }, + "type": { + "description": "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.", + "enum": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" + } + }, + "required": ["type"], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_details_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_link": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + }, + "email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + } + }, + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_details_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + }, + "email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + } + }, + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_details_cashapp": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique and immutable identifier assigned by Cash App to every buyer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cashtag": { + "description": "A public identifier for buyers using Cash App.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_cashapp", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_details_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_eps": { + "description": "", + "properties": { + "bank": { + "description": "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`.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by EPS directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nEPS rarely provides this information so the attribute is usually empty.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "bank": { + "description": "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`.", + "enum": [ + "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" + ], + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction id generated by FPX for every request from the merchant", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bank"], + "title": "payment_method_details_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_giropay": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Giropay directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nGiropay rarely provides this information so the attribute is usually empty.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "nullable": true, + "type": "string" + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by iDEAL directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_card": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_transaction_id": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "read_method": { + "description": "How card details were read in this transaction.", + "enum": [ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2" + ], + "nullable": true, + "type": "string" + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions.", + "nullable": true + } + }, + "required": ["exp_month", "exp_year"], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": ["receipt"] + }, + "payment_method_details_interac_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": ["checking", "savings", "unknown"], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_verification_method": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_kakao_pay": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique identifier for the buyer as determined by the local payment processor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_kakao_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "payer_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/klarna_payer_details" + } + ], + "description": "The payer details for this transaction.", + "nullable": true + }, + "payment_method_category": { + "description": "The Klarna payment method used for this transaction.\nCan be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_locale": { + "description": "Preferred language of the Klarna authorization page that the customer is redirected to.\nCan 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`", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": ["payer_details"] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_konbini_store" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed.", + "nullable": true + } + }, + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": ["store"] + }, + "payment_method_details_konbini_store": { + "description": "", + "properties": { + "chain": { + "description": "The name of the convenience store chain where the payment was completed.", + "enum": ["familymart", "lawson", "ministop", "seicomart"], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_kr_card": { + "description": "", + "properties": { + "brand": { + "description": "The local credit or debit card brand.", + "enum": [ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori" + ], + "nullable": true, + "type": "string" + }, + "buyer_id": { + "description": "A unique identifier for the buyer as determined by the local payment processor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card. This may not be present for American Express cards.", + "maxLength": 4, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_kr_card", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_link": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the funding source country beneath the Link payment.\nYou could use this attribute to get a sense of international fees.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_mobilepay": { + "description": "", + "properties": { + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/internal_card" + } + ], + "description": "Internal card details", + "nullable": true + } + }, + "title": "payment_method_details_mobilepay", + "type": "object", + "x-expandableFields": ["card"] + }, + "payment_method_details_multibanco": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_naver_pay": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique identifier for the buyer as determined by the local payment processor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_naver_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_p24": { + "description": "", + "properties": { + "bank": { + "description": "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`.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string" + }, + "reference": { + "description": "Unique reference for this Przelewy24 payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Przelewy24 directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nPrzelewy24 rarely provides this information so the attribute is usually empty.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_passthrough_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "nullable": true, + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "nullable": true, + "type": "integer" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_passthrough_card", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_pay_by_bank": { + "description": "", + "properties": {}, + "title": "payment_method_details_pay_by_bank", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_payco": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique identifier for the buyer as determined by the local payment processor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_payco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paypal": { + "description": "", + "properties": { + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payer_email": { + "description": "Owner's email. Values are provided by PayPal directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payer_id": { + "description": "PayPal account PayerID. This identifier uniquely identifies the PayPal customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payer_name": { + "description": "Owner's full name. Values provided by PayPal directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "seller_protection": { + "anyOf": [ + { + "$ref": "#/components/schemas/paypal_seller_protection" + } + ], + "description": "The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.", + "nullable": true + }, + "transaction_id": { + "description": "A unique ID generated by PayPal for this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_paypal", + "type": "object", + "x-expandableFields": ["seller_protection"] + }, + "payment_method_details_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_revolut_pay": { + "description": "", + "properties": { + "funding": { + "$ref": "#/components/schemas/revolut_pay_underlying_payment_method_funding_details" + } + }, + "title": "payment_method_details_revolut_pay", + "type": "object", + "x-expandableFields": ["funding"] + }, + "payment_method_details_samsung_pay": { + "description": "", + "properties": { + "buyer_id": { + "description": "A unique identifier for the buyer as determined by the local payment processor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the SOFORT authorization page that the customer is redirected to.\nCan be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`", + "enum": ["de", "en", "es", "fr", "it", "nl", "pl"], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by SOFORT directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_stripe_account": { + "description": "", + "properties": {}, + "title": "payment_method_details_stripe_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_swish": { + "description": "", + "properties": { + "fingerprint": { + "description": "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", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_reference": { + "description": "Payer bank reference number for the payment", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_phone_last4": { + "description": "The last four digits of the Swish account phone number", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_swish", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_twint": { + "description": "", + "properties": {}, + "title": "payment_method_details_twint", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings"], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the mandate used to make this payment.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "payment_reference": { + "description": "Reference number to locate ACH payments with customer's bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": ["mandate"] + }, + "payment_method_details_wechat": { + "description": "", + "properties": {}, + "title": "payment_method_details_wechat", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_wechat_pay": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_zip": { + "description": "", + "properties": {}, + "title": "payment_method_details_zip", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_domain": { + "description": "A payment method domain represents a web domain that you have registered with Stripe.\nStripe Elements use registered payment method domains to control where certain payment methods are shown.\n\nRelated guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).", + "properties": { + "amazon_pay": { + "$ref": "#/components/schemas/payment_method_domain_resource_payment_method_status" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_domain_resource_payment_method_status" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "domain_name": { + "description": "The domain name that this payment method domain object represents.", + "maxLength": 5000, + "type": "string" + }, + "enabled": { + "description": "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.", + "type": "boolean" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_domain_resource_payment_method_status" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "link": { + "$ref": "#/components/schemas/payment_method_domain_resource_payment_method_status" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_method_domain"], + "type": "string" + }, + "paypal": { + "$ref": "#/components/schemas/payment_method_domain_resource_payment_method_status" + } + }, + "required": [ + "amazon_pay", + "apple_pay", + "created", + "domain_name", + "enabled", + "google_pay", + "id", + "link", + "livemode", + "object", + "paypal" + ], + "title": "PaymentMethodDomainResourcePaymentMethodDomain", + "type": "object", + "x-expandableFields": [ + "amazon_pay", + "apple_pay", + "google_pay", + "link", + "paypal" + ], + "x-resourceId": "payment_method_domain" + }, + "payment_method_domain_resource_payment_method_status": { + "description": "Indicates the status of a specific payment method on a payment method domain.", + "properties": { + "status": { + "description": "The status of the payment method on the domain.", + "enum": ["active", "inactive"], + "type": "string" + }, + "status_details": { + "$ref": "#/components/schemas/payment_method_domain_resource_payment_method_status_details" + } + }, + "required": ["status"], + "title": "PaymentMethodDomainResourcePaymentMethodStatus", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "payment_method_domain_resource_payment_method_status_details": { + "description": "Contains additional details about the status of a payment method for a specific payment method domain.", + "properties": { + "error_message": { + "description": "The error message associated with the status of the payment method on the domain.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["error_message"], + "title": "PaymentMethodDomainResourcePaymentMethodStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_eps": { + "description": "", + "properties": { + "bank": { + "description": "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`.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "bank": { + "description": "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`.", + "enum": [ + "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" + ], + "type": "string" + } + }, + "required": ["bank"], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_giropay": { + "description": "", + "properties": {}, + "title": "payment_method_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_grabpay": { + "description": "", + "properties": {}, + "title": "payment_method_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "nullable": true, + "type": "string" + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank, if the bank was provided.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_present_networks" + } + ], + "description": "Contains information about card networks that can be used to process the payment.", + "nullable": true + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "read_method": { + "description": "How card details were read in this transaction.", + "enum": [ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["exp_month", "exp_year"], + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": ["networks"] + }, + "payment_method_kakao_pay": { + "description": "", + "properties": {}, + "title": "payment_method_kakao_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" + } + ], + "description": "The customer's date of birth, if provided.", + "nullable": true + } + }, + "title": "payment_method_klarna", + "type": "object", + "x-expandableFields": ["dob"] + }, + "payment_method_konbini": { + "description": "", + "properties": {}, + "title": "payment_method_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_kr_card": { + "description": "", + "properties": { + "brand": { + "description": "The local credit or debit card brand.", + "enum": [ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori" + ], + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card. This may not be present for American Express cards.", + "maxLength": 4, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_kr_card", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_mobilepay": { + "description": "", + "properties": {}, + "title": "payment_method_mobilepay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_multibanco": { + "description": "", + "properties": {}, + "title": "payment_method_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_naver_pay": { + "description": "", + "properties": { + "funding": { + "description": "Whether to fund this transaction with Naver Pay points or a card.", + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["funding"], + "title": "payment_method_naver_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_affirm": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred language of the Affirm authorization page that the customer is redirected to.", + "maxLength": 30, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_afterpay_clearpay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "reference": { + "description": "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.\nThis field differs from the statement descriptor and item name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alipay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_alipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alma": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + } + }, + "title": "payment_method_options_alma", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_amazon_pay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_amazon_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": ["de", "en", "fr", "nl"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "required": ["preferred_language"], + "title": "payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_boleto": { + "description": "", + "properties": { + "expires_after_days": { + "description": "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.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "payment_method_options_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + "nullable": true, + "type": "array" + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + ], + "description": "Installment plan selected for this PaymentIntent.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": ["available_plans", "plan"] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "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.", + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "interval": { + "description": "Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.", + "enum": ["day", "month", "sporadic", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "reference": { + "description": "Unique identifier for the mandate or subscription.", + "maxLength": 80, + "type": "string" + }, + "start_date": { + "description": "Start date of the mandate or subscription. Start date should not be lesser than yesterday.", + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "description": "Specifies the type of mandates supported. Possible values are `india`.", + "items": { + "enum": ["india"], + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)", + "nullable": true, + "type": "boolean" + }, + "request_incremental_authorization_support": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "routing": { + "$ref": "#/components/schemas/payment_method_options_card_present_routing" + } + }, + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": ["routing"] + }, + "payment_method_options_card_present_routing": { + "description": "", + "properties": { + "requested_priority": { + "description": "Requested routing priority", + "enum": ["domestic", "international"], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_options_card_present_routing", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_cashapp": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_method_options_cashapp", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": ["bank_transfer"], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "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`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": ["BE", "DE", "ES", "FR", "IE", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "payment_method_options_customer_balance_eu_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_fpx": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_giropay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_grabpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_ideal": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_options_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_klarna": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the Klarna checkout page that the customer is redirected to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_konbini": { + "description": "", + "properties": { + "confirmation_number": { + "description": "An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expires_after_days": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "product_description": { + "description": "A product descriptor of up to 22 characters, which will appear to customers at the convenience store.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_kr_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_kr_card", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_multibanco": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_oxxo": { + "description": "", + "properties": { + "expires_after_days": { + "description": "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.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "payment_method_options_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_p24": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pay_by_bank": { + "description": "", + "properties": {}, + "title": "payment_method_options_pay_by_bank", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_paynow": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_paypal": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the PayPal checkout page that the customer is redirected to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_paypal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire.", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which the Pix expires.", + "nullable": true, + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_promptpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_revolut_pay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_revolut_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_sofort": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the SOFORT authorization page that the customer is redirected to.", + "enum": ["de", "en", "es", "fr", "it", "nl", "pl"], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_twint": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_twint", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_us_bank_account_mandate_options": { + "description": "", + "properties": { + "collection_method": { + "description": "Mandate collection method", + "enum": ["paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_us_bank_account_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_wechat_pay": { + "description": "", + "properties": { + "app_id": { + "description": "The app ID registered with WeChat Pay. Only required when client is ios or android.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "client": { + "description": "The client type that the end customer will pay from", + "enum": ["android", "ios", "web"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_zip": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_zip", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_oxxo": { + "description": "", + "properties": {}, + "title": "payment_method_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided.", + "enum": [ + "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" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pay_by_bank": { + "description": "", + "properties": {}, + "title": "payment_method_pay_by_bank", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_payco": { + "description": "", + "properties": {}, + "title": "payment_method_payco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paynow": { + "description": "", + "properties": {}, + "title": "payment_method_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paypal": { + "description": "", + "properties": { + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payer_email": { + "description": "Owner's email. Values are provided by PayPal directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payer_id": { + "description": "PayPal account PayerID. This identifier uniquely identifies the PayPal customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_paypal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pix": { + "description": "", + "properties": {}, + "title": "payment_method_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_promptpay": { + "description": "", + "properties": {}, + "title": "payment_method_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_revolut_pay": { + "description": "", + "properties": {}, + "title": "payment_method_revolut_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/sepa_debit_generated_from" + } + ], + "description": "Information about the object that generated this PaymentMethod.", + "nullable": true + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": ["generated_from"] + }, + "payment_method_sofort": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_swish": { + "description": "", + "properties": {}, + "title": "payment_method_swish", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_twint": { + "description": "", + "properties": {}, + "title": "payment_method_twint", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings"], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "financial_connections_account": { + "description": "The ID of the Financial Connections Account used to create the payment method.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/us_bank_account_networks" + } + ], + "description": "Contains information about US bank account networks that can be used.", + "nullable": true + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_us_bank_account_status_details" + } + ], + "description": "Contains information about the future reusability of this PaymentMethod.", + "nullable": true + } + }, + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": ["networks", "status_details"] + }, + "payment_method_us_bank_account_blocked": { + "description": "", + "properties": { + "network_code": { + "description": "The ACH network code that resulted in this block.", + "enum": [ + "R02", + "R03", + "R04", + "R05", + "R07", + "R08", + "R10", + "R11", + "R16", + "R20", + "R29", + "R31" + ], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "The reason why this PaymentMethod's fingerprint has been blocked", + "enum": [ + "bank_account_closed", + "bank_account_frozen", + "bank_account_invalid_details", + "bank_account_restricted", + "bank_account_unusable", + "debit_not_authorized" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_us_bank_account_blocked", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account_status_details": { + "description": "", + "properties": { + "blocked": { + "$ref": "#/components/schemas/payment_method_us_bank_account_blocked" + } + }, + "title": "payment_method_us_bank_account_status_details", + "type": "object", + "x-expandableFields": ["blocked"] + }, + "payment_method_wechat_pay": { + "description": "", + "properties": {}, + "title": "payment_method_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_zip": { + "description": "", + "properties": {}, + "title": "payment_method_zip", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_adaptive_pricing": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Adaptive Pricing is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentPagesCheckoutSessionAdaptivePricing", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_after_expiration": { + "description": "", + "properties": { + "recovery": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" + } + ], + "description": "When set, configuration used to recover the Checkout Session on expiry.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionAfterExpiration", + "type": "object", + "x-expandableFields": ["recovery"] + }, + "payment_pages_checkout_session_after_expiration_recovery": { + "description": "", + "properties": { + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`", + "type": "boolean" + }, + "enabled": { + "description": "If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.", + "type": "boolean" + }, + "expires_at": { + "description": "The timestamp at which the recovery URL will expire.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "url": { + "description": "URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["allow_promotion_codes", "enabled"], + "title": "PaymentPagesCheckoutSessionAfterExpirationRecovery", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether automatic tax is enabled for the session", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + }, + "status": { + "description": "The status of the most recent automated tax calculation for this session.", + "enum": ["complete", "failed", "requires_location_inputs"], + "nullable": true, + "type": "string" + } + }, + "required": ["enabled"], + "title": "PaymentPagesCheckoutSessionAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "payment_pages_checkout_session_collected_information": { + "description": "", + "properties": { + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for this Checkout Session.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionCollectedInformation", + "type": "object", + "x-expandableFields": ["shipping_details"] + }, + "payment_pages_checkout_session_consent": { + "description": "", + "properties": { + "promotions": { + "description": "If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.", + "enum": ["opt_in", "opt_out"], + "nullable": true, + "type": "string" + }, + "terms_of_service": { + "description": "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.", + "enum": ["accepted"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentPagesCheckoutSessionConsent", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent_collection": { + "description": "", + "properties": { + "payment_method_reuse_agreement": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_payment_method_reuse_agreement" + } + ], + "description": "If set to `hidden`, it will hide legal text related to the reuse of a payment method.", + "nullable": true + }, + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants.", + "enum": ["auto", "none"], + "nullable": true, + "type": "string" + }, + "terms_of_service": { + "description": "If set to `required`, it requires customers to accept the terms of service before being able to pay.", + "enum": ["none", "required"], + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionConsentCollection", + "type": "object", + "x-expandableFields": ["payment_method_reuse_agreement"] + }, + "payment_pages_checkout_session_currency_conversion": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total of all items in source currency before discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total of all items in source currency after discounts and taxes are applied.", + "type": "integer" + }, + "fx_rate": { + "description": "Exchange rate used to convert source currency amounts to customer currency amounts", + "format": "decimal", + "type": "string" + }, + "source_currency": { + "description": "Creation currency of the CheckoutSession before localization", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "fx_rate", + "source_currency" + ], + "title": "PaymentPagesCheckoutSessionCurrencyConversion", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" + }, + "key": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_label" + }, + "numeric": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" + }, + "type": { + "description": "The type of the field.", + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "optional", "type"], + "title": "PaymentPagesCheckoutSessionCustomFields", + "type": "object", + "x-expandableFields": ["dropdown", "label", "numeric", "text"] + }, + "payment_pages_checkout_session_custom_fields_dropdown": { + "description": "", + "properties": { + "default_value": { + "description": "The value that will pre-fill on the payment page.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_option" + }, + "type": "array" + }, + "value": { + "description": "The option selected by the customer. This will be the `value` for the option.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["options"], + "title": "PaymentPagesCheckoutSessionCustomFieldsDropdown", + "type": "object", + "x-expandableFields": ["options"] + }, + "payment_pages_checkout_session_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of the label.", + "enum": ["custom"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentPagesCheckoutSessionCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_numeric": { + "description": "", + "properties": { + "default_value": { + "description": "The value that will pre-fill the field on the payment page.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "maximum_length": { + "description": "The maximum character length constraint for the customer's input.", + "nullable": true, + "type": "integer" + }, + "minimum_length": { + "description": "The minimum character length requirement for the customer's input.", + "nullable": true, + "type": "integer" + }, + "value": { + "description": "The value entered by the customer, containing only digits.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "PaymentPagesCheckoutSessionCustomFieldsOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_text": { + "description": "", + "properties": { + "default_value": { + "description": "The value that will pre-fill the field on the payment page.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "maximum_length": { + "description": "The maximum character length constraint for the customer's input.", + "nullable": true, + "type": "integer" + }, + "minimum_length": { + "description": "The minimum character length requirement for the customer's input.", + "nullable": true, + "type": "integer" + }, + "value": { + "description": "The value entered by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_text": { + "description": "", + "properties": { + "after_submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + } + ], + "description": "Custom text that should be displayed after the payment confirmation button.", + "nullable": true + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection.", + "nullable": true + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button.", + "nullable": true + }, + "terms_of_service_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + } + ], + "description": "Custom text that should be displayed in place of the default terms of service agreement text.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionCustomText", + "type": "object", + "x-expandableFields": [ + "after_submit", + "shipping_address", + "submit", + "terms_of_service_acceptance" + ] + }, + "payment_pages_checkout_session_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1200 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": ["message"], + "title": "PaymentPagesCheckoutSessionCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "nullable": true + }, + "email": { + "description": "The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "The customer's phone number after a completed Checkout Session.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_exempt": { + "description": "The customer’s tax exempt status after a completed Checkout Session.", + "enum": ["exempt", "none", "reverse"], + "nullable": true, + "type": "string" + }, + "tax_ids": { + "description": "The customer’s tax IDs after a completed Checkout Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" + }, + "nullable": true, + "type": "array" + } + }, + "title": "PaymentPagesCheckoutSessionCustomerDetails", + "type": "object", + "x-expandableFields": ["address", "tax_ids"] + }, + "payment_pages_checkout_session_discount": { + "description": "", + "properties": { + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + } + ], + "description": "Coupon attached to the Checkout Session.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + } + ] + } + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + } + ], + "description": "Promotion code attached to the Checkout Session.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + } + }, + "title": "PaymentPagesCheckoutSessionDiscount", + "type": "object", + "x-expandableFields": ["coupon", "promotion_code"] + }, + "payment_pages_checkout_session_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether invoice creation is enabled for the Checkout Session.", + "type": "boolean" + }, + "invoice_data": { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_settings" + } + }, + "required": ["enabled", "invoice_data"], + "title": "PaymentPagesCheckoutSessionInvoiceCreation", + "type": "object", + "x-expandableFields": ["invoice_data"] + }, + "payment_pages_checkout_session_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "nullable": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_checkout_rendering_options" + } + ], + "description": "Options for invoice PDF rendering.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "issuer", + "rendering_options" + ] + }, + "payment_pages_checkout_session_payment_method_reuse_agreement": { + "description": "", + "properties": { + "position": { + "description": "Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.\n\nWhen set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.", + "enum": ["auto", "hidden"], + "type": "string" + } + }, + "required": ["position"], + "title": "PaymentPagesCheckoutSessionPaymentMethodReuseAgreement", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether phone number collection is enabled for the session", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentPagesCheckoutSessionPhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_saved_payment_method_options": { + "description": "", + "properties": { + "allow_redisplay_filters": { + "description": "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.", + "items": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "payment_method_remove": { + "description": "Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.", + "enum": ["disabled", "enabled"], + "nullable": true, + "type": "string" + }, + "payment_method_save": { + "description": "Enable customers to choose if they wish to save their payment method for future use. Disabled by default.", + "enum": ["disabled", "enabled"], + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionSavedPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`.", + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "PaymentPagesCheckoutSessionShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after discounts and taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the ShippingRate for this order.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["amount_subtotal", "amount_tax", "amount_total"], + "title": "PaymentPagesCheckoutSessionShippingCost", + "type": "object", + "x-expandableFields": ["shipping_rate", "taxes"] + }, + "payment_pages_checkout_session_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The shipping rate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": ["shipping_amount", "shipping_rate"], + "title": "PaymentPagesCheckoutSessionShippingOption", + "type": "object", + "x-expandableFields": ["shipping_rate"] + }, + "payment_pages_checkout_session_tax_id": { + "description": "", + "properties": { + "type": { + "description": "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`, or `unknown`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentPagesCheckoutSessionTaxID", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session", + "type": "boolean" + }, + "required": { + "description": "Indicates whether a tax ID is required on the payment page", + "enum": ["if_supported", "never"], + "type": "string" + } + }, + "required": ["enabled", "required"], + "title": "PaymentPagesCheckoutSessionTaxIDCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "nullable": true, + "type": "integer" + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" + } + }, + "required": ["amount_discount", "amount_tax"], + "title": "PaymentPagesCheckoutSessionTotalDetails", + "type": "object", + "x-expandableFields": ["breakdown"] + }, + "payment_pages_checkout_session_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["discounts", "taxes"], + "title": "PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": ["discounts", "taxes"] + }, + "payment_pages_private_card_payment_method_options_resource_restrictions": { + "description": "", + "properties": { + "brands_blocked": { + "description": "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.", + "items": { + "enum": [ + "american_express", + "discover_global_network", + "mastercard", + "visa" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "PaymentPagesPrivateCardPaymentMethodOptionsResourceRestrictions", + "type": "object", + "x-expandableFields": [] + }, + "payment_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-resourceId": "payment_source", + "x-stripeBypassValidation": true + }, + "payout": { + "description": "A `Payout` object is created when you receive funds from Stripe, or when you\ninitiate a payout to either a bank account or debit card of a [connected\nStripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,\nand list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving payouts](https://stripe.com/docs/payouts)", + "properties": { + "amount": { + "description": "The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.", + "type": "integer" + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "arrival_date": { + "description": "Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.", + "format": "unix-time", + "type": "integer" + }, + "automatic": { + "description": "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).", + "type": "boolean" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the impact of this payout on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "description": "ID of the bank account or card the payout is sent to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ] + }, + "x-stripeBypassValidation": true + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Message that provides the reason for a payout failure, if available.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "method": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payout"], + "type": "string" + }, + "original_payout": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + } + ], + "description": "If the payout reverses another, this is the ID of the original payout.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "reconciliation_status": { + "description": "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.", + "enum": ["completed", "in_progress", "not_applicable"], + "type": "string" + }, + "reversed_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + } + ], + "description": "If the payout reverses, this is the ID of the payout that reverses this payout.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "source_type": { + "description": "The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a payout that displays on the user's bank statement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + }, + "trace_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/payouts_trace_id" + } + ], + "description": "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.", + "nullable": true + }, + "type": { + "description": "Can be `bank_account` or `card`.", + "enum": ["bank_account", "card"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "arrival_date", + "automatic", + "created", + "currency", + "id", + "livemode", + "method", + "object", + "reconciliation_status", + "source_type", + "status", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "application_fee", + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by", + "trace_id" + ], + "x-resourceId": "payout" + }, + "payouts_trace_id": { + "description": "", + "properties": { + "status": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The trace ID value if `trace_id.status` is `supported`, otherwise `nil`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["status"], + "title": "PayoutsTraceID", + "type": "object", + "x-expandableFields": [] + }, + "paypal_seller_protection": { + "description": "", + "properties": { + "dispute_categories": { + "description": "An array of conditions that are covered for the transaction, if applicable.", + "items": { + "enum": ["fraudulent", "product_not_received"], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "description": "Indicates whether the transaction is eligible for PayPal's seller protection.", + "enum": ["eligible", "not_eligible", "partially_eligible"], + "type": "string" + } + }, + "required": ["status"], + "title": "paypal_seller_protection", + "type": "object", + "x-expandableFields": [] + }, + "period": { + "description": "", + "properties": { + "end": { + "description": "The end date of this usage period. All usage up to and including this point in time is included.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "start": { + "description": "The start date of this usage period. All usage after this point in time is included.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "Period", + "type": "object", + "x-expandableFields": [] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform cannot access 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.\n\nSee 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).", + "properties": { + "account": { + "description": "The account the person is associated with.", + "maxLength": 5000, + "type": "string" + }, + "additional_tos_acceptances": { + "$ref": "#/components/schemas/person_additional_tos_acceptances" + }, + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "nullable": true + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "dob": { + "$ref": "#/components/schemas/legal_entity_dob" + }, + "email": { + "description": "The person's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_future_requirements" + } + ], + "nullable": true + }, + "gender": { + "description": "The person's gender.", + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number_provided": { + "description": "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`).", + "type": "boolean" + }, + "id_number_secondary_provided": { + "description": "Whether the person's `id_number_secondary` was provided.", + "type": "boolean" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "nationality": { + "description": "The country where the person is a national.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["person"], + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "political_exposure": { + "description": "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.", + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "$ref": "#/components/schemas/address" + }, + "relationship": { + "$ref": "#/components/schemas/person_relationship" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_requirements" + } + ], + "nullable": true + }, + "ssn_last_4_provided": { + "description": "Whether the last four digits of the person's Social Security number have been provided (U.S. only).", + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/legal_entity_person_verification" + } + }, + "required": ["account", "created", "id", "object"], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "additional_tos_acceptances", + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "verification" + ], + "x-resourceId": "person" + }, + "person_additional_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the legal guardian accepted the service agreement.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the legal guardian accepted the service agreement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the legal guardian accepted the service agreement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PersonAdditionalTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "person_additional_tos_acceptances": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_additional_tos_acceptance" + } + ], + "description": "Details on the legal guardian's acceptance of the main Stripe service agreement.", + "nullable": true + } + }, + "title": "PersonAdditionalTOSAcceptances", + "type": "object", + "x-expandableFields": ["account"] + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "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`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "person_relationship": { + "description": "", + "properties": { + "authorizer": { + "description": "Whether the person is the authorizer of the account's representative.", + "nullable": true, + "type": "boolean" + }, + "director": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "executive": { + "description": "Whether the person has significant responsibility to control, manage, or direct the organization.", + "nullable": true, + "type": "boolean" + }, + "legal_guardian": { + "description": "Whether the person is the legal guardian of the account's representative.", + "nullable": true, + "type": "boolean" + }, + "owner": { + "description": "Whether the person is an owner of the account’s legal entity.", + "nullable": true, + "type": "boolean" + }, + "percent_ownership": { + "description": "The percent owned by the person of the account's legal entity.", + "nullable": true, + "type": "number" + }, + "representative": { + "description": "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.", + "nullable": true, + "type": "boolean" + }, + "title": { + "description": "The person's title (e.g., CEO, Support Engineer).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "currently_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "plan": { + "description": "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.\n\nPlans define the base price, currency, and billing cycle for recurring purchases of products.\n[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.\n\nFor example, you might have a single \"gold\" product that has plans for $10/month, $100/year, €9/month, and €90/year.\n\nRelated 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).", + "properties": { + "active": { + "description": "Whether the plan can be used for new purchases.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": ["last_during_period", "last_ever", "max", "sum"], + "nullable": true, + "type": "string" + }, + "amount": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "amount_decimal": { + "description": "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`.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "billing_scheme": { + "description": "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.", + "enum": ["per_unit", "tiered"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "meter": { + "description": "The meter tracking the usage of a metered price", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["plan"], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The product whose pricing this plan determines.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/plan_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "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.", + "enum": ["graduated", "volume"], + "nullable": true, + "type": "string" + }, + "transform_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_usage" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.", + "nullable": true + }, + "trial_period_days": { + "description": "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).", + "nullable": true, + "type": "integer" + }, + "usage_type": { + "description": "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`.", + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "interval", + "interval_count", + "livemode", + "object", + "usage_type" + ], + "title": "Plan", + "type": "object", + "x-expandableFields": ["product", "tiers", "transform_usage"], + "x-resourceId": "plan" + }, + "plan_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "nullable": true, + "type": "integer" + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "nullable": true, + "type": "integer" + } + }, + "title": "PlanTier", + "type": "object", + "x-expandableFields": [] + }, + "platform_earning_fee_source": { + "description": "", + "properties": { + "charge": { + "description": "Charge ID that created this application fee.", + "maxLength": 5000, + "type": "string" + }, + "payout": { + "description": "Payout ID that created this application fee.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Type of object that created the application fee, either `charge` or `payout`.", + "enum": ["charge", "payout"], + "type": "string" + } + }, + "required": ["type"], + "title": "PlatformEarningFeeSource", + "type": "object", + "x-expandableFields": [] + }, + "portal_business_profile": { + "description": "", + "properties": { + "headline": { + "description": "The messaging shown to customers in the portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "privacy_policy_url": { + "description": "A link to the business’s publicly available privacy policy.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terms_of_service_url": { + "description": "A link to the business’s publicly available terms of service.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PortalBusinessProfile", + "type": "object", + "x-expandableFields": [] + }, + "portal_customer_update": { + "description": "", + "properties": { + "allowed_updates": { + "description": "The types of customer updates that are supported. When empty, customers are not updateable.", + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["allowed_updates", "enabled"], + "title": "PortalCustomerUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_features": { + "description": "", + "properties": { + "customer_update": { + "$ref": "#/components/schemas/portal_customer_update" + }, + "invoice_history": { + "$ref": "#/components/schemas/portal_invoice_list" + }, + "payment_method_update": { + "$ref": "#/components/schemas/portal_payment_method_update" + }, + "subscription_cancel": { + "$ref": "#/components/schemas/portal_subscription_cancel" + }, + "subscription_update": { + "$ref": "#/components/schemas/portal_subscription_update" + } + }, + "required": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_update" + ], + "title": "PortalFeatures", + "type": "object", + "x-expandableFields": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_update" + ] + }, + "portal_flows_after_completion_hosted_confirmation": { + "description": "", + "properties": { + "custom_message": { + "description": "A custom message to display to the customer after the flow is completed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PortalFlowsAfterCompletionHostedConfirmation", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_after_completion_redirect": { + "description": "", + "properties": { + "return_url": { + "description": "The URL the customer will be redirected to after the flow is completed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["return_url"], + "title": "PortalFlowsAfterCompletionRedirect", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_coupon_offer": { + "description": "", + "properties": { + "coupon": { + "description": "The ID of the coupon to be offered.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["coupon"], + "title": "PortalFlowsCouponOffer", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_flow": { + "description": "", + "properties": { + "after_completion": { + "$ref": "#/components/schemas/portal_flows_flow_after_completion" + }, + "subscription_cancel": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow_subscription_cancel" + } + ], + "description": "Configuration when `flow.type=subscription_cancel`.", + "nullable": true + }, + "subscription_update": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow_subscription_update" + } + ], + "description": "Configuration when `flow.type=subscription_update`.", + "nullable": true + }, + "subscription_update_confirm": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow_subscription_update_confirm" + } + ], + "description": "Configuration when `flow.type=subscription_update_confirm`.", + "nullable": true + }, + "type": { + "description": "Type of flow that the customer will go through.", + "enum": [ + "payment_method_update", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm" + ], + "type": "string" + } + }, + "required": ["after_completion", "type"], + "title": "PortalFlowsFlow", + "type": "object", + "x-expandableFields": [ + "after_completion", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm" + ] + }, + "portal_flows_flow_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_after_completion_hosted_confirmation" + } + ], + "description": "Configuration when `after_completion.type=hosted_confirmation`.", + "nullable": true + }, + "redirect": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_after_completion_redirect" + } + ], + "description": "Configuration when `after_completion.type=redirect`.", + "nullable": true + }, + "type": { + "description": "The specified type of behavior after the flow is completed.", + "enum": ["hosted_confirmation", "portal_homepage", "redirect"], + "type": "string" + } + }, + "required": ["type"], + "title": "PortalFlowsFlowAfterCompletion", + "type": "object", + "x-expandableFields": ["hosted_confirmation", "redirect"] + }, + "portal_flows_flow_subscription_cancel": { + "description": "", + "properties": { + "retention": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_retention" + } + ], + "description": "Specify a retention strategy to be used in the cancellation flow.", + "nullable": true + }, + "subscription": { + "description": "The ID of the subscription to be canceled.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["subscription"], + "title": "PortalFlowsFlowSubscriptionCancel", + "type": "object", + "x-expandableFields": ["retention"] + }, + "portal_flows_flow_subscription_update": { + "description": "", + "properties": { + "subscription": { + "description": "The ID of the subscription to be updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["subscription"], + "title": "PortalFlowsFlowSubscriptionUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_flow_subscription_update_confirm": { + "description": "", + "properties": { + "discounts": { + "description": "The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.", + "items": { + "$ref": "#/components/schemas/portal_flows_subscription_update_confirm_discount" + }, + "nullable": true, + "type": "array" + }, + "items": { + "description": "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": { + "$ref": "#/components/schemas/portal_flows_subscription_update_confirm_item" + }, + "type": "array" + }, + "subscription": { + "description": "The ID of the subscription to be updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["items", "subscription"], + "title": "PortalFlowsFlowSubscriptionUpdateConfirm", + "type": "object", + "x-expandableFields": ["discounts", "items"] + }, + "portal_flows_retention": { + "description": "", + "properties": { + "coupon_offer": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_coupon_offer" + } + ], + "description": "Configuration when `retention.type=coupon_offer`.", + "nullable": true + }, + "type": { + "description": "Type of retention strategy that will be used.", + "enum": ["coupon_offer"], + "type": "string" + } + }, + "required": ["type"], + "title": "PortalFlowsRetention", + "type": "object", + "x-expandableFields": ["coupon_offer"] + }, + "portal_flows_subscription_update_confirm_discount": { + "description": "", + "properties": { + "coupon": { + "description": "The ID of the coupon to apply to this subscription update.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "promotion_code": { + "description": "The ID of a promotion code to apply to this subscription update.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PortalFlowsSubscriptionUpdateConfirmDiscount", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_subscription_update_confirm_item": { + "description": "", + "properties": { + "id": { + "description": "The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "price": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "[Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.", + "type": "integer" + } + }, + "title": "PortalFlowsSubscriptionUpdateConfirmItem", + "type": "object", + "x-expandableFields": [] + }, + "portal_invoice_list": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PortalInvoiceList", + "type": "object", + "x-expandableFields": [] + }, + "portal_login_page": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.\n\nIf `false`, the previously generated `url`, if any, will be deactivated.", + "type": "boolean" + }, + "url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["enabled"], + "title": "PortalLoginPage", + "type": "object", + "x-expandableFields": [] + }, + "portal_payment_method_update": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PortalPaymentMethodUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_resource_schedule_update_at_period_end": { + "description": "", + "properties": { + "conditions": { + "description": "List of conditions. When any condition is true, an update will be scheduled at the end of the current period.", + "items": { + "$ref": "#/components/schemas/portal_resource_schedule_update_at_period_end_condition" + }, + "type": "array" + } + }, + "required": ["conditions"], + "title": "PortalResourceScheduleUpdateAtPeriodEnd", + "type": "object", + "x-expandableFields": ["conditions"] + }, + "portal_resource_schedule_update_at_period_end_condition": { + "description": "", + "properties": { + "type": { + "description": "The type of condition.", + "enum": ["decreasing_item_amount", "shortening_interval"], + "type": "string" + } + }, + "required": ["type"], + "title": "PortalResourceScheduleUpdateAtPeriodEndCondition", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_cancel": { + "description": "", + "properties": { + "cancellation_reason": { + "$ref": "#/components/schemas/portal_subscription_cancellation_reason" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "mode": { + "description": "Whether to cancel subscriptions immediately or at the end of the billing period.", + "enum": ["at_period_end", "immediately"], + "type": "string" + }, + "proration_behavior": { + "description": "Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "required": [ + "cancellation_reason", + "enabled", + "mode", + "proration_behavior" + ], + "title": "PortalSubscriptionCancel", + "type": "object", + "x-expandableFields": ["cancellation_reason"] + }, + "portal_subscription_cancellation_reason": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "options": { + "description": "Which cancellation reasons will be given as options to the customer.", + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["enabled", "options"], + "title": "PortalSubscriptionCancellationReason", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_update": { + "description": "", + "properties": { + "default_allowed_updates": { + "description": "The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.", + "items": { + "enum": ["price", "promotion_code", "quantity"], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "products": { + "description": "The list of up to 10 products that support subscription updates.", + "items": { + "$ref": "#/components/schemas/portal_subscription_update_product" + }, + "nullable": true, + "type": "array" + }, + "proration_behavior": { + "description": "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.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "schedule_at_period_end": { + "$ref": "#/components/schemas/portal_resource_schedule_update_at_period_end" + } + }, + "required": [ + "default_allowed_updates", + "enabled", + "proration_behavior", + "schedule_at_period_end" + ], + "title": "PortalSubscriptionUpdate", + "type": "object", + "x-expandableFields": ["products", "schedule_at_period_end"] + }, + "portal_subscription_update_product": { + "description": "", + "properties": { + "prices": { + "description": "The list of price IDs which, when subscribed to, a subscription can be updated.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "description": "The product ID.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["prices", "product"], + "title": "PortalSubscriptionUpdateProduct", + "type": "object", + "x-expandableFields": [] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[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.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated 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).", + "properties": { + "active": { + "description": "Whether the price can be used for new purchases.", + "type": "boolean" + }, + "billing_scheme": { + "description": "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.", + "enum": ["per_unit", "tiered"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/currency_option" + }, + "description": "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).", + "type": "object" + }, + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["price"], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/recurring" + } + ], + "description": "The recurring components of a price such as `interval` and `usage_type`.", + "nullable": true + }, + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "unspecified"], + "nullable": true, + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "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.", + "enum": ["graduated", "volume"], + "nullable": true, + "type": "string" + }, + "transform_quantity": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_quantity" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.", + "nullable": true + }, + "type": { + "description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.", + "enum": ["one_time", "recurring"], + "type": "string" + }, + "unit_amount": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "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`.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "product", + "type" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price" + }, + "price_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "nullable": true, + "type": "integer" + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "nullable": true, + "type": "integer" + } + }, + "title": "PriceTier", + "type": "object", + "x-expandableFields": [] + }, + "product": { + "description": "Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payment-links),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)", + "properties": { + "active": { + "description": "Whether the product is currently available for purchase.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + } + ] + } + }, + "description": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "marketing_features": { + "description": "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).", + "items": { + "$ref": "#/components/schemas/product_marketing_feature" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["product"], + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "$ref": "#/components/schemas/package_dimensions" + } + ], + "description": "The dimensions of this product for shipping purposes.", + "nullable": true + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "nullable": true, + "type": "boolean" + }, + "statement_descriptor": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "url": { + "description": "A URL of a publicly-accessible webpage for this product.", + "maxLength": 2048, + "nullable": true, + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "images", + "livemode", + "marketing_features", + "metadata", + "name", + "object", + "updated" + ], + "title": "Product", + "type": "object", + "x-expandableFields": [ + "default_price", + "marketing_features", + "package_dimensions", + "tax_code" + ], + "x-resourceId": "product" + }, + "product_feature": { + "description": "A product_feature represents an attachment between a feature and a product.\nWhen a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer.", + "properties": { + "entitlement_feature": { + "$ref": "#/components/schemas/entitlements.feature" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["product_feature"], + "type": "string" + } + }, + "required": ["entitlement_feature", "id", "livemode", "object"], + "title": "ProductFeature", + "type": "object", + "x-expandableFields": ["entitlement_feature"], + "x-resourceId": "product_feature" + }, + "product_marketing_feature": { + "description": "", + "properties": { + "name": { + "description": "The marketing feature name. Up to 80 characters long.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "ProductMarketingFeature", + "type": "object", + "x-expandableFields": [] + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.", + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.", + "type": "boolean" + }, + "code": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The customer that this promotion code can be used by.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "expires_at": { + "description": "Date at which the promotion code can no longer be redeemed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this promotion code can be redeemed.", + "nullable": true, + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["promotion_code"], + "type": "string" + }, + "restrictions": { + "$ref": "#/components/schemas/promotion_codes_resource_restrictions" + }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "coupon", + "created", + "id", + "livemode", + "object", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": ["coupon", "customer", "restrictions"], + "x-resourceId": "promotion_code" + }, + "promotion_code_currency_option": { + "description": "", + "properties": { + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": "integer" + } + }, + "required": ["minimum_amount"], + "title": "PromotionCodeCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/promotion_code_currency_option" + }, + "description": "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).", + "type": "object" + }, + "first_time_transaction": { + "description": "A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices", + "type": "boolean" + }, + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "nullable": true, + "type": "integer" + }, + "minimum_amount_currency": { + "description": "Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["first_time_transaction"], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": ["currency_options"] + }, + "quote": { + "description": "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule.", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "application_fee_percent": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/quotes_resource_automatic_tax" + }, + "collection_method": { + "description": "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`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "computed": { + "$ref": "#/components/schemas/quotes_resource_computed" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_tax_rates": { + "description": "The tax rates applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "type": "array" + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "expires_at": { + "description": "The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "from_quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_from_quote" + } + ], + "description": "Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.", + "nullable": true + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ], + "description": "The invoice that was created from this quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ] + } + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_quote_setting" + }, + "line_items": { + "description": "A list of items the customer is being quoted for.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["quote"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "status": { + "description": "The status of the quote.", + "enum": ["accepted", "canceled", "draft", "open"], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/quotes_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that was created or updated from this quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_data": { + "$ref": "#/components/schemas/quotes_resource_subscription_data_subscription_data" + }, + "subscription_schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + } + ], + "description": "The subscription schedule that was created or updated from this quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this quote belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_transfer_data" + } + ], + "description": "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.", + "nullable": true + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "automatic_tax", + "collection_method", + "computed", + "created", + "discounts", + "expires_at", + "id", + "invoice_settings", + "livemode", + "metadata", + "object", + "status", + "status_transitions", + "subscription_data", + "total_details" + ], + "title": "Quote", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "computed", + "customer", + "default_tax_rates", + "discounts", + "from_quote", + "invoice", + "invoice_settings", + "line_items", + "on_behalf_of", + "status_transitions", + "subscription", + "subscription_data", + "subscription_schedule", + "test_clock", + "total_details", + "transfer_data" + ], + "x-resourceId": "quote" + }, + "quotes_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculate taxes", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + }, + "status": { + "description": "The status of the most recent automated tax calculation for this quote.", + "enum": ["complete", "failed", "requires_location_inputs"], + "nullable": true, + "type": "string" + } + }, + "required": ["enabled"], + "title": "QuotesResourceAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "quotes_resource_computed": { + "description": "", + "properties": { + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_recurring" + } + ], + "description": "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.", + "nullable": true + }, + "upfront": { + "$ref": "#/components/schemas/quotes_resource_upfront" + } + }, + "required": ["upfront"], + "title": "QuotesResourceComputed", + "type": "object", + "x-expandableFields": ["recurring", "upfront"] + }, + "quotes_resource_from_quote": { + "description": "", + "properties": { + "is_revision": { + "description": "Whether this quote is a revision of a different quote.", + "type": "boolean" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + } + }, + "required": ["is_revision", "quote"], + "title": "QuotesResourceFromQuote", + "type": "object", + "x-expandableFields": ["quote"] + }, + "quotes_resource_recurring": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "interval", + "interval_count", + "total_details" + ], + "title": "QuotesResourceRecurring", + "type": "object", + "x-expandableFields": ["total_details"] + }, + "quotes_resource_status_transitions": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the quote was accepted. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "canceled_at": { + "description": "The time that the quote was canceled. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "finalized_at": { + "description": "The time that the quote was finalized. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "QuotesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_subscription_data_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "effective_date": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "nullable": true, + "type": "integer" + } + }, + "title": "QuotesResourceSubscriptionDataSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "nullable": true, + "type": "integer" + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" + } + }, + "required": ["amount_discount", "amount_tax"], + "title": "QuotesResourceTotalDetails", + "type": "object", + "x-expandableFields": ["breakdown"] + }, + "quotes_resource_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["discounts", "taxes"], + "title": "QuotesResourceTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": ["discounts", "taxes"] + }, + "quotes_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "amount_percent": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "QuotesResourceTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "quotes_resource_upfront": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "line_items": { + "description": "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.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": ["amount_subtotal", "amount_total", "total_details"], + "title": "QuotesResourceUpfront", + "type": "object", + "x-expandableFields": ["line_items", "total_details"] + }, + "radar.early_fraud_warning": { + "description": "An early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.\n\nRelated guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)", + "properties": { + "actionable": { + "description": "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.", + "type": "boolean" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "fraud_type": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.early_fraud_warning"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the Payment Intent this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "actionable", + "charge", + "created", + "fraud_type", + "id", + "livemode", + "object" + ], + "title": "RadarEarlyFraudWarning", + "type": "object", + "x-expandableFields": ["charge", "payment_intent"], + "x-resourceId": "radar.early_fraud_warning" + }, + "radar.value_list": { + "description": "Value lists allow you to group values together which can then be referenced in rules.\n\nRelated guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items)", + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who created this value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "item_type": { + "description": "The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "sepa_debit_fingerprint", + "string", + "us_bank_account_fingerprint" + ], + "type": "string" + }, + "list_items": { + "description": "List of items contained within this value list.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "The name of the value list.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list"], + "type": "string" + } + }, + "required": [ + "alias", + "created", + "created_by", + "id", + "item_type", + "list_items", + "livemode", + "metadata", + "name", + "object" + ], + "title": "RadarListList", + "type": "object", + "x-expandableFields": ["list_items"], + "x-resourceId": "radar.value_list" + }, + "radar.value_list_item": { + "description": "Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.\n\nRelated guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who added this item to the value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list_item"], + "type": "string" + }, + "value": { + "description": "The value of the item.", + "maxLength": 5000, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list this item belongs to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "created_by", + "id", + "livemode", + "object", + "value", + "value_list" + ], + "title": "RadarListListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "radar.value_list_item" + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "RadarRadarOptions", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "latitude": { + "description": "The geographic latitude where the payment originated.", + "nullable": true, + "type": "number" + }, + "longitude": { + "description": "The geographic longitude where the payment originated.", + "nullable": true, + "type": "number" + }, + "region": { + "description": "The state/county/province/region where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_session": { + "description": "", + "properties": { + "browser": { + "description": "The browser used in this browser session (e.g., `Chrome`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "device": { + "description": "Information about the device used for the browser session (e.g., `Samsung SM-G930T`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "platform": { + "description": "The platform for the browser session (e.g., `Macintosh`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "version": { + "description": "The version for the browser session (e.g., `61.0.3163.100`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [] + }, + "received_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "The FinancialAccount ID.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.", + "enum": ["stripe"], + "type": "string" + } + }, + "required": ["id", "network"], + "title": "received_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "recurring": { + "description": "", + "properties": { + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`.", + "enum": ["last_during_period", "last_ever", "max", "sum"], + "nullable": true, + "type": "string" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "meter": { + "description": "The meter tracking the usage of a metered price", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "usage_type": { + "description": "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`.", + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "required": ["interval", "interval_count", "usage_type"], + "title": "Recurring", + "type": "object", + "x-expandableFields": [] + }, + "refund": { + "description": "Refund objects allow you to refund a previously created charge that isn't\nrefunded yet. Funds are refunded to the credit or debit card that's\ninitially charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds)", + "properties": { + "amount": { + "description": "Amount, in cents (or local equivalent).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that's refunded.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).", + "maxLength": 5000, + "type": "string" + }, + "destination_details": { + "$ref": "#/components/schemas/refund_destination_details" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_reason": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "instructions_email": { + "description": "For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "next_action": { + "$ref": "#/components/schemas/refund_next_action" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["refund"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the PaymentIntent that's refunded.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).", + "enum": [ + "duplicate", + "expired_uncaptured_charge", + "fraudulent", + "requested_by_customer" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "source_transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ], + "description": "The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + }, + "status": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + } + }, + "required": ["amount", "created", "currency", "id", "object"], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "destination_details", + "failure_balance_transaction", + "next_action", + "payment_intent", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund" + }, + "refund_destination_details": { + "description": "", + "properties": { + "affirm": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "alipay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "alma": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "amazon_pay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "au_bank_transfer": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "blik": { + "$ref": "#/components/schemas/refund_destination_details_blik" + }, + "br_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_br_bank_transfer" + }, + "card": { + "$ref": "#/components/schemas/refund_destination_details_card" + }, + "cashapp": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "customer_cash_balance": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "eps": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "eu_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_eu_bank_transfer" + }, + "gb_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_gb_bank_transfer" + }, + "giropay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "grabpay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "jp_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_jp_bank_transfer" + }, + "klarna": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "multibanco": { + "$ref": "#/components/schemas/refund_destination_details_multibanco" + }, + "mx_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_mx_bank_transfer" + }, + "p24": { + "$ref": "#/components/schemas/refund_destination_details_p24" + }, + "paynow": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "paypal": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "pix": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "revolut": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "sofort": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "swish": { + "$ref": "#/components/schemas/refund_destination_details_swish" + }, + "th_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_th_bank_transfer" + }, + "type": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_us_bank_transfer" + }, + "wechat_pay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "zip": { + "$ref": "#/components/schemas/destination_details_unimplemented" + } + }, + "required": ["type"], + "title": "refund_destination_details", + "type": "object", + "x-expandableFields": [ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_bank_transfer", + "blik", + "br_bank_transfer", + "card", + "cashapp", + "customer_cash_balance", + "eps", + "eu_bank_transfer", + "gb_bank_transfer", + "giropay", + "grabpay", + "jp_bank_transfer", + "klarna", + "multibanco", + "mx_bank_transfer", + "p24", + "paynow", + "paypal", + "pix", + "revolut", + "sofort", + "swish", + "th_bank_transfer", + "us_bank_transfer", + "wechat_pay", + "zip" + ] + }, + "refund_destination_details_blik": { + "description": "", + "properties": { + "network_decline_code": { + "description": "For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_br_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_br_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_card": { + "description": "", + "properties": { + "reference": { + "description": "Value of the reference number assigned to the refund.", + "maxLength": 5000, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "type": "string" + }, + "reference_type": { + "description": "Type of the reference number assigned to the refund.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of refund. This can be `refund`, `reversal`, or `pending`.", + "enum": ["pending", "refund", "reversal"], + "type": "string" + } + }, + "required": ["type"], + "title": "refund_destination_details_card", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_eu_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_gb_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_gb_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_jp_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_jp_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_multibanco": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_mx_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_mx_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_p24": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_swish": { + "description": "", + "properties": { + "network_decline_code": { + "description": "For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_swish", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_th_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_th_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_destination_details_us_bank_transfer": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "refund_destination_details_us_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { + "$ref": "#/components/schemas/refund_next_action_display_details" + }, + "type": { + "description": "Type of the next action to perform.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "RefundNextAction", + "type": "object", + "x-expandableFields": ["display_details"] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { + "$ref": "#/components/schemas/email_sent" + }, + "expires_at": { + "description": "The expiry timestamp.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["email_sent", "expires_at"], + "title": "RefundNextActionDisplayDetails", + "type": "object", + "x-expandableFields": ["email_sent"] + }, + "reporting.report_run": { + "description": "The Report Run object represents an instance of a report type generated with\nspecific run parameters. Once the object is created, Stripe begins processing the report.\nWhen the report has finished running, it will give you a reference to a file\nwhere you can retrieve your results. For an overview, see\n[API Access to Reports](https://stripe.com/docs/reporting/statements/api).\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "description": "If something should go wrong during the run, a message about the failure (populated when\n `status=failed`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "`true` if the report is run on live mode data and `false` if it is run on test mode data.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["reporting.report_run"], + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/financial_reporting_finance_report_run_run_parameters" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `\"balance.summary.1\"`.", + "maxLength": 5000, + "type": "string" + }, + "result": { + "anyOf": [ + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object representing the result of the report run (populated when\n `status=succeeded`).", + "nullable": true + }, + "status": { + "description": "Status of this report run. This will be `pending` when the run is initially created.\n When the run finishes, this will be set to `succeeded` and the `result` field will be populated.\n Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.", + "maxLength": 5000, + "type": "string" + }, + "succeeded_at": { + "description": "Timestamp at which this run successfully finished (populated when\n `status=succeeded`). Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "parameters", + "report_type", + "status" + ], + "title": "reporting_report_run", + "type": "object", + "x-expandableFields": ["parameters", "result"], + "x-resourceId": "reporting.report_run" + }, + "reporting.report_type": { + "description": "The Report Type resource corresponds to a particular type of report, such as\nthe \"Activity summary\" or \"Itemized payouts\" reports. These objects are\nidentified by an ID belonging to a set of enumerated values. See\n[API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)\nfor those Report Type IDs, along with required and optional parameters.\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "data_available_end": { + "description": "Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_available_start": { + "description": "Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_columns": { + "description": "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.)", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "Human-readable name of the Report Type", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["reporting.report_type"], + "type": "string" + }, + "updated": { + "description": "When this Report Type was latest updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "version": { + "description": "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.", + "type": "integer" + } + }, + "required": [ + "data_available_end", + "data_available_start", + "id", + "livemode", + "name", + "object", + "updated", + "version" + ], + "title": "reporting_report_type", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "reporting.report_type" + }, + "reserve_transaction": { + "description": "", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["reserve_transaction"], + "type": "string" + } + }, + "required": ["amount", "currency", "id", "object"], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [] + }, + "review": { + "description": "Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).", + "properties": { + "billing_zip": { + "description": "The ZIP or postal code of the card used, if applicable.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "The charge associated with this review.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "closed_reason": { + "description": "The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "enum": [ + "approved", + "disputed", + "redacted", + "refunded", + "refunded_as_fraud" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The IP address where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "ip_address_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_location" + } + ], + "description": "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.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["review"], + "type": "string" + }, + "open": { + "description": "If `true`, the review needs action.", + "type": "boolean" + }, + "opened_reason": { + "description": "The reason the review was opened. One of `rule` or `manual`.", + "enum": ["manual", "rule"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_session" + } + ], + "description": "Information related to the browsing session of the user who initiated the payment.", + "nullable": true + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "open", + "opened_reason", + "reason" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": [ + "charge", + "ip_address_location", + "payment_intent", + "session" + ], + "x-resourceId": "review" + }, + "revolut_pay_underlying_payment_method_funding_details": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_method_details_passthrough_card" + }, + "type": { + "description": "funding type of the underlying payment method.", + "enum": ["card"], + "nullable": true, + "type": "string" + } + }, + "title": "revolut_pay_underlying_payment_method_funding_details", + "type": "object", + "x-expandableFields": ["card"] + }, + "rule": { + "description": "", + "properties": { + "action": { + "description": "The action taken on the payment.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "predicate": { + "description": "The predicate to evaluate the payment against.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["action", "id", "predicate"], + "title": "RadarRule", + "type": "object", + "x-expandableFields": [] + }, + "scheduled_query_run": { + "description": "If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_load_time": { + "description": "When the query was run, Sigma contained a snapshot of your Stripe data at this time.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "$ref": "#/components/schemas/sigma_scheduled_query_run_error" + }, + "file": { + "anyOf": [ + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object representing the results of the query.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["scheduled_query_run"], + "type": "string" + }, + "result_available_until": { + "description": "Time at which the result expires and is no longer available for download.", + "format": "unix-time", + "type": "integer" + }, + "sql": { + "description": "SQL for the query.", + "maxLength": 100000, + "type": "string" + }, + "status": { + "description": "The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.", + "maxLength": 5000, + "type": "string" + }, + "title": { + "description": "Title of the query.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data_load_time", + "id", + "livemode", + "object", + "result_available_until", + "sql", + "status", + "title" + ], + "title": "ScheduledQueryRun", + "type": "object", + "x-expandableFields": ["error", "file"], + "x-resourceId": "scheduled_query_run" + }, + "schedules_phase_automatic_tax": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If Stripe disabled automatic tax, this enum describes why.", + "enum": ["requires_location_inputs"], + "nullable": true, + "type": "string" + }, + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "secret_service_resource_scope": { + "description": "", + "properties": { + "type": { + "description": "The secret scope type.", + "enum": ["account", "user"], + "type": "string" + }, + "user": { + "description": "The user ID, if type is set to \"user\"", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "SecretServiceResourceScope", + "type": "object", + "x-expandableFields": [] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": ["charge", "setup_attempt"] + }, + "setup_attempt": { + "description": "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation is successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `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.", + "items": { + "enum": ["inbound", "outbound"], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["setup_attempt"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details" + }, + "setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The error encountered during this attempt to confirm the SetupIntent, if any.", + "nullable": true + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "status": { + "description": "Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "setup_intent", + "status", + "usage" + ], + "title": "PaymentFlowsSetupIntentSetupAttempt", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent" + ], + "x-resourceId": "setup_attempt" + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" + }, + "amazon_pay": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_amazon_pay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" + }, + "boleto": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" + }, + "cashapp": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_cashapp" + }, + "ideal": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" + }, + "kakao_pay": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_kakao_pay" + }, + "klarna": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_klarna" + }, + "kr_card": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_kr_card" + }, + "link": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_link" + }, + "paypal": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_paypal" + }, + "revolut_pay": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_revolut_pay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" + }, + "type": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_us_bank_account" + } + }, + "required": ["type"], + "title": "SetupAttemptPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "card_present", + "cashapp", + "ideal", + "kakao_pay", + "klarna", + "kr_card", + "link", + "paypal", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "setup_attempt_payment_method_details_acss_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_amazon_pay": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_amazon_pay", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_au_becs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bacs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`", + "enum": ["de", "en", "fr", "nl"], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Bancontact directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_boleto": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_checks" + } + ], + "description": "Check results by Card networks on Card address and CVC at the time of authorization", + "nullable": true + }, + "country": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "nullable": true, + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "description": "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.\n\n*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.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + } + ], + "description": "Populated if this authorization used 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_wallet" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet.", + "nullable": true + } + }, + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": ["checks", "three_d_secure", "wallet"] + }, + "setup_attempt_payment_method_details_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "offline": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_offline" + } + ], + "description": "Details about payments collected offline.", + "nullable": true + } + }, + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": ["generated_card", "offline"] + }, + "setup_attempt_payment_method_details_card_wallet": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + }, + "type": { + "description": "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.", + "enum": ["apple_pay", "google_pay", "link"], + "type": "string" + } + }, + "required": ["type"], + "title": "setup_attempt_payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": ["apple_pay", "google_pay"] + }, + "setup_attempt_payment_method_details_cashapp": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_cashapp", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "nullable": true, + "type": "string" + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by iDEAL directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_kakao_pay": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_kakao_pay", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_klarna": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_klarna", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_kr_card": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_kr_card", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_link": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_paypal": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_paypal", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_revolut_pay": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_revolut_pay", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the Sofort authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`", + "enum": ["de", "en", "fr", "nl"], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Sofort directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent": { + "description": "A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.\nFor example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent when you're ready to collect your customer's payment credentials.\nDon't maintain long-lived, unconfirmed SetupIntents because they might not be valid.\nThe SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides\nyou through the setup process.\n\nSuccessful SetupIntents result in payment credentials that are optimized for future payments.\nFor example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through\n[Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection\nto streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).\nIf you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),\nit automatically attaches the resulting payment method to that Customer after successful setup.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you can reduce friction for your customers, even as regulations change over time.\n\nRelated guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that created the SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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.", + "type": "boolean" + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_setup_intent" + } + ], + "description": "Settings for dynamic payment methods compatible with this Setup Intent", + "nullable": true + }, + "cancellation_reason": { + "description": "Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.", + "enum": ["abandoned", "duplicate", "requested_by_customer"], + "nullable": true, + "type": "string" + }, + "client_secret": { + "description": "The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.\n\nThe 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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf 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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `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.", + "items": { + "enum": ["inbound", "outbound"], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The error encountered in the previous SetupIntent confirmation.", + "nullable": true + }, + "latest_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + } + ], + "description": "The most recent SetupAttempt for this SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_next_action" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to continue payment setup.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["setup_intent"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) for which the setup is intended.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_configuration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_config_biz_payment_method_configuration_details" + } + ], + "description": "Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent.", + "nullable": true + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options" + } + ], + "description": "Payment method-specific configuration for this SetupIntent.", + "nullable": true + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "status": { + "description": "[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`.", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future.\n\nUse `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`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method_types", + "status", + "usage" + ], + "title": "SetupIntent", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_payment_methods", + "customer", + "last_setup_error", + "latest_attempt", + "mandate", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_configuration_details", + "payment_method_options", + "single_use_mandate" + ], + "x-resourceId": "setup_intent" + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "cashapp_handle_redirect_or_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "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.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" + } + }, + "required": ["type"], + "title": "SetupIntentNextAction", + "type": "object", + "x-expandableFields": [ + "cashapp_handle_redirect_or_display_qr_code", + "redirect_to_url", + "verify_with_microdeposits" + ] + }, + "setup_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": ["amounts", "descriptor_code"], + "nullable": true, + "type": "string" + } + }, + "required": ["arrival_date", "hosted_verification_url"], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "amazon_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_amazon_pay" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_bacs_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card_present" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "paypal": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_paypal" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "amazon_pay", + "bacs_debit", + "card", + "card_present", + "link", + "paypal", + "sepa_debit", + "us_bank_account" + ] + }, + "setup_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account", + "enum": ["cad", "usd"], + "nullable": true, + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_amazon_pay": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_amazon_pay", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_bacs_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_bacs_debit" + } + }, + "title": "setup_intent_payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card_mandate_options" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India.", + "nullable": true + }, + "network": { + "description": "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.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "request_three_d_secure": { + "description": "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.", + "enum": ["any", "automatic", "challenge"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "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.", + "enum": ["fixed", "maximum"], + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "interval": { + "description": "Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.", + "enum": ["day", "month", "sporadic", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "reference": { + "description": "Unique identifier for the mandate or subscription.", + "maxLength": 80, + "type": "string" + }, + "start_date": { + "description": "Start date of the mandate or subscription. Start date should not be lesser than yesterday.", + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "description": "Specifies the type of mandates supported. Possible values are `india`.", + "items": { + "enum": ["india"], + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_card_present": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_card_present", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic"], + "nullable": true, + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal"], + "nullable": true, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_bacs_debit": { + "description": "", + "properties": { + "reference_prefix": { + "description": "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'.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": { + "reference_prefix": { + "description": "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'.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_paypal": { + "description": "", + "properties": { + "billing_agreement_id": { + "description": "The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_paypal", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "mandate_options": { + "$ref": "#/components/schemas/payment_method_options_us_bank_account_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections", "mandate_options"] + }, + "setup_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "SetupIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [] + }, + "shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tracking_number": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "Shipping", + "type": "object", + "x-expandableFields": ["address"] + }, + "shipping_rate": { + "description": "Shipping rates describe the price of shipping presented to your customers and\napplied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).", + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "delivery_estimate": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate" + } + ], + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "nullable": true + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fixed_amount": { + "$ref": "#/components/schemas/shipping_rate_fixed_amount" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["shipping_rate"], + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": ["exclusive", "inclusive", "unspecified"], + "nullable": true, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "type": { + "description": "The type of calculation to use on the shipping rate.", + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": ["delivery_estimate", "fixed_amount", "tax_code"], + "x-resourceId": "shipping_rate" + }, + "shipping_rate_currency_option": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + } + }, + "required": ["amount", "tax_behavior"], + "title": "ShippingRateCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + } + ], + "description": "The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.", + "nullable": true + }, + "minimum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + } + ], + "description": "The lower bound of the estimated range. If empty, represents no lower bound.", + "nullable": true + } + }, + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": ["maximum", "minimum"] + }, + "shipping_rate_delivery_estimate_bound": { + "description": "", + "properties": { + "unit": { + "description": "A unit of time.", + "enum": ["business_day", "day", "hour", "month", "week"], + "type": "string" + }, + "value": { + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "ShippingRateDeliveryEstimateBound", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_fixed_amount": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/shipping_rate_currency_option" + }, + "description": "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).", + "type": "object" + } + }, + "required": ["amount", "currency"], + "title": "ShippingRateFixedAmount", + "type": "object", + "x-expandableFields": ["currency_options"] + }, + "sigma_scheduled_query_run_error": { + "description": "", + "properties": { + "message": { + "description": "Information about the run failure.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["message"], + "title": "SigmaScheduledQueryRunError", + "type": "object", + "x-expandableFields": [] + }, + "source": { + "description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_type_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/source_type_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/source_type_acss_debit" + }, + "alipay": { + "$ref": "#/components/schemas/source_type_alipay" + }, + "allow_redisplay": { + "description": "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”.", + "enum": ["always", "limited", "unspecified"], + "nullable": true, + "type": "string" + }, + "amount": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/source_type_au_becs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/source_type_bancontact" + }, + "card": { + "$ref": "#/components/schemas/source_type_card" + }, + "card_present": { + "$ref": "#/components/schemas/source_type_card_present" + }, + "client_secret": { + "description": "The client secret of the source. Used for client-side retrieval using a publishable key.", + "maxLength": 5000, + "type": "string" + }, + "code_verification": { + "$ref": "#/components/schemas/source_code_verification_flow" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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.", + "format": "currency", + "nullable": true, + "type": "string" + }, + "customer": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "eps": { + "$ref": "#/components/schemas/source_type_eps" + }, + "flow": { + "description": "The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.", + "maxLength": 5000, + "type": "string" + }, + "giropay": { + "$ref": "#/components/schemas/source_type_giropay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/source_type_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/source_type_klarna" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "multibanco": { + "$ref": "#/components/schemas/source_type_multibanco" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["source"], + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/source_owner" + } + ], + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "nullable": true + }, + "p24": { + "$ref": "#/components/schemas/source_type_p24" + }, + "receiver": { + "$ref": "#/components/schemas/source_receiver_flow" + }, + "redirect": { + "$ref": "#/components/schemas/source_redirect_flow" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_type_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/source_type_sofort" + }, + "source_order": { + "$ref": "#/components/schemas/source_order" + }, + "statement_descriptor": { + "description": "Extra information about a source. This will appear on your customer's statement every time you charge the source.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.", + "maxLength": 5000, + "type": "string" + }, + "three_d_secure": { + "$ref": "#/components/schemas/source_type_three_d_secure" + }, + "type": { + "description": "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.", + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "usage": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "wechat": { + "$ref": "#/components/schemas/source_type_wechat" + } + }, + "required": [ + "client_secret", + "created", + "flow", + "id", + "livemode", + "object", + "status", + "type" + ], + "title": "Source", + "type": "object", + "x-expandableFields": [ + "code_verification", + "owner", + "receiver", + "redirect", + "source_order" + ], + "x-resourceId": "source" + }, + "source_code_verification_flow": { + "description": "", + "properties": { + "attempts_remaining": { + "description": "The number of attempts remaining to authenticate the source object with a verification code.", + "type": "integer" + }, + "status": { + "description": "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).", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["attempts_remaining", "status"], + "title": "SourceCodeVerificationFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification": { + "description": "Source mandate notifications should be created when a notification related to\na source mandate must be sent to the payer. They will trigger a webhook or\ndeliver an email to the customer.", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/source_mandate_notification_acss_debit_data" + }, + "amount": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "bacs_debit": { + "$ref": "#/components/schemas/source_mandate_notification_bacs_debit_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["source_mandate_notification"], + "type": "string" + }, + "reason": { + "description": "The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.", + "maxLength": 5000, + "type": "string" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_mandate_notification_sepa_debit_data" + }, + "source": { + "$ref": "#/components/schemas/source" + }, + "status": { + "description": "The status of the mandate notification. Valid statuses are `pending` or `submitted`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "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`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "reason", + "source", + "status", + "type" + ], + "title": "SourceMandateNotification", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bacs_debit", + "sepa_debit", + "source" + ], + "x-resourceId": "source_mandate_notification" + }, + "source_mandate_notification_acss_debit_data": { + "description": "", + "properties": { + "statement_descriptor": { + "description": "The statement descriptor associate with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationAcssDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_bacs_debit_data": { + "description": "", + "properties": { + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationBacsDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_sepa_debit_data": { + "description": "", + "properties": { + "creditor_identifier": { + "description": "SEPA creditor ID.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + }, + "mandate_reference": { + "description": "Mandate reference associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationSepaDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_order": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "email": { + "description": "The email address of the customer placing the order.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of items constituting the order.", + "items": { + "$ref": "#/components/schemas/source_order_item" + }, + "nullable": true, + "type": "array" + }, + "shipping": { + "$ref": "#/components/schemas/shipping" + } + }, + "required": ["amount", "currency"], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": ["items", "shipping"] + }, + "source_order_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount (price) for this order item.", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "This currency of this order item. Required when `amount` is present.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "Human-readable description for this order item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "parent": { + "description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.", + "type": "integer" + }, + "type": { + "description": "The type of this order item. Must be `sku`, `tax`, or `shipping`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [] + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's address.", + "nullable": true + }, + "email": { + "description": "Owner's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Owner's full name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "Owner's phone number (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "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.", + "nullable": true + }, + "verified_email": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_phone": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "SourceOwner", + "type": "object", + "x-expandableFields": ["address", "verified_address"] + }, + "source_receiver_flow": { + "description": "", + "properties": { + "address": { + "description": "The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "amount_charged": { + "description": "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.", + "type": "integer" + }, + "amount_received": { + "description": "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.", + "type": "integer" + }, + "amount_returned": { + "description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.", + "type": "integer" + }, + "refund_attributes_method": { + "description": "Type of refund attribute method, one of `email`, `manual`, or `none`.", + "maxLength": 5000, + "type": "string" + }, + "refund_attributes_status": { + "description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_redirect_flow": { + "description": "", + "properties": { + "failure_reason": { + "description": "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`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_url": { + "description": "The URL you provide to redirect the customer to after they authenticated their payment.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.", + "maxLength": 2048, + "type": "string" + } + }, + "required": ["return_url", "status", "url"], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction": { + "description": "Some payment methods have no required amount that a customer must send.\nCustomers can be instructed to send any amount, and it can be made up of\nmultiple transactions. As such, sources can have multiple associated\ntransactions.", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_ach_credit_transfer_data" + }, + "amount": { + "description": "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.", + "type": "integer" + }, + "chf_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_chf_credit_transfer_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "gbp_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_gbp_credit_transfer_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["source_transaction"], + "type": "string" + }, + "paper_check": { + "$ref": "#/components/schemas/source_transaction_paper_check_data" + }, + "sepa_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_sepa_credit_transfer_data" + }, + "source": { + "description": "The ID of the source this transaction is attached to.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the transaction, one of `succeeded`, `pending`, or `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this transaction is attached to.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "alipay", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "object", + "source", + "status", + "type" + ], + "title": "SourceTransaction", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "chf_credit_transfer", + "gbp_credit_transfer", + "paper_check", + "sepa_credit_transfer" + ], + "x-resourceId": "source_transaction" + }, + "source_transaction_ach_credit_transfer_data": { + "description": "", + "properties": { + "customer_data": { + "description": "Customer data associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Bank account fingerprint associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionAchCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_chf_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_country": { + "description": "Sender's country address.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_line1": { + "description": "Sender's line 1 address.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionChfCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_gbp_credit_transfer_data": { + "description": "", + "properties": { + "fingerprint": { + "description": "Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.", + "maxLength": 5000, + "type": "string" + }, + "funding_method": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "Sender entered arbitrary information about the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_account_number": { + "description": "Sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender name associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_sort_code": { + "description": "Sender sort code associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionGbpCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_paper_check_data": { + "description": "", + "properties": { + "available_at": { + "description": "Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.", + "maxLength": 5000, + "type": "string" + }, + "invoices": { + "description": "Comma-separated list of invoice IDs associated with the paper check.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionPaperCheckData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_sepa_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionSepaCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_type_ach_credit_transfer": { + "properties": { + "account_number": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_name": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_type": { + "nullable": true, + "type": "string" + }, + "refund_routing_number": { + "nullable": true, + "type": "string" + }, + "routing_number": { + "nullable": true, + "type": "string" + }, + "swift_code": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_ach_debit": { + "properties": { + "bank_name": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "routing_number": { + "nullable": true, + "type": "string" + }, + "type": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_acss_debit": { + "properties": { + "bank_address_city": { + "nullable": true, + "type": "string" + }, + "bank_address_line_1": { + "nullable": true, + "type": "string" + }, + "bank_address_line_2": { + "nullable": true, + "type": "string" + }, + "bank_address_postal_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "category": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "routing_number": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_alipay": { + "properties": { + "data_string": { + "nullable": true, + "type": "string" + }, + "native_url": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_bancontact": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "iban_last4": { + "nullable": true, + "type": "string" + }, + "preferred_language": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_card": { + "properties": { + "address_line1_check": { + "nullable": true, + "type": "string" + }, + "address_zip_check": { + "nullable": true, + "type": "string" + }, + "brand": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "cvc_check": { + "nullable": true, + "type": "string" + }, + "dynamic_last4": { + "nullable": true, + "type": "string" + }, + "exp_month": { + "nullable": true, + "type": "integer" + }, + "exp_year": { + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_card_present": { + "properties": { + "application_cryptogram": { + "type": "string" + }, + "application_preferred_name": { + "type": "string" + }, + "authorization_code": { + "nullable": true, + "type": "string" + }, + "authorization_response_code": { + "type": "string" + }, + "brand": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "cvm_type": { + "type": "string" + }, + "data_type": { + "nullable": true, + "type": "string" + }, + "dedicated_file_name": { + "type": "string" + }, + "emv_auth_data": { + "type": "string" + }, + "evidence_customer_signature": { + "nullable": true, + "type": "string" + }, + "evidence_transaction_certificate": { + "nullable": true, + "type": "string" + }, + "exp_month": { + "nullable": true, + "type": "integer" + }, + "exp_year": { + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "pos_device_id": { + "nullable": true, + "type": "string" + }, + "pos_entry_mode": { + "type": "string" + }, + "read_method": { + "nullable": true, + "type": "string" + }, + "reader": { + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "type": "string" + }, + "transaction_status_information": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_eps": { + "properties": { + "reference": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_giropay": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_ideal": { + "properties": { + "bank": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "iban_last4": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_klarna": { + "properties": { + "background_image_url": { + "type": "string" + }, + "client_token": { + "nullable": true, + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "page_title": { + "type": "string" + }, + "pay_later_asset_urls_descriptive": { + "type": "string" + }, + "pay_later_asset_urls_standard": { + "type": "string" + }, + "pay_later_name": { + "type": "string" + }, + "pay_later_redirect_url": { + "type": "string" + }, + "pay_now_asset_urls_descriptive": { + "type": "string" + }, + "pay_now_asset_urls_standard": { + "type": "string" + }, + "pay_now_name": { + "type": "string" + }, + "pay_now_redirect_url": { + "type": "string" + }, + "pay_over_time_asset_urls_descriptive": { + "type": "string" + }, + "pay_over_time_asset_urls_standard": { + "type": "string" + }, + "pay_over_time_name": { + "type": "string" + }, + "pay_over_time_redirect_url": { + "type": "string" + }, + "payment_method_categories": { + "type": "string" + }, + "purchase_country": { + "type": "string" + }, + "purchase_type": { + "type": "string" + }, + "redirect_url": { + "type": "string" + }, + "shipping_delay": { + "type": "integer" + }, + "shipping_first_name": { + "type": "string" + }, + "shipping_last_name": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_multibanco": { + "properties": { + "entity": { + "nullable": true, + "type": "string" + }, + "reference": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_city": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_country": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_line1": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_line2": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_postal_code": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_state": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_name": { + "nullable": true, + "type": "string" + }, + "refund_iban": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_p24": { + "properties": { + "reference": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_sepa_debit": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "branch_code": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "mandate_reference": { + "nullable": true, + "type": "string" + }, + "mandate_url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_sofort": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "iban_last4": { + "nullable": true, + "type": "string" + }, + "preferred_language": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_three_d_secure": { + "properties": { + "address_line1_check": { + "nullable": true, + "type": "string" + }, + "address_zip_check": { + "nullable": true, + "type": "string" + }, + "authenticated": { + "nullable": true, + "type": "boolean" + }, + "brand": { + "nullable": true, + "type": "string" + }, + "card": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "customer": { + "nullable": true, + "type": "string" + }, + "cvc_check": { + "nullable": true, + "type": "string" + }, + "dynamic_last4": { + "nullable": true, + "type": "string" + }, + "exp_month": { + "nullable": true, + "type": "integer" + }, + "exp_year": { + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_wechat": { + "properties": { + "prepay_id": { + "type": "string" + }, + "qr_code_url": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "type": "string" + } + }, + "type": "object" + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the subscription.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_percent": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_billing_cycle_anchor_config" + } + ], + "description": "The fixed values used to calculate the `billing_cycle_anchor`.", + "nullable": true + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period", + "nullable": true + }, + "cancel_at": { + "description": "A date in the future at which the subscription will automatically get canceled", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.", + "type": "boolean" + }, + "canceled_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/cancellation_details" + } + ], + "description": "Details about why this subscription was cancelled", + "nullable": true + }, + "collection_method": { + "description": "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`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "current_period_end": { + "description": "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "Start of the current period that the subscription has been invoiced for.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "days_until_due": { + "description": "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`.", + "nullable": true, + "type": "integer" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "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).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "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).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "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.", + "maxLength": 500, + "nullable": true, + "type": "string" + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "nullable": true + }, + "discounts": { + "description": "The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "ended_at": { + "description": "If the subscription has ended, the date the subscription ended.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "$ref": "#/components/schemas/subscriptions_resource_subscription_invoice_settings" + }, + "items": { + "description": "List of subscription items, each with an attached price.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionItemList", + "type": "object", + "x-expandableFields": ["data"] + }, + "latest_invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The most recent invoice this subscription has generated.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "next_pending_invoice_item_invoice": { + "description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["subscription"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "pause_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pause_collection" + } + ], + "description": "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).", + "nullable": true + }, + "payment_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_settings" + } + ], + "description": "Payment settings passed on to invoices created by the subscription.", + "nullable": true + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" + } + ], + "description": "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.", + "nullable": true + }, + "pending_setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "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).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "pending_update": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pending_update" + } + ], + "description": "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.", + "nullable": true + }, + "schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + } + ], + "description": "The schedule attached to the subscription", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "start_date": { + "description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. \n\nFor `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. \n\nA subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. \n\nA 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. \n\nIf 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). \n\nIf 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.", + "enum": [ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this subscription belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + } + ], + "description": "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.", + "nullable": true + }, + "trial_end": { + "description": "If the subscription has a trial, the end of that trial.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings" + } + ], + "description": "Settings related to subscription trials.", + "nullable": true + }, + "trial_start": { + "description": "If the subscription has a trial, the beginning of that trial.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "automatic_tax", + "billing_cycle_anchor", + "cancel_at_period_end", + "collection_method", + "created", + "currency", + "current_period_end", + "current_period_start", + "customer", + "discounts", + "id", + "invoice_settings", + "items", + "livemode", + "metadata", + "object", + "start_date", + "status" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_cycle_anchor_config", + "billing_thresholds", + "cancellation_details", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "invoice_settings", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription" + }, + "subscription_automatic_tax": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If Stripe disabled automatic tax, this enum describes why.", + "enum": ["requires_location_inputs"], + "nullable": true, + "type": "string" + }, + "enabled": { + "description": "Whether Stripe automatically computes tax on this subscription.", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "subscription_billing_thresholds": { + "description": "", + "properties": { + "amount_gte": { + "description": "Monetary threshold that triggers the subscription to create an invoice", + "nullable": true, + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "description": "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`.", + "nullable": true, + "type": "boolean" + } + }, + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_details_data": { + "description": "", + "properties": { + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.\n *Note: This attribute is populated only for invoices created on or after June 29, 2023.*", + "nullable": true, + "type": "object" + } + }, + "title": "SubscriptionDetailsData", + "type": "object", + "x-expandableFields": [] + }, + "subscription_item": { + "description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "type": "integer" + }, + "discounts": { + "description": "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["subscription_item"], + "type": "string" + }, + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "description": "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "subscription": { + "description": "The `subscription` this `subscription_item` belongs to.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "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`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "created", + "discounts", + "id", + "metadata", + "object", + "price", + "subscription" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "discounts", + "price", + "tax_rates" + ], + "x-resourceId": "subscription_item" + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "nullable": true, + "type": "integer" + } + }, + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_mandate_options_card" + }, + "network": { + "description": "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.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "request_three_d_secure": { + "description": "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.", + "enum": ["any", "automatic", "challenge"], + "nullable": true, + "type": "string" + } + }, + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "subscription_pending_invoice_item_interval": { + "description": "", + "properties": { + "interval": { + "description": "Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "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).", + "type": "integer" + } + }, + "required": ["interval", "interval_count"], + "title": "SubscriptionPendingInvoiceItemInterval", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule": { + "description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "canceled_at": { + "description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "completed_at": { + "description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_phase": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_schedule_current_phase" + } + ], + "description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.", + "nullable": true + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_settings": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" + }, + "end_behavior": { + "description": "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.", + "enum": ["cancel", "none", "release", "renew"], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["subscription_schedule"], + "type": "string" + }, + "phases": { + "description": "Configuration for the subscription schedule's phases.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_phase_configuration" + }, + "type": "array" + }, + "released_at": { + "description": "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "released_subscription": { + "description": "ID of the subscription once managed by the subscription schedule (if it is released).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "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).", + "enum": [ + "active", + "canceled", + "completed", + "not_started", + "released" + ], + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "ID of the subscription managed by the subscription schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "customer", + "default_settings", + "end_behavior", + "id", + "livemode", + "object", + "phases", + "status" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule" + }, + "subscription_schedule_add_invoice_item": { + "description": "An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.", + "properties": { + "discounts": { + "description": "The stackable discounts that will be applied to the item.", + "items": { + "$ref": "#/components/schemas/discounts_resource_stackable_discount" + }, + "type": "array" + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "The quantity of the invoice item.", + "nullable": true, + "type": "integer" + }, + "tax_rates": { + "description": "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + } + }, + "required": ["discounts", "price"], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": ["discounts", "price", "tax_rates"] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period", + "nullable": true + }, + "discounts": { + "description": "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "$ref": "#/components/schemas/discounts_resource_stackable_discount" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "Quantity of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "tax_rates": { + "description": "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`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + } + }, + "required": ["discounts", "price"], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "discounts", + "price", + "tax_rates" + ] + }, + "subscription_schedule_current_phase": { + "description": "", + "properties": { + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end_date", "start_date"], + "title": "SubscriptionScheduleCurrentPhase", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule_phase_configuration": { + "description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.", + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/schedules_phase_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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).", + "enum": ["automatic", "phase_start"], + "nullable": true, + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period", + "nullable": true + }, + "collection_method": { + "description": "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`.", + "enum": ["charge_automatically", "send_invoice"], + "nullable": true, + "type": "string" + }, + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ], + "description": "ID of the coupon to use during this phase of the subscription schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ] + } + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discounts": { + "description": "The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.", + "items": { + "$ref": "#/components/schemas/discounts_resource_stackable_discount" + }, + "type": "array" + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_phase_setting" + } + ], + "description": "The invoice settings applicable during this phase.", + "nullable": true + }, + "items": { + "description": "Subscription items to configure the subscription to during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_configuration_item" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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`.", + "nullable": true, + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "proration_behavior": { + "description": "If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + } + ], + "description": "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.", + "nullable": true + }, + "trial_end": { + "description": "When the trial ends within the phase.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "add_invoice_items", + "currency", + "discounts", + "end_date", + "items", + "proration_behavior", + "start_date" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "coupon", + "default_payment_method", + "default_tax_rates", + "discounts", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings": { + "description": "", + "properties": { + "application_fee_percent": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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).", + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period", + "nullable": true + }, + "collection_method": { + "description": "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`.", + "enum": ["charge_automatically", "send_invoice"], + "nullable": true, + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "description": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + } + ], + "description": "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.", + "nullable": true + } + }, + "required": ["billing_cycle_anchor", "invoice_settings"], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings_automatic_tax": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If Stripe disabled automatic tax, this enum describes why.", + "enum": ["requires_location_inputs"], + "nullable": true, + "type": "string" + }, + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + }, + "liability": { + "anyOf": [ + { + "$ref": "#/components/schemas/connect_account_reference" + } + ], + "description": "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.", + "nullable": true + } + }, + "required": ["enabled"], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"] + }, + "subscription_transfer_data": { + "description": "", + "properties": { + "amount_percent": { + "description": "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.", + "nullable": true, + "type": "number" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "subscriptions_resource_billing_cycle_anchor_config": { + "description": "", + "properties": { + "day_of_month": { + "description": "The day of the month of the billing_cycle_anchor.", + "type": "integer" + }, + "hour": { + "description": "The hour of the day of the billing_cycle_anchor.", + "nullable": true, + "type": "integer" + }, + "minute": { + "description": "The minute of the hour of the billing_cycle_anchor.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month to start full cycle billing periods.", + "nullable": true, + "type": "integer" + }, + "second": { + "description": "The second of the minute of the billing_cycle_anchor.", + "nullable": true, + "type": "integer" + } + }, + "required": ["day_of_month"], + "title": "SubscriptionsResourceBillingCycleAnchorConfig", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_pause_collection": { + "description": "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.", + "properties": { + "behavior": { + "description": "The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.", + "enum": ["keep_as_draft", "mark_uncollectible", "void"], + "type": "string" + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": ["behavior"], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + } + ], + "description": "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + } + ], + "description": "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_payment_method_options_card" + } + ], + "description": "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + } + ], + "description": "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + } + ], + "description": "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_sepa_debit" + } + ], + "description": "This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + } + ], + "description": "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.", + "nullable": true + } + }, + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "sepa_debit", + "us_bank_account" + ] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" + } + ], + "description": "Payment-method-specific configuration to provide to invoices created by the subscription.", + "nullable": true + }, + "payment_method_types": { + "description": "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).", + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "save_default_payment_method": { + "description": "Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.", + "enum": ["off", "on_subscription"], + "nullable": true, + "type": "string" + } + }, + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": ["payment_method_options"] + }, + "subscriptions_resource_pending_update": { + "description": "Pending Updates store the changes pending from a previous update that will be applied\nto the Subscription upon successful payment.", + "properties": { + "billing_cycle_anchor": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The point after which the changes reflected by this update will be discarded and no longer applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription_items": { + "description": "List of subscription items, each with an attached plan, that will be set if the update is applied.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "nullable": true, + "type": "array" + }, + "trial_end": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "trial_from_plan": { + "description": "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.", + "nullable": true, + "type": "boolean" + } + }, + "required": ["expires_at"], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": ["subscription_items"] + }, + "subscriptions_resource_subscription_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "issuer": { + "$ref": "#/components/schemas/connect_account_reference" + } + }, + "required": ["issuer"], + "title": "SubscriptionsResourceSubscriptionInvoiceSettings", + "type": "object", + "x-expandableFields": ["account_tax_ids", "issuer"] + }, + "subscriptions_trials_resource_end_behavior": { + "description": "Defines how a subscription behaves when a free trial ends.", + "properties": { + "missing_payment_method": { + "description": "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.", + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "SubscriptionsTrialsResourceEndBehavior", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_trials_resource_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { + "$ref": "#/components/schemas/subscriptions_trials_resource_end_behavior" + } + }, + "required": ["end_behavior"], + "title": "SubscriptionsTrialsResourceTrialSettings", + "type": "object", + "x-expandableFields": ["end_behavior"] + }, + "tax.calculation": { + "description": "A Tax Calculation allows you to calculate the tax to collect from your customer.\n\nRelated guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)", + "properties": { + "amount_total": { + "description": "Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_details": { + "$ref": "#/components/schemas/tax_product_resource_customer_details" + }, + "expires_at": { + "description": "Timestamp of date at which the tax calculation will expire.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the calculation.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line_items": { + "description": "The list of items the customer is purchasing.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.calculation_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/calculations/[^/]+/line_items", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxProductResourceTaxCalculationLineItemList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax.calculation"], + "type": "string" + }, + "ship_from_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_ship_from_details" + } + ], + "description": "The details of the ship from location, such as the address.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_calculation_shipping_cost" + } + ], + "description": "The shipping cost details for the calculation.", + "nullable": true + }, + "tax_amount_exclusive": { + "description": "The amount of tax to be collected on top of the line item prices.", + "type": "integer" + }, + "tax_amount_inclusive": { + "description": "The amount of tax already included in the line item prices.", + "type": "integer" + }, + "tax_breakdown": { + "description": "Breakdown of individual tax amounts that add up to the total.", + "items": { + "$ref": "#/components/schemas/tax_product_resource_tax_breakdown" + }, + "type": "array" + }, + "tax_date": { + "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "amount_total", + "currency", + "customer_details", + "livemode", + "object", + "tax_amount_exclusive", + "tax_amount_inclusive", + "tax_breakdown", + "tax_date" + ], + "title": "TaxProductResourceTaxCalculation", + "type": "object", + "x-expandableFields": [ + "customer_details", + "line_items", + "ship_from_details", + "shipping_cost", + "tax_breakdown" + ], + "x-resourceId": "tax.calculation" + }, + "tax.calculation_line_item": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax.calculation_line_item"], + "type": "string" + }, + "product": { + "description": "The ID of an existing [Product](https://stripe.com/docs/api/products/object).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The number of units of the item being purchased. For reversals, this is the quantity reversed.", + "type": "integer" + }, + "reference": { + "description": "A custom identifier for this line item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_breakdown": { + "description": "Detailed account of taxes relevant to this line item.", + "items": { + "$ref": "#/components/schemas/tax_product_resource_line_item_tax_breakdown" + }, + "nullable": true, + "type": "array" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "id", + "livemode", + "object", + "quantity", + "tax_behavior", + "tax_code" + ], + "title": "TaxProductResourceTaxCalculationLineItem", + "type": "object", + "x-expandableFields": ["tax_breakdown"], + "x-resourceId": "tax.calculation_line_item" + }, + "tax.registration": { + "description": "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).\n\nStripe 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).\n\nRelated guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api)", + "properties": { + "active_from": { + "description": "Time at which the registration becomes active. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "country_options": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "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.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax.registration"], + "type": "string" + }, + "status": { + "description": "The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`.", + "enum": ["active", "expired", "scheduled"], + "type": "string" + } + }, + "required": [ + "active_from", + "country", + "country_options", + "created", + "id", + "livemode", + "object", + "status" + ], + "title": "TaxProductRegistrationsResourceTaxRegistration", + "type": "object", + "x-expandableFields": ["country_options"], + "x-resourceId": "tax.registration" + }, + "tax.settings": { + "description": "You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.\n\nRelated guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)", + "properties": { + "defaults": { + "$ref": "#/components/schemas/tax_product_resource_tax_settings_defaults" + }, + "head_office": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_settings_head_office" + } + ], + "description": "The place where your business is located.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax.settings"], + "type": "string" + }, + "status": { + "description": "The status of the Tax `Settings`.", + "enum": ["active", "pending"], + "type": "string" + }, + "status_details": { + "$ref": "#/components/schemas/tax_product_resource_tax_settings_status_details" + } + }, + "required": [ + "defaults", + "livemode", + "object", + "status", + "status_details" + ], + "title": "TaxProductResourceTaxSettings", + "type": "object", + "x-expandableFields": ["defaults", "head_office", "status_details"], + "x-resourceId": "tax.settings" + }, + "tax.transaction": { + "description": "A Tax Transaction records the tax collected from or refunded to your customer.\n\nRelated guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_details": { + "$ref": "#/components/schemas/tax_product_resource_customer_details" + }, + "id": { + "description": "Unique identifier for the transaction.", + "maxLength": 5000, + "type": "string" + }, + "line_items": { + "description": "The tax collected or refunded, by line item.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.transaction_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/transactions/[^/]+/line_items", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxProductResourceTaxTransactionLineItemList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax.transaction"], + "type": "string" + }, + "posted_at": { + "description": "The Unix timestamp representing when the tax liability is assumed or reduced.", + "format": "unix-time", + "type": "integer" + }, + "reference": { + "description": "A custom unique identifier, such as 'myOrder_123'.", + "maxLength": 5000, + "type": "string" + }, + "reversal": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_transaction_resource_reversal" + } + ], + "description": "If `type=reversal`, contains information about what was reversed.", + "nullable": true + }, + "ship_from_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_ship_from_details" + } + ], + "description": "The details of the ship from location, such as the address.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_transaction_shipping_cost" + } + ], + "description": "The shipping cost details for the transaction.", + "nullable": true + }, + "tax_date": { + "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation.", + "format": "unix-time", + "type": "integer" + }, + "type": { + "description": "If `reversal`, this transaction reverses an earlier transaction.", + "enum": ["reversal", "transaction"], + "type": "string" + } + }, + "required": [ + "created", + "currency", + "customer_details", + "id", + "livemode", + "object", + "posted_at", + "reference", + "tax_date", + "type" + ], + "title": "TaxProductResourceTaxTransaction", + "type": "object", + "x-expandableFields": [ + "customer_details", + "line_items", + "reversal", + "ship_from_details", + "shipping_cost" + ], + "x-resourceId": "tax.transaction" + }, + "tax.transaction_line_item": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax.transaction_line_item"], + "type": "string" + }, + "product": { + "description": "The ID of an existing [Product](https://stripe.com/docs/api/products/object).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The number of units of the item being purchased. For reversals, this is the quantity reversed.", + "type": "integer" + }, + "reference": { + "description": "A custom identifier for this line item in the transaction.", + "maxLength": 5000, + "type": "string" + }, + "reversal": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_transaction_line_item_resource_reversal" + } + ], + "description": "If `type=reversal`, contains information about what was reversed.", + "nullable": true + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "If `reversal`, this line item reverses an earlier transaction.", + "enum": ["reversal", "transaction"], + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "id", + "livemode", + "object", + "quantity", + "reference", + "tax_behavior", + "tax_code", + "type" + ], + "title": "TaxProductResourceTaxTransactionLineItem", + "type": "object", + "x-expandableFields": ["reversal"], + "x-resourceId": "tax.transaction_line_item" + }, + "tax_code": { + "description": "[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.", + "properties": { + "description": { + "description": "A detailed description of which types of products the tax code represents.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "A short name for the tax code.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_code"], + "type": "string" + } + }, + "required": ["description", "id", "name", "object"], + "title": "TaxProductResourceTaxCode", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_code" + }, + "tax_deducted_at_source": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_deducted_at_source"], + "type": "string" + }, + "period_end": { + "description": "The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "tax_deduction_account_number": { + "description": "The TAN that was supplied to Stripe when TDS was assessed", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "id", + "object", + "period_end", + "period_start", + "tax_deduction_account_number" + ], + "title": "TaxDeductedAtSource", + "type": "object", + "x-expandableFields": [] + }, + "tax_i_ds_owner": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account being referenced when `type` is `account`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "The Connect Application being referenced when `type` is `application`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The customer being referenced when `type` is `customer`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "type": { + "description": "Type of owner referenced.", + "enum": ["account", "application", "customer", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "TaxIDsOwner", + "type": "object", + "x-expandableFields": ["account", "application", "customer"] + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account.\nCustomer and account tax IDs get displayed on related invoices and credit notes.\n\nRelated 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)", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country of the tax ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "ID of the customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_id"], + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_i_ds_owner" + } + ], + "description": "The account or customer the tax ID belongs to.", + "nullable": true + }, + "type": { + "description": "Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `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`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `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`, `kh_tin`, `kr_brn`, `kz_bin`, `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`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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" + ], + "type": "string" + }, + "value": { + "description": "Value of the tax ID.", + "maxLength": 5000, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_id_verification" + } + ], + "description": "Tax ID verification information.", + "nullable": true + } + }, + "required": ["created", "id", "livemode", "object", "type", "value"], + "title": "tax_id", + "type": "object", + "x-expandableFields": ["customer", "owner", "verification"], + "x-resourceId": "tax_id" + }, + "tax_id_verification": { + "description": "", + "properties": { + "status": { + "description": "Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.", + "enum": ["pending", "unavailable", "unverified", "verified"], + "type": "string" + }, + "verified_address": { + "description": "Verified address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Verified name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["status"], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options": { + "description": "", + "properties": { + "ae": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "al": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "am": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "ao": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "at": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "au": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "ba": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "bb": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "be": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "bg": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "bh": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "bs": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "by": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "ca": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_canada" + }, + "cd": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "ch": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "cl": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "co": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "cr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "cy": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "cz": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "de": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "dk": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "ec": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "ee": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "eg": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "es": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "fi": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "fr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "gb": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "ge": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "gn": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "gr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "hr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "hu": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "id": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "ie": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "is": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "it": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "jp": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "ke": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "kh": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "kr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "kz": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "lt": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "lu": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "lv": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "ma": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "md": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "me": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "mk": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "mr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "mt": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "mx": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "my": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "ng": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "nl": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "no": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "np": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "nz": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "om": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "pe": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "pl": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "pt": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "ro": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "rs": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "ru": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "sa": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "se": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "sg": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "si": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "sk": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_europe" + }, + "sn": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "sr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "th": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "tj": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "tr": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "tz": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "ug": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "us": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_united_states" + }, + "uy": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "uz": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "vn": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "za": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + }, + "zm": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_simplified" + }, + "zw": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_default" + } + }, + "title": "TaxProductRegistrationsResourceCountryOptions", + "type": "object", + "x-expandableFields": [ + "ae", + "al", + "am", + "ao", + "at", + "au", + "ba", + "bb", + "be", + "bg", + "bh", + "bs", + "by", + "ca", + "cd", + "ch", + "cl", + "co", + "cr", + "cy", + "cz", + "de", + "dk", + "ec", + "ee", + "eg", + "es", + "fi", + "fr", + "gb", + "ge", + "gn", + "gr", + "hr", + "hu", + "id", + "ie", + "is", + "it", + "jp", + "ke", + "kh", + "kr", + "kz", + "lt", + "lu", + "lv", + "ma", + "md", + "me", + "mk", + "mr", + "mt", + "mx", + "my", + "ng", + "nl", + "no", + "np", + "nz", + "om", + "pe", + "pl", + "pt", + "ro", + "rs", + "ru", + "sa", + "se", + "sg", + "si", + "sk", + "sn", + "sr", + "th", + "tj", + "tr", + "tz", + "ug", + "us", + "uy", + "uz", + "vn", + "za", + "zm", + "zw" + ] + }, + "tax_product_registrations_resource_country_options_ca_province_standard": { + "description": "", + "properties": { + "province": { + "description": "Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["province"], + "title": "TaxProductRegistrationsResourceCountryOptionsCaProvinceStandard", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options_canada": { + "description": "", + "properties": { + "province_standard": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_ca_province_standard" + }, + "type": { + "description": "Type of registration in Canada.", + "enum": ["province_standard", "simplified", "standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "TaxProductRegistrationsResourceCountryOptionsCanada", + "type": "object", + "x-expandableFields": ["province_standard"] + }, + "tax_product_registrations_resource_country_options_default": { + "description": "", + "properties": { + "type": { + "description": "Type of registration in `country`.", + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "TaxProductRegistrationsResourceCountryOptionsDefault", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options_eu_standard": { + "description": "", + "properties": { + "place_of_supply_scheme": { + "description": "Place of supply scheme used in an EU standard registration.", + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "TaxProductRegistrationsResourceCountryOptionsEuStandard", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options_europe": { + "description": "", + "properties": { + "standard": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_eu_standard" + }, + "type": { + "description": "Type of registration in an EU country.", + "enum": ["ioss", "oss_non_union", "oss_union", "standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "TaxProductRegistrationsResourceCountryOptionsEurope", + "type": "object", + "x-expandableFields": ["standard"] + }, + "tax_product_registrations_resource_country_options_simplified": { + "description": "", + "properties": { + "type": { + "description": "Type of registration in `country`.", + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "TaxProductRegistrationsResourceCountryOptionsSimplified", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options_united_states": { + "description": "", + "properties": { + "local_amusement_tax": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_us_local_amusement_tax" + }, + "local_lease_tax": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_us_local_lease_tax" + }, + "state": { + "description": "Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).", + "maxLength": 5000, + "type": "string" + }, + "state_sales_tax": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_us_state_sales_tax" + }, + "type": { + "description": "Type of registration in the US.", + "enum": [ + "local_amusement_tax", + "local_lease_tax", + "state_communications_tax", + "state_retail_delivery_fee", + "state_sales_tax" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["state", "type"], + "title": "TaxProductRegistrationsResourceCountryOptionsUnitedStates", + "type": "object", + "x-expandableFields": [ + "local_amusement_tax", + "local_lease_tax", + "state_sales_tax" + ] + }, + "tax_product_registrations_resource_country_options_us_local_amusement_tax": { + "description": "", + "properties": { + "jurisdiction": { + "description": "A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["jurisdiction"], + "title": "TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTax", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options_us_local_lease_tax": { + "description": "", + "properties": { + "jurisdiction": { + "description": "A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["jurisdiction"], + "title": "TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTax", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_registrations_resource_country_options_us_state_sales_tax": { + "description": "", + "properties": { + "elections": { + "description": "Elections for the state sales tax registration.", + "items": { + "$ref": "#/components/schemas/tax_product_registrations_resource_country_options_us_state_sales_tax_election" + }, + "type": "array" + } + }, + "title": "TaxProductRegistrationsResourceCountryOptionsUsStateSalesTax", + "type": "object", + "x-expandableFields": ["elections"] + }, + "tax_product_registrations_resource_country_options_us_state_sales_tax_election": { + "description": "", + "properties": { + "jurisdiction": { + "description": "A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of the election for the state sales tax registration.", + "enum": [ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "TaxProductRegistrationsResourceCountryOptionsUsStateSalesTaxElection", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_postal_address" + } + ], + "description": "The customer's postal address (for example, home or business location).", + "nullable": true + }, + "address_source": { + "description": "The type of customer address provided.", + "enum": ["billing", "shipping"], + "nullable": true, + "type": "string" + }, + "ip_address": { + "description": "The customer's IP address (IPv4 or IPv6).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_ids": { + "description": "The customer's tax IDs (for example, EU VAT numbers).", + "items": { + "$ref": "#/components/schemas/tax_product_resource_customer_details_resource_tax_id" + }, + "type": "array" + }, + "taxability_override": { + "description": "The taxability override used for taxation.", + "enum": ["customer_exempt", "none", "reverse_charge"], + "type": "string" + } + }, + "required": ["tax_ids", "taxability_override"], + "title": "TaxProductResourceCustomerDetails", + "type": "object", + "x-expandableFields": ["address", "tax_ids"] + }, + "tax_product_resource_customer_details_resource_tax_id": { + "description": "", + "properties": { + "type": { + "description": "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`, or `unknown`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type", "value"], + "title": "TaxProductResourceCustomerDetailsResourceTaxId", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_jurisdiction": { + "description": "", + "properties": { + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "A human-readable name for the jurisdiction imposing the tax.", + "maxLength": 5000, + "type": "string" + }, + "level": { + "description": "Indicates the level of the jurisdiction imposing the tax.", + "enum": ["city", "country", "county", "district", "state"], + "type": "string" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["country", "display_name", "level"], + "title": "TaxProductResourceJurisdiction", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_line_item_tax_breakdown": { + "description": "", + "properties": { + "amount": { + "description": "The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "jurisdiction": { + "$ref": "#/components/schemas/tax_product_resource_jurisdiction" + }, + "sourcing": { + "description": "Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).", + "enum": ["destination", "origin"], + "type": "string" + }, + "tax_rate_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_line_item_tax_rate_details" + } + ], + "description": "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.", + "nullable": true + }, + "taxability_reason": { + "description": "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.", + "enum": [ + "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" + ], + "type": "string" + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "required": [ + "amount", + "jurisdiction", + "sourcing", + "taxability_reason", + "taxable_amount" + ], + "title": "TaxProductResourceLineItemTaxBreakdown", + "type": "object", + "x-expandableFields": ["jurisdiction", "tax_rate_details"] + }, + "tax_product_resource_line_item_tax_rate_details": { + "description": "", + "properties": { + "display_name": { + "description": "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.)\".", + "maxLength": 5000, + "type": "string" + }, + "percentage_decimal": { + "description": "The tax rate percentage as a string. For example, 8.5% is represented as \"8.5\".", + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "description": "The tax type, such as `vat` or `sales_tax`.", + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["display_name", "percentage_decimal", "tax_type"], + "title": "TaxProductResourceLineItemTaxRateDetails", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_postal_address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: \"NY\" or \"TX\".", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["country"], + "title": "TaxProductResourcePostalAddress", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_ship_from_details": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/tax_product_resource_postal_address" + } + }, + "required": ["address"], + "title": "TaxProductResourceShipFromDetails", + "type": "object", + "x-expandableFields": ["address"] + }, + "tax_product_resource_tax_breakdown": { + "description": "", + "properties": { + "amount": { + "description": "The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "inclusive": { + "description": "Specifies whether the tax amount is included in the line item amount.", + "type": "boolean" + }, + "tax_rate_details": { + "$ref": "#/components/schemas/tax_product_resource_tax_rate_details" + }, + "taxability_reason": { + "description": "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.", + "enum": [ + "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" + ], + "type": "string" + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate_details", + "taxability_reason", + "taxable_amount" + ], + "title": "TaxProductResourceTaxBreakdown", + "type": "object", + "x-expandableFields": ["tax_rate_details"] + }, + "tax_product_resource_tax_calculation_shipping_cost": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "shipping_rate": { + "description": "The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_breakdown": { + "description": "Detailed account of taxes relevant to shipping cost.", + "items": { + "$ref": "#/components/schemas/tax_product_resource_line_item_tax_breakdown" + }, + "type": "array" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "amount_tax", "tax_behavior", "tax_code"], + "title": "TaxProductResourceTaxCalculationShippingCost", + "type": "object", + "x-expandableFields": ["tax_breakdown"] + }, + "tax_product_resource_tax_rate_details": { + "description": "", + "properties": { + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flat_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_rate_flat_amount" + } + ], + "description": "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.", + "nullable": true + }, + "percentage_decimal": { + "description": "The tax rate percentage as a string. For example, 8.5% is represented as `\"8.5\"`.", + "maxLength": 5000, + "type": "string" + }, + "rate_type": { + "description": "Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location.", + "enum": ["flat_amount", "percentage"], + "nullable": true, + "type": "string" + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_type": { + "description": "The tax type, such as `vat` or `sales_tax`.", + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["percentage_decimal"], + "title": "TaxProductResourceTaxRateDetails", + "type": "object", + "x-expandableFields": ["flat_amount"] + }, + "tax_product_resource_tax_settings_defaults": { + "description": "", + "properties": { + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "inferred_by_currency"], + "nullable": true, + "type": "string" + }, + "tax_code": { + "description": "Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TaxProductResourceTaxSettingsDefaults", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_tax_settings_head_office": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + } + }, + "required": ["address"], + "title": "TaxProductResourceTaxSettingsHeadOffice", + "type": "object", + "x-expandableFields": ["address"] + }, + "tax_product_resource_tax_settings_status_details": { + "description": "", + "properties": { + "active": { + "$ref": "#/components/schemas/tax_product_resource_tax_settings_status_details_resource_active" + }, + "pending": { + "$ref": "#/components/schemas/tax_product_resource_tax_settings_status_details_resource_pending" + } + }, + "title": "TaxProductResourceTaxSettingsStatusDetails", + "type": "object", + "x-expandableFields": ["active", "pending"] + }, + "tax_product_resource_tax_settings_status_details_resource_active": { + "description": "", + "properties": {}, + "title": "TaxProductResourceTaxSettingsStatusDetailsResourceActive", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_tax_settings_status_details_resource_pending": { + "description": "", + "properties": { + "missing_fields": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "TaxProductResourceTaxSettingsStatusDetailsResourcePending", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_tax_transaction_line_item_resource_reversal": { + "description": "", + "properties": { + "original_line_item": { + "description": "The `id` of the line item to reverse in the original transaction.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["original_line_item"], + "title": "TaxProductResourceTaxTransactionLineItemResourceReversal", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_tax_transaction_resource_reversal": { + "description": "", + "properties": { + "original_transaction": { + "description": "The `id` of the reversed `Transaction` object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TaxProductResourceTaxTransactionResourceReversal", + "type": "object", + "x-expandableFields": [] + }, + "tax_product_resource_tax_transaction_shipping_cost": { + "description": "", + "properties": { + "amount": { + "description": "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.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "shipping_rate": { + "description": "The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "amount_tax", "tax_behavior", "tax_code"], + "title": "TaxProductResourceTaxTransactionShippingCost", + "type": "object", + "x-expandableFields": [] + }, + "tax_rate": { + "description": "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.\n\nRelated guide: [Tax rates](/billing/taxes/tax-rates)", + "properties": { + "active": { + "description": "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.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.", + "maxLength": 5000, + "type": "string" + }, + "effective_percentage": { + "description": "Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,\nthis percentage reflects the rate actually used to calculate tax based on the product's taxability\nand whether the user is registered to collect taxes in the corresponding jurisdiction.", + "nullable": true, + "type": "number" + }, + "flat_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_rate_flat_amount" + } + ], + "description": "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.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "inclusive": { + "description": "This specifies if the tax rate is inclusive or exclusive.", + "type": "boolean" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "jurisdiction_level": { + "description": "The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.", + "enum": [ + "city", + "country", + "county", + "district", + "multiple", + "state" + ], + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_rate"], + "type": "string" + }, + "percentage": { + "description": "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.", + "type": "number" + }, + "rate_type": { + "description": "Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location.", + "enum": ["flat_amount", "percentage"], + "nullable": true, + "type": "string" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "active", + "created", + "display_name", + "id", + "inclusive", + "livemode", + "object", + "percentage" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": ["flat_amount"], + "x-resourceId": "tax_rate" + }, + "tax_rate_flat_amount": { + "description": "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.", + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "currency": { + "description": "Three-letter ISO currency code, in lowercase.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "TaxRateFlatAmount", + "type": "object", + "x-expandableFields": [] + }, + "terminal.configuration": { + "description": "A Configurations object represents how features should be configured for terminal readers.", + "properties": { + "bbpos_wisepos_e": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_account_default": { + "description": "Whether this Configuration is the default for your account", + "nullable": true, + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "String indicating the name of the Configuration object, set by the user", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.configuration"], + "type": "string" + }, + "offline": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_offline_config" + }, + "reboot_window": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_reboot_window" + }, + "stripe_s700": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + }, + "tipping": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_tipping" + }, + "verifone_p400": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + } + }, + "required": ["id", "livemode", "object"], + "title": "TerminalConfigurationConfiguration", + "type": "object", + "x-expandableFields": [ + "bbpos_wisepos_e", + "offline", + "reboot_window", + "stripe_s700", + "tipping", + "verifone_p400" + ], + "x-resourceId": "terminal.configuration" + }, + "terminal.connection_token": { + "description": "A Connection Token is used by the Stripe Terminal SDK to connect to a reader.\n\nRelated guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)", + "properties": { + "location": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.connection_token"], + "type": "string" + }, + "secret": { + "description": "Your application should pass this token to the Stripe Terminal SDK.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["object", "secret"], + "title": "TerminalConnectionToken", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "terminal.connection_token" + }, + "terminal.location": { + "description": "A Location represents a grouping of readers.\n\nRelated guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the location.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.location"], + "type": "string" + } + }, + "required": [ + "address", + "display_name", + "id", + "livemode", + "metadata", + "object" + ], + "title": "TerminalLocationLocation", + "type": "object", + "x-expandableFields": ["address"], + "x-resourceId": "terminal.location" + }, + "terminal.reader": { + "description": "A Reader represents a physical device for accepting payment details.\n\nRelated guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader)", + "properties": { + "action": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal_reader_reader_resource_reader_action" + } + ], + "description": "The most recent action performed by the reader.", + "nullable": true + }, + "device_sw_version": { + "description": "The current software version of the reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "device_type": { + "description": "Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`.", + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "mobile_phone_reader", + "simulated_wisepos_e", + "stripe_m2", + "stripe_s700", + "verifone_P400" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The local IP address of the reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "label": { + "description": "Custom label given to the reader for easier identification.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "location": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/terminal.location" + } + ], + "description": "The location identifier of the reader.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/terminal.location" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.reader"], + "type": "string" + }, + "serial_number": { + "description": "Serial number of the reader.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The networking status of the reader. We do not recommend using this field in flows that may block taking payments.", + "enum": ["offline", "online"], + "nullable": true, + "type": "string" + } + }, + "required": [ + "device_type", + "id", + "label", + "livemode", + "metadata", + "object", + "serial_number" + ], + "title": "TerminalReaderReader", + "type": "object", + "x-expandableFields": ["action", "location"], + "x-resourceId": "terminal.reader" + }, + "terminal_configuration_configuration_resource_currency_specific_config": { + "description": "", + "properties": { + "fixed_amounts": { + "description": "Fixed amounts displayed when collecting a tip", + "items": { + "type": "integer" + }, + "nullable": true, + "type": "array" + }, + "percentages": { + "description": "Percentages displayed when collecting a tip", + "items": { + "type": "integer" + }, + "nullable": true, + "type": "array" + }, + "smart_tip_threshold": { + "description": "Below this amount, fixed amounts will be displayed; above it, percentages will be displayed", + "type": "integer" + } + }, + "title": "TerminalConfigurationConfigurationResourceCurrencySpecificConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_configuration_configuration_resource_device_type_specific_config": { + "description": "", + "properties": { + "splashscreen": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "A File ID representing an image you would like displayed on the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig", + "type": "object", + "x-expandableFields": ["splashscreen"] + }, + "terminal_configuration_configuration_resource_offline_config": { + "description": "", + "properties": { + "enabled": { + "description": "Determines whether to allow transactions to be collected while reader is offline. Defaults to false.", + "nullable": true, + "type": "boolean" + } + }, + "title": "TerminalConfigurationConfigurationResourceOfflineConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_configuration_configuration_resource_reboot_window": { + "description": "", + "properties": { + "end_hour": { + "description": "Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.", + "type": "integer" + }, + "start_hour": { + "description": "Integer between 0 to 23 that represents the start hour of the reboot time window.", + "type": "integer" + } + }, + "required": ["end_hour", "start_hour"], + "title": "TerminalConfigurationConfigurationResourceRebootWindow", + "type": "object", + "x-expandableFields": [] + }, + "terminal_configuration_configuration_resource_tipping": { + "description": "", + "properties": { + "aud": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "cad": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "chf": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "czk": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "dkk": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "eur": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "gbp": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "hkd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "jpy": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "myr": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nok": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nzd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "pln": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sek": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sgd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "usd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + } + }, + "title": "TerminalConfigurationConfigurationResourceTipping", + "type": "object", + "x-expandableFields": [ + "aud", + "cad", + "chf", + "czk", + "dkk", + "eur", + "gbp", + "hkd", + "jpy", + "myr", + "nok", + "nzd", + "pln", + "sek", + "sgd", + "usd" + ] + }, + "terminal_reader_reader_resource_cart": { + "description": "Represents a cart to be displayed on the reader", + "properties": { + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "line_items": { + "description": "List of line items in the cart.", + "items": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_line_item" + }, + "type": "array" + }, + "tax": { + "description": "Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true, + "type": "integer" + }, + "total": { + "description": "Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "required": ["currency", "line_items", "total"], + "title": "TerminalReaderReaderResourceCart", + "type": "object", + "x-expandableFields": ["line_items"] + }, + "terminal_reader_reader_resource_line_item": { + "description": "Represents a line item to be displayed on the reader", + "properties": { + "amount": { + "description": "The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "description": { + "description": "Description of the line item.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The quantity of the line item.", + "type": "integer" + } + }, + "required": ["amount", "description", "quantity"], + "title": "TerminalReaderReaderResourceLineItem", + "type": "object", + "x-expandableFields": [] + }, + "terminal_reader_reader_resource_process_config": { + "description": "Represents a per-transaction override of a reader configuration", + "properties": { + "enable_customer_cancellation": { + "description": "Enable customer initiated cancellation when processing this payment.", + "type": "boolean" + }, + "skip_tipping": { + "description": "Override showing a tipping selection screen on this transaction.", + "type": "boolean" + }, + "tipping": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_tipping_config" + } + }, + "title": "TerminalReaderReaderResourceProcessConfig", + "type": "object", + "x-expandableFields": ["tipping"] + }, + "terminal_reader_reader_resource_process_payment_intent_action": { + "description": "Represents a reader action to process a payment intent", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "Most recent PaymentIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "process_config": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_config" + } + }, + "required": ["payment_intent"], + "title": "TerminalReaderReaderResourceProcessPaymentIntentAction", + "type": "object", + "x-expandableFields": ["payment_intent", "process_config"] + }, + "terminal_reader_reader_resource_process_setup_config": { + "description": "Represents a per-setup override of a reader configuration", + "properties": { + "enable_customer_cancellation": { + "description": "Enable customer initiated cancellation when processing this SetupIntent.", + "type": "boolean" + } + }, + "title": "TerminalReaderReaderResourceProcessSetupConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_reader_reader_resource_process_setup_intent_action": { + "description": "Represents a reader action to process a setup intent", + "properties": { + "generated_card": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "process_config": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_setup_config" + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "Most recent SetupIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + } + }, + "required": ["setup_intent"], + "title": "TerminalReaderReaderResourceProcessSetupIntentAction", + "type": "object", + "x-expandableFields": ["process_config", "setup_intent"] + }, + "terminal_reader_reader_resource_reader_action": { + "description": "Represents an action performed by the reader", + "properties": { + "failure_code": { + "description": "Failure code, only set if status is `failed`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Detailed failure message, only set if status is `failed`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "process_payment_intent": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_payment_intent_action" + }, + "process_setup_intent": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_setup_intent_action" + }, + "refund_payment": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_refund_payment_action" + }, + "set_reader_display": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_set_reader_display_action" + }, + "status": { + "description": "Status of the action performed by the reader.", + "enum": ["failed", "in_progress", "succeeded"], + "type": "string" + }, + "type": { + "description": "Type of action performed by the reader.", + "enum": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status", "type"], + "title": "TerminalReaderReaderResourceReaderAction", + "type": "object", + "x-expandableFields": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ] + }, + "terminal_reader_reader_resource_refund_payment_action": { + "description": "Represents a reader action to refund a payment", + "properties": { + "amount": { + "description": "The amount being refunded.", + "type": "integer" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "Charge that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "Payment intent that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason for the refund.", + "enum": ["duplicate", "fraudulent", "requested_by_customer"], + "type": "string" + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Unique identifier for the refund object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "refund_application_fee": { + "description": "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.", + "type": "boolean" + }, + "refund_payment_config": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_refund_payment_config" + }, + "reverse_transfer": { + "description": "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.", + "type": "boolean" + } + }, + "title": "TerminalReaderReaderResourceRefundPaymentAction", + "type": "object", + "x-expandableFields": [ + "charge", + "payment_intent", + "refund", + "refund_payment_config" + ] + }, + "terminal_reader_reader_resource_refund_payment_config": { + "description": "Represents a per-transaction override of a reader configuration", + "properties": { + "enable_customer_cancellation": { + "description": "Enable customer initiated cancellation when refunding this payment.", + "type": "boolean" + } + }, + "title": "TerminalReaderReaderResourceRefundPaymentConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_reader_reader_resource_set_reader_display_action": { + "description": "Represents a reader action to set the reader display", + "properties": { + "cart": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal_reader_reader_resource_cart" + } + ], + "description": "Cart object to be displayed by the reader.", + "nullable": true + }, + "type": { + "description": "Type of information to be displayed by the reader.", + "enum": ["cart"], + "type": "string" + } + }, + "required": ["type"], + "title": "TerminalReaderReaderResourceSetReaderDisplayAction", + "type": "object", + "x-expandableFields": ["cart"] + }, + "terminal_reader_reader_resource_tipping_config": { + "description": "Represents a per-transaction tipping configuration", + "properties": { + "amount_eligible": { + "description": "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).", + "type": "integer" + } + }, + "title": "TerminalReaderReaderResourceTippingConfig", + "type": "object", + "x-expandableFields": [] + }, + "test_helpers.test_clock": { + "description": "A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects 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,\nyou 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.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deletes_after": { + "description": "Time at which this clock is scheduled to auto delete.", + "format": "unix-time", + "type": "integer" + }, + "frozen_time": { + "description": "Time at which all objects belonging to this clock are frozen.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "The custom name supplied at creation.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["test_helpers.test_clock"], + "type": "string" + }, + "status": { + "description": "The status of the Test Clock.", + "enum": ["advancing", "internal_failure", "ready"], + "type": "string" + }, + "status_details": { + "$ref": "#/components/schemas/billing_clocks_resource_status_details_status_details" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "object", + "status", + "status_details" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": ["status_details"], + "x-resourceId": "test_helpers.test_clock" + }, + "three_d_secure_details": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": ["challenge", "frictionless"], + "nullable": true, + "type": "string" + }, + "electronic_commerce_indicator": { + "description": "The Electronic Commerce Indicator (ECI). A protocol-level field\nindicating what degree of authentication was performed.", + "enum": ["01", "02", "05", "06", "07"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "result": { + "description": "Indicates the outcome of 3D Secure authentication.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error" + ], + "nullable": true, + "type": "string" + }, + "result_reason": { + "description": "Additional information about why 3D Secure succeeded or failed based\non the `result`.", + "enum": [ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected" + ], + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID\n(dsTransId) for this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_details_charge": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": ["challenge", "frictionless"], + "nullable": true, + "type": "string" + }, + "electronic_commerce_indicator": { + "description": "The Electronic Commerce Indicator (ECI). A protocol-level field\nindicating what degree of authentication was performed.", + "enum": ["01", "02", "05", "06", "07"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "exemption_indicator": { + "description": "The exemption requested via 3DS and accepted by the issuer at authentication time.", + "enum": ["low_risk", "none"], + "nullable": true, + "type": "string" + }, + "exemption_indicator_applied": { + "description": "Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on\nthe outcome of Stripe's internal risk assessment.", + "type": "boolean" + }, + "result": { + "description": "Indicates the outcome of 3D Secure authentication.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error" + ], + "nullable": true, + "type": "string" + }, + "result_reason": { + "description": "Additional information about why 3D Secure succeeded or failed based\non the `result`.", + "enum": [ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected" + ], + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID\n(dsTransId) for this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details_charge", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_usage": { + "description": "", + "properties": { + "supported": { + "description": "Whether 3D Secure is supported on this card.", + "type": "boolean" + } + }, + "required": ["supported"], + "title": "three_d_secure_usage", + "type": "object", + "x-expandableFields": [] + }, + "thresholds_resource_usage_alert_filter": { + "description": "", + "properties": { + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "Limit the scope of the alert to this customer ID", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "type": { + "enum": ["customer"], + "type": "string" + } + }, + "required": ["type"], + "title": "ThresholdsResourceUsageAlertFilter", + "type": "object", + "x-expandableFields": ["customer"] + }, + "thresholds_resource_usage_threshold_config": { + "description": "The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed.", + "properties": { + "filters": { + "description": "The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.", + "items": { + "$ref": "#/components/schemas/thresholds_resource_usage_alert_filter" + }, + "nullable": true, + "type": "array" + }, + "gte": { + "description": "The value at which this alert will trigger.", + "type": "integer" + }, + "meter": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing.meter" + } + ], + "description": "The [Billing Meter](/api/billing/meter) ID whose usage is monitored.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing.meter" + } + ] + } + }, + "recurrence": { + "description": "Defines how the alert will behave.", + "enum": ["one_time"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["gte", "meter", "recurrence"], + "title": "ThresholdsResourceUsageThresholdConfig", + "type": "object", + "x-expandableFields": ["filters", "meter"] + }, + "token": { + "description": "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. Use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\non the client-side. This guarantees that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you can't use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. If\nyour integration uses this method, you're responsible for any PCI compliance\nthat it might require, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information isn't sent directly to\nStripe, so we can't determine how it's handled or stored.\n\nYou can't store or use tokens more than once. To store card or bank account\ninformation for later use, create [Customer](https://stripe.com/docs/api#customers)\nobjects or [External accounts](/api#external_accounts).\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.", + "properties": { + "bank_account": { + "$ref": "#/components/schemas/bank_account" + }, + "card": { + "$ref": "#/components/schemas/card" + }, + "client_ip": { + "description": "IP address of the client that generates the token.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["token"], + "type": "string" + }, + "type": { + "description": "Type of the token: `account`, `bank_account`, `card`, or `pii`.", + "maxLength": 5000, + "type": "string" + }, + "used": { + "description": "Determines if you have already used this token (you can only use tokens once).", + "type": "boolean" + } + }, + "required": ["created", "id", "livemode", "object", "type", "used"], + "title": "Token", + "type": "object", + "x-expandableFields": ["bank_account", "card"], + "x-resourceId": "token" + }, + "token_card_networks": { + "description": "", + "properties": { + "preferred": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "token_card_networks", + "type": "object", + "x-expandableFields": [] + }, + "topup": { + "description": "To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups)", + "properties": { + "amount": { + "description": "Amount transferred.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "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.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expected_availability_date": { + "description": "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.", + "nullable": true, + "type": "integer" + }, + "failure_code": { + "description": "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).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Message to user further explaining reason for top-up failure if available.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["topup"], + "type": "string" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/source" + } + ], + "description": "The source field is deprecated. It might not always be present in the API response.", + "nullable": true + }, + "statement_descriptor": { + "description": "Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.", + "enum": ["canceled", "failed", "pending", "reversed", "succeeded"], + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this top-up as part of a group.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "status" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": ["balance_transaction", "source"], + "x-resourceId": "topup" + }, + "transfer": { + "description": "A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers)", + "properties": { + "amount": { + "description": "Amount in cents (or local equivalent) to be transferred.", + "type": "integer" + }, + "amount_reversed": { + "description": "Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time that this record of the transfer was first created.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account the transfer was sent to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "destination_payment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["transfer"], + "type": "string" + }, + "reversals": { + "description": "A list of reversals that have been applied to the transfer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": ["data"] + }, + "reversed": { + "description": "Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.", + "type": "boolean" + }, + "source_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "source_type": { + "description": "The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "transfer_group": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_reversed", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer" + }, + "transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "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.\n 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\n representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00).", + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "transfer_data", + "type": "object", + "x-expandableFields": ["destination"] + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers)", + "properties": { + "amount": { + "description": "Amount, in cents (or local equivalent).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "destination_payment_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Linked payment refund for the transfer reversal.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["transfer_reversal"], + "type": "string" + }, + "source_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "ID of the refund responsible for the transfer reversal.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object", + "transfer" + ], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal" + }, + "transfer_schedule": { + "description": "", + "properties": { + "delay_days": { + "description": "The number of days charges for the account will be held before being paid out.", + "type": "integer" + }, + "interval": { + "description": "How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.", + "maxLength": 5000, + "type": "string" + }, + "monthly_anchor": { + "description": "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.", + "type": "integer" + }, + "weekly_anchor": { + "description": "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["delay_days", "interval"], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [] + }, + "transform_quantity": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": ["down", "up"], + "type": "string" + } + }, + "required": ["divide_by", "round"], + "title": "TransformQuantity", + "type": "object", + "x-expandableFields": [] + }, + "transform_usage": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": ["down", "up"], + "type": "string" + } + }, + "required": ["divide_by", "round"], + "title": "TransformUsage", + "type": "object", + "x-expandableFields": [] + }, + "treasury.credit_reversal": { + "description": "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.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": ["ach", "stripe"], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.credit_reversal"], + "type": "string" + }, + "received_credit": { + "description": "The ReceivedCredit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the CreditReversal", + "enum": ["canceled", "posted", "processing"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_received_credits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "financial_account", + "id", + "livemode", + "metadata", + "network", + "object", + "received_credit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedCreditsResourceCreditReversal", + "type": "object", + "x-expandableFields": ["status_transitions", "transaction"], + "x-resourceId": "treasury.credit_reversal" + }, + "treasury.debit_reversal": { + "description": "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.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_debits_resource_debit_reversal_linked_flows" + } + ], + "description": "Other flows linked to a DebitReversal.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": ["ach", "card"], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.debit_reversal"], + "type": "string" + }, + "received_debit": { + "description": "The ReceivedDebit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the DebitReversal", + "enum": ["failed", "processing", "succeeded"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_received_debits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "network", + "object", + "received_debit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedDebitsResourceDebitReversal", + "type": "object", + "x-expandableFields": [ + "linked_flows", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.debit_reversal" + }, + "treasury.financial_account": { + "description": "Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.\nFinancialAccounts serve as the source and destination of Treasury’s money movement APIs.", + "properties": { + "active_features": { + "description": "The array of paths to active Features in the Features hash.", + "items": { + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "balance": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_balance" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "features": { + "$ref": "#/components/schemas/treasury.financial_account_features" + }, + "financial_addresses": { + "description": "The set of credentials that resolve to a FinancialAccount.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_address" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "nullable": true, + "type": "object" + }, + "nickname": { + "description": "The nickname for the FinancialAccount.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.financial_account"], + "type": "string" + }, + "pending_features": { + "description": "The array of paths to pending Features in the Features hash.", + "items": { + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "platform_restrictions": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_platform_restrictions" + } + ], + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "nullable": true + }, + "restricted_features": { + "description": "The array of paths to restricted Features in the Features hash.", + "items": { + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "status": { + "description": "Status of this FinancialAccount.", + "enum": ["closed", "open"], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_details": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_status_details" + }, + "supported_currencies": { + "description": "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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "balance", + "country", + "created", + "financial_addresses", + "id", + "livemode", + "object", + "status", + "status_details", + "supported_currencies" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccount", + "type": "object", + "x-expandableFields": [ + "balance", + "features", + "financial_addresses", + "platform_restrictions", + "status_details" + ], + "x-resourceId": "treasury.financial_account" + }, + "treasury.financial_account_features": { + "description": "Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.\nStripe or the platform can control Features via the requested field.", + "properties": { + "card_issuing": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "deposit_insurance": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "financial_addresses": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_addresses_features" + }, + "inbound_transfers": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_inbound_transfers" + }, + "intra_stripe_flows": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.financial_account_features"], + "type": "string" + }, + "outbound_payments": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_payments" + }, + "outbound_transfers": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_transfers" + } + }, + "required": ["object"], + "title": "TreasuryFinancialAccountsResourceFinancialAccountFeatures", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "deposit_insurance", + "financial_addresses", + "inbound_transfers", + "intra_stripe_flows", + "outbound_payments", + "outbound_transfers" + ], + "x-resourceId": "treasury.financial_account_features" + }, + "treasury.inbound_transfer": { + "description": "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.\n\nRelated guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the InboundTransfer is able to be canceled.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_failure_details" + } + ], + "description": "Details about this InboundTransfer's failure. Only set when status is `failed`.", + "nullable": true + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.inbound_transfer"], + "type": "string" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for an InboundTransfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "origin_payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/inbound_transfers" + } + ], + "description": "Details about the PaymentMethod for an InboundTransfer.", + "nullable": true + }, + "returned": { + "description": "Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.", + "nullable": true, + "type": "boolean" + }, + "statement_descriptor": { + "description": "Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "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.", + "enum": ["canceled", "failed", "processing", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "financial_account", + "id", + "linked_flows", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions" + ], + "title": "TreasuryInboundTransfersResourceInboundTransfer", + "type": "object", + "x-expandableFields": [ + "failure_details", + "linked_flows", + "origin_payment_method_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.inbound_transfer" + }, + "treasury.outbound_payment": { + "description": "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).\n\nSimulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.\n\nRelated guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/outbound_payments_payment_method_details" + } + ], + "description": "Details about the PaymentMethod for an OutboundPayment.", + "nullable": true + }, + "end_user_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details" + } + ], + "description": "Details about the end user.", + "nullable": true + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.outbound_payment"], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_returned_status" + } + ], + "description": "Details about a returned OutboundPayment. Only set when the status is `returned`.", + "nullable": true + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "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`.", + "enum": ["canceled", "failed", "posted", "processing", "returned"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions" + }, + "tracking_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_tracking_details" + } + ], + "description": "Details about network-specific tracking information if available.", + "nullable": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPayment", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "end_user_details", + "returned_details", + "status_transitions", + "tracking_details", + "transaction" + ], + "x-resourceId": "treasury.outbound_payment" + }, + "treasury.outbound_transfer": { + "description": "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.\n\nSimulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.\n\nRelated guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod used as the payment instrument for an OutboundTransfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method_details": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details" + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.outbound_transfer"], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_returned_details" + } + ], + "description": "Details about a returned OutboundTransfer. Only set when the status is `returned`.", + "nullable": true + }, + "statement_descriptor": { + "description": "Information about the OutboundTransfer to be sent to the recipient account.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "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`.", + "enum": ["canceled", "failed", "posted", "processing", "returned"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_status_transitions" + }, + "tracking_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_outbound_transfer_resource_tracking_details" + } + ], + "description": "Details about network-specific tracking information if available.", + "nullable": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "destination_payment_method_details", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundTransfersResourceOutboundTransfer", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "returned_details", + "status_transitions", + "tracking_details", + "transaction" + ], + "x-resourceId": "treasury.outbound_transfer" + }, + "treasury.received_credit": { + "description": "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.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.", + "enum": [ + "account_closed", + "account_frozen", + "international_transaction", + "other" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_received_credits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The rails used to send the funds.", + "enum": ["ach", "card", "stripe", "us_domestic_wire"], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.received_credit"], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_credits_resource_reversal_details" + } + ], + "description": "Details describing when a ReceivedCredit may be reversed.", + "nullable": true + }, + "status": { + "description": "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.", + "enum": ["failed", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "initiating_payment_method_details", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedCreditsResourceReceivedCredit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_credit" + }, + "treasury.received_debit": { + "description": "ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.", + "enum": [ + "account_closed", + "account_frozen", + "insufficient_funds", + "international_transaction", + "other" + ], + "nullable": true, + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_received_debits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The network used for the ReceivedDebit.", + "enum": ["ach", "card", "stripe"], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.received_debit"], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_debits_resource_reversal_details" + } + ], + "description": "Details describing when a ReceivedDebit might be reversed.", + "nullable": true + }, + "status": { + "description": "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`.", + "enum": ["failed", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedDebitsResourceReceivedDebit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_debit" + }, + "treasury.transaction": { + "description": "Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "balance_impact": { + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "entries": { + "description": "A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": "object", + "x-expandableFields": ["data"] + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "ID of the flow that created the Transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + } + ], + "description": "Details of the flow that created the Transaction.", + "nullable": true + }, + "flow_type": { + "description": "Type of the flow that created the Transaction.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.transaction"], + "type": "string" + }, + "status": { + "description": "Status of the Transaction.", + "enum": ["open", "posted", "void"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_transactions_resource_abstract_transaction_resource_status_transitions" + } + }, + "required": [ + "amount", + "balance_impact", + "created", + "currency", + "description", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "status", + "status_transitions" + ], + "title": "TreasuryTransactionsResourceTransaction", + "type": "object", + "x-expandableFields": [ + "balance_impact", + "entries", + "flow_details", + "status_transitions" + ], + "x-resourceId": "treasury.transaction" + }, + "treasury.transaction_entry": { + "description": "TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).", + "properties": { + "balance_impact": { + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "effective_at": { + "description": "When the TransactionEntry will impact the FinancialAccount's balance.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "Token of the flow associated with the TransactionEntry.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + } + ], + "description": "Details of the flow associated with the TransactionEntry.", + "nullable": true + }, + "flow_type": { + "description": "Type of the flow associated with the TransactionEntry.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.transaction_entry"], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + }, + "type": { + "description": "The specific money movement that generated the TransactionEntry.", + "enum": [ + "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" + ], + "type": "string" + } + }, + "required": [ + "balance_impact", + "created", + "currency", + "effective_at", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "transaction", + "type" + ], + "title": "TreasuryTransactionsResourceTransactionEntry", + "type": "object", + "x-expandableFields": ["balance_impact", "flow_details", "transaction"], + "x-resourceId": "treasury.transaction_entry" + }, + "treasury_financial_accounts_resource_aba_record": { + "description": "ABA Records contain U.S. bank account details per the ABA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_number_last4": { + "description": "The last four characters of the account number.", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number for the account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number_last4", + "bank_name", + "routing_number" + ], + "title": "TreasuryFinancialAccountsResourceABARecord", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_aba_toggle_settings": { + "description": "Toggle settings for enabling/disabling the ABA address feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": ["active", "pending", "restricted"], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": ["requested", "status", "status_details"], + "title": "TreasuryFinancialAccountsResourceAbaToggleSettings", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "treasury_financial_accounts_resource_balance": { + "description": "Balance information for the FinancialAccount", + "properties": { + "cash": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds the user can spend right now.", + "type": "object" + }, + "inbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds not spendable yet, but will become available at a later time.", + "type": "object" + }, + "outbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "object" + } + }, + "required": ["cash", "inbound_pending", "outbound_pending"], + "title": "TreasuryFinancialAccountsResourceBalance", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_closed_status_details": { + "description": "", + "properties": { + "reasons": { + "description": "The array that contains reasons for a FinancialAccount closure.", + "items": { + "enum": ["account_rejected", "closed_by_platform", "other"], + "type": "string" + }, + "type": "array" + } + }, + "required": ["reasons"], + "title": "TreasuryFinancialAccountsResourceClosedStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "aba": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_aba_record" + }, + "supported_networks": { + "description": "The list of networks that the address supports", + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": ["aba"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "TreasuryFinancialAccountsResourceFinancialAddress", + "type": "object", + "x-expandableFields": ["aba"] + }, + "treasury_financial_accounts_resource_financial_addresses_features": { + "description": "Settings related to Financial Addresses features on a Financial Account", + "properties": { + "aba": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_aba_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceFinancialAddressesFeatures", + "type": "object", + "x-expandableFields": ["aba"] + }, + "treasury_financial_accounts_resource_inbound_ach_toggle_settings": { + "description": "Toggle settings for enabling/disabling an inbound ACH specific feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": ["active", "pending", "restricted"], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": ["requested", "status", "status_details"], + "title": "TreasuryFinancialAccountsResourceInboundAchToggleSettings", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "treasury_financial_accounts_resource_inbound_transfers": { + "description": "InboundTransfers contains inbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_inbound_ach_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceInboundTransfers", + "type": "object", + "x-expandableFields": ["ach"] + }, + "treasury_financial_accounts_resource_outbound_ach_toggle_settings": { + "description": "Toggle settings for enabling/disabling an outbound ACH specific feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": ["active", "pending", "restricted"], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": ["requested", "status", "status_details"], + "title": "TreasuryFinancialAccountsResourceOutboundAchToggleSettings", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "treasury_financial_accounts_resource_outbound_payments": { + "description": "Settings related to Outbound Payments features on a Financial Account", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundPayments", + "type": "object", + "x-expandableFields": ["ach", "us_domestic_wire"] + }, + "treasury_financial_accounts_resource_outbound_transfers": { + "description": "OutboundTransfers contains outbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundTransfers", + "type": "object", + "x-expandableFields": ["ach", "us_domestic_wire"] + }, + "treasury_financial_accounts_resource_platform_restrictions": { + "description": "Restrictions that a Connect Platform has placed on this FinancialAccount.", + "properties": { + "inbound_flows": { + "description": "Restricts all inbound money movement.", + "enum": ["restricted", "unrestricted"], + "nullable": true, + "type": "string" + }, + "outbound_flows": { + "description": "Restricts all outbound money movement.", + "enum": ["restricted", "unrestricted"], + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryFinancialAccountsResourcePlatformRestrictions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_status_details": { + "description": "", + "properties": { + "closed": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_closed_status_details" + } + ], + "description": "Details related to the closure of this FinancialAccount", + "nullable": true + } + }, + "title": "TreasuryFinancialAccountsResourceStatusDetails", + "type": "object", + "x-expandableFields": ["closed"] + }, + "treasury_financial_accounts_resource_toggle_settings": { + "description": "Toggle settings for enabling/disabling a feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": ["active", "pending", "restricted"], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": ["requested", "status", "status_details"], + "title": "TreasuryFinancialAccountsResourceToggleSettings", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "treasury_financial_accounts_resource_toggles_setting_status_details": { + "description": "Additional details on the FinancialAccount Features information.", + "properties": { + "code": { + "description": "Represents the reason why the status is `pending` or `restricted`.", + "enum": [ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "resolution": { + "description": "Represents what the user should do, if anything, to activate the Feature.", + "enum": [ + "contact_stripe", + "provide_information", + "remove_restriction" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "restriction": { + "description": "The `platform_restrictions` that are restricting this Feature.", + "enum": ["inbound_flows", "outbound_flows"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["code"], + "title": "TreasuryFinancialAccountsResourceTogglesSettingStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_failure_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the failure.", + "enum": [ + "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" + ], + "type": "string" + } + }, + "required": ["code"], + "title": "TreasuryInboundTransfersResourceFailureDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows": { + "description": "", + "properties": { + "received_debit": { + "description": "If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `canceled`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `failed`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "succeeded_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `succeeded`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_ach_tracking_details": { + "description": "", + "properties": { + "trace_id": { + "description": "ACH trace ID of the OutboundPayment for payments sent over the `ach` network.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["trace_id"], + "title": "TreasuryOutboundPaymentsResourceACHTrackingDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_end_user_details": { + "description": "", + "properties": { + "ip_address": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "present": { + "description": "`true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.", + "type": "boolean" + } + }, + "required": ["present"], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `canceled`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `failed`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "posted_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `posted`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "returned_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `returned`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_tracking_details": { + "description": "", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_ach_tracking_details" + }, + "type": { + "description": "The US bank account network used to send funds.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_us_domestic_wire_tracking_details" + } + }, + "required": ["type"], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetails", + "type": "object", + "x-expandableFields": ["ach", "us_domestic_wire"] + }, + "treasury_outbound_payments_resource_returned_status": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": ["code", "transaction"], + "title": "TreasuryOutboundPaymentsResourceReturnedStatus", + "type": "object", + "x-expandableFields": ["transaction"] + }, + "treasury_outbound_payments_resource_us_domestic_wire_tracking_details": { + "description": "", + "properties": { + "chips": { + "description": "CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "imad": { + "description": "IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "omad": { + "description": "OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryOutboundPaymentsResourceUSDomesticWireTrackingDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_transfers_resource_ach_tracking_details": { + "description": "", + "properties": { + "trace_id": { + "description": "ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["trace_id"], + "title": "TreasuryOutboundTransfersResourceACHTrackingDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_transfers_resource_outbound_transfer_resource_tracking_details": { + "description": "", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_ach_tracking_details" + }, + "type": { + "description": "The US bank account network used to send funds.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_us_domestic_wire_tracking_details" + } + }, + "required": ["type"], + "title": "TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetails", + "type": "object", + "x-expandableFields": ["ach", "us_domestic_wire"] + }, + "treasury_outbound_transfers_resource_returned_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": ["code", "transaction"], + "title": "TreasuryOutboundTransfersResourceReturnedDetails", + "type": "object", + "x-expandableFields": ["transaction"] + }, + "treasury_outbound_transfers_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `canceled`", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `failed`", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "posted_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `posted`", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "returned_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `returned`", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryOutboundTransfersResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_transfers_resource_us_domestic_wire_tracking_details": { + "description": "", + "properties": { + "chips": { + "description": "CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "imad": { + "description": "IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "omad": { + "description": "OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryOutboundTransfersResourceUSDomesticWireTrackingDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_linked_flows": { + "description": "", + "properties": { + "credit_reversal": { + "description": "The CreditReversal created as a result of this ReceivedCredit being reversed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_authorization": { + "description": "Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_transaction": { + "description": "Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "source_flow": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "source_flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_credits_resource_source_flows_details" + } + ], + "description": "The expandable object of the source flow.", + "nullable": true + }, + "source_flow_type": { + "description": "The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedCreditsResourceLinkedFlows", + "type": "object", + "x-expandableFields": ["source_flow_details"] + }, + "treasury_received_credits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedCredit can be reversed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "restricted_reason": { + "description": "Set if a ReceivedCredit cannot be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted" + ], + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedCreditsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_source_flows_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "outbound_payment": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "outbound_transfer": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "payout": { + "$ref": "#/components/schemas/payout" + }, + "type": { + "description": "The type of the source flow that originated the ReceivedCredit.", + "enum": [ + "credit_reversal", + "other", + "outbound_payment", + "outbound_transfer", + "payout" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "TreasuryReceivedCreditsResourceSourceFlowsDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "outbound_payment", + "outbound_transfer", + "payout" + ] + }, + "treasury_received_credits_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the CreditReversal changed status to `posted`", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryReceivedCreditsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_debit_reversal_linked_flows": { + "description": "", + "properties": { + "issuing_dispute": { + "description": "Set if there is an Issuing dispute associated with the DebitReversal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedDebitsResourceDebitReversalLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_linked_flows": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The DebitReversal created as a result of this ReceivedDebit being reversed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "inbound_transfer": { + "description": "Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_authorization": { + "description": "Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_transaction": { + "description": "Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payout": { + "description": "Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedDebitsResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedDebit can be reversed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "restricted_reason": { + "description": "Set if a ReceivedDebit can't be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted" + ], + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedDebitsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_status_transitions": { + "description": "", + "properties": { + "completed_at": { + "description": "Timestamp describing when the DebitReversal changed status to `completed`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryReceivedDebitsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_shared_resource_billing_details": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["address"], + "title": "TreasurySharedResourceBillingDetails", + "type": "object", + "x-expandableFields": ["address"] + }, + "treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details": { + "description": "", + "properties": { + "balance": { + "description": "Set when `type` is `balance`.", + "enum": ["payments"], + "type": "string" + }, + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/received_payment_method_details_financial_account" + }, + "issuing_card": { + "description": "Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.", + "enum": [ + "balance", + "financial_account", + "issuing_card", + "stripe", + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "treasury_shared_resource_initiating_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "bank_name": { + "description": "Bank name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "The routing number for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_abstract_transaction_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the Transaction changed status to `posted`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "void_at": { + "description": "Timestamp describing when the Transaction changed status to `void`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_balance_impact": { + "description": "Change to a FinancialAccount's balance", + "properties": { + "cash": { + "description": "The change made to funds the user can spend right now.", + "type": "integer" + }, + "inbound_pending": { + "description": "The change made to funds that are not spendable yet, but will become available at a later time.", + "type": "integer" + }, + "outbound_pending": { + "description": "The change made to funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "integer" + } + }, + "required": ["cash", "inbound_pending", "outbound_pending"], + "title": "TreasuryTransactionsResourceBalanceImpact", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_flow_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "debit_reversal": { + "$ref": "#/components/schemas/treasury.debit_reversal" + }, + "inbound_transfer": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + }, + "issuing_authorization": { + "$ref": "#/components/schemas/issuing.authorization" + }, + "outbound_payment": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "outbound_transfer": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "received_credit": { + "$ref": "#/components/schemas/treasury.received_credit" + }, + "received_debit": { + "$ref": "#/components/schemas/treasury.received_debit" + }, + "type": { + "description": "Type of the flow that created the Transaction. Set to the same value as `flow_type`.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "TreasuryTransactionsResourceFlowDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ] + }, + "us_bank_account_networks": { + "description": "", + "properties": { + "preferred": { + "description": "The preferred network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "supported": { + "description": "All supported networks.", + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "required": ["supported"], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [] + }, + "usage_record": { + "description": "Usage records allow you to report customer usage and metrics to Stripe for\nmetered billing of subscription prices.\n\nRelated guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing)\n\nThis is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based).", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["usage_record"], + "type": "string" + }, + "quantity": { + "description": "The usage quantity for the specified date.", + "type": "integer" + }, + "subscription_item": { + "description": "The ID of the subscription item this usage record contains data for.", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "The timestamp when this usage occurred.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "quantity", + "subscription_item", + "timestamp" + ], + "title": "UsageRecord", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "usage_record" + }, + "usage_record_summary": { + "description": "A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period.", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice in which this usage period has been billed for.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["usage_record_summary"], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/period" + }, + "subscription_item": { + "description": "The ID of the subscription item this summary is describing.", + "maxLength": 5000, + "type": "string" + }, + "total_usage": { + "description": "The total usage within this usage period.", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "period", + "subscription_item", + "total_usage" + ], + "title": "UsageRecordSummary", + "type": "object", + "x-expandableFields": ["period"], + "x-resourceId": "usage_record_summary" + }, + "verification_session_redaction": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether this object and its related objects have been redacted or not.", + "enum": ["processing", "redacted"], + "type": "string" + } + }, + "required": ["status"], + "title": "verification_session_redaction", + "type": "object", + "x-expandableFields": [] + }, + "webhook_endpoint": { + "description": "You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure)", + "properties": { + "api_version": { + "description": "The API version events are rendered as for this webhook endpoint.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application": { + "description": "The ID of the associated Connect application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["webhook_endpoint"], + "type": "string" + }, + "secret": { + "description": "The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the webhook. It can be `enabled` or `disabled`.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the webhook endpoint.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "enabled_events", + "id", + "livemode", + "metadata", + "object", + "status", + "url" + ], + "title": "NotificationWebhookEndpoint", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "webhook_endpoint" + } + }, + "securitySchemes": { + "basicAuth": { + "description": "Basic HTTP authentication. Allowed headers-- Authorization: Basic | Authorization: Basic ", + "scheme": "basic", + "type": "http" + }, + "bearerAuth": { + "bearerFormat": "auth-scheme", + "description": "Bearer HTTP authentication. Allowed headers-- Authorization: Bearer ", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "dev-platform@stripe.com", + "name": "Stripe Dev Platform Team", + "url": "https://stripe.com" + }, + "description": "The Stripe REST API. Please see https://stripe.com/docs/api for more details.", + "termsOfService": "https://stripe.com/us/terms/", + "title": "Stripe API", + "version": "2025-02-24.acacia", + "x-stripeSpecFilename": "spec3" + }, + "openapi": "3.0.0", + "paths": { + "/v1/account": { + "get": { + "description": "

Retrieves the details of an account.

", + "operationId": "GetAccount", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve account" + } + }, + "/v1/account_links": { + "post": { + "description": "

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.

", + "operationId": "PostAccountLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "collection_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "The identifier of the account to create an account link for.", + "maxLength": 5000, + "type": "string" + }, + "collect": { + "description": "The collect parameter is deprecated. Use `collection_options` instead.", + "enum": ["currently_due", "eventually_due"], + "type": "string" + }, + "collection_options": { + "description": "Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.", + "properties": { + "fields": { + "enum": ["currently_due", "eventually_due"], + "type": "string" + }, + "future_requirements": { + "enum": ["include", "omit"], + "type": "string" + } + }, + "title": "collection_options_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "refresh_url": { + "description": "The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.", + "type": "string" + }, + "return_url": { + "description": "The URL that the user will be redirected to upon leaving or completing the linked flow.", + "type": "string" + }, + "type": { + "description": "The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.", + "enum": ["account_onboarding", "account_update"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["account", "type"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an account link" + } + }, + "/v1/account_sessions": { + "post": { + "description": "

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.

", + "operationId": "PostAccountSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "components": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "The identifier of the account to create an Account Session for.", + "type": "string" + }, + "components": { + "description": "Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).", + "properties": { + "account_management": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "external_account_collection": { + "type": "boolean" + } + }, + "title": "account_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "account_config_param", + "type": "object" + }, + "account_onboarding": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "external_account_collection": { + "type": "boolean" + } + }, + "title": "account_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "account_config_param", + "type": "object" + }, + "balances": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "edit_payout_schedule": { + "type": "boolean" + }, + "external_account_collection": { + "type": "boolean" + }, + "instant_payouts": { + "type": "boolean" + }, + "standard_payouts": { + "type": "boolean" + } + }, + "title": "payouts_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "payouts_config_param", + "type": "object" + }, + "documents": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": {}, + "title": "base_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "base_config_param", + "type": "object" + }, + "financial_account": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "external_account_collection": { + "type": "boolean" + }, + "send_money": { + "type": "boolean" + }, + "transfer_balance": { + "type": "boolean" + } + }, + "title": "financial_account_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "financial_account_config_param", + "type": "object" + }, + "financial_account_transactions": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "card_spend_dispute_management": { + "type": "boolean" + } + }, + "title": "financial_account_transactions_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "financial_account_transactions_config_param", + "type": "object" + }, + "issuing_card": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "card_management": { + "type": "boolean" + }, + "card_spend_dispute_management": { + "type": "boolean" + }, + "cardholder_management": { + "type": "boolean" + }, + "spend_control_management": { + "type": "boolean" + } + }, + "title": "issuing_card_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "issuing_card_config_param", + "type": "object" + }, + "issuing_cards_list": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "card_management": { + "type": "boolean" + }, + "card_spend_dispute_management": { + "type": "boolean" + }, + "cardholder_management": { + "type": "boolean" + }, + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "spend_control_management": { + "type": "boolean" + } + }, + "title": "issuing_cards_list_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "issuing_cards_list_config_param", + "type": "object" + }, + "notification_banner": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "external_account_collection": { + "type": "boolean" + } + }, + "title": "account_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "account_config_param", + "type": "object" + }, + "payment_details": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "capture_payments": { + "type": "boolean" + }, + "destination_on_behalf_of_charge_management": { + "type": "boolean" + }, + "dispute_management": { + "type": "boolean" + }, + "refund_management": { + "type": "boolean" + } + }, + "title": "payments_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "payments_config_param", + "type": "object" + }, + "payments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "capture_payments": { + "type": "boolean" + }, + "destination_on_behalf_of_charge_management": { + "type": "boolean" + }, + "dispute_management": { + "type": "boolean" + }, + "refund_management": { + "type": "boolean" + } + }, + "title": "payments_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "payments_config_param", + "type": "object" + }, + "payouts": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "disable_stripe_user_authentication": { + "type": "boolean" + }, + "edit_payout_schedule": { + "type": "boolean" + }, + "external_account_collection": { + "type": "boolean" + }, + "instant_payouts": { + "type": "boolean" + }, + "standard_payouts": { + "type": "boolean" + } + }, + "title": "payouts_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "payouts_config_param", + "type": "object" + }, + "payouts_list": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": {}, + "title": "base_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "base_config_param", + "type": "object" + }, + "tax_registrations": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": {}, + "title": "base_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "base_config_param", + "type": "object" + }, + "tax_settings": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": {}, + "title": "base_features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "base_config_param", + "type": "object" + } + }, + "title": "account_session_create_components_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["account", "components"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an Account Session" + } + }, + "/v1/accounts": { + "get": { + "description": "

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

", + "operationId": "GetAccounts", + "parameters": [ + { + "description": "Only return connected accounts that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/accounts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "AccountList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all connected accounts" + }, + "post": { + "description": "

With Connect, you can create Stripe accounts for your users.\nTo do this, you’ll first need to register your platform.

\n\n

If you’ve already collected information for your connected accounts, you can prefill that information when\ncreating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding.\nYou can prefill any information on the account.

", + "operationId": "PostAccounts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "capabilities": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "controller": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "groups": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + }, + "tos_acceptance": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_token": { + "description": "An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "futsu", "savings", "toza"], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "documents": { + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "external_account_documents_param", + "type": "object" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "business_profile": { + "description": "Business information about the account.", + "properties": { + "annual_revenue": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "fiscal_year_end": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency", "fiscal_year_end"], + "title": "annual_revenue_specs", + "type": "object" + }, + "estimated_worker_count": { + "type": "integer" + }, + "mcc": { + "maxLength": 4, + "type": "string" + }, + "monthly_estimated_revenue": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "monthly_estimated_revenue_specs", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 40000, + "type": "string" + }, + "support_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "support_email": { + "type": "string" + }, + "support_phone": { + "maxLength": 5000, + "type": "string" + }, + "support_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "title": "business_profile_specs", + "type": "object" + }, + "business_type": { + "description": "The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "description": "Each key of the dictionary represents a capability, and each capability\nmaps to its settings (for example, whether it has been requested or not). Each\ncapability is inactive until you have provided its specific\nrequirements and Stripe has verified them. An account might have some\nof its requested capabilities be active and some be inactive.\n\nRequired when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)\nis `none`, which includes Custom accounts.", + "properties": { + "acss_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "affirm_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "afterpay_clearpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "alma_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "amazon_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "au_becs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bacs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bancontact_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "blik_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "boleto_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cartes_bancaires_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cashapp_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "eps_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "fpx_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "gb_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "giropay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "grabpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "ideal_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "india_international_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jcb_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jp_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "kakao_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "klarna_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "konbini_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "kr_card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "legacy_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "link_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "mobilepay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "multibanco_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "mx_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "naver_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "oxxo_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "p24_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "pay_by_bank_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "payco_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "paynow_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "promptpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "revolut_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "samsung_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sofort_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "swish_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_k": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_misc": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "transfers": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "treasury": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "twint_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_account_ach_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "zip_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + } + }, + "title": "capabilities_param", + "type": "object" + }, + "company": { + "description": "Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "directorship_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_directorship_declaration", + "type": "object" + }, + "executives_provided": { + "type": "boolean" + }, + "export_license_id": { + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "ownership_exemption_reason": { + "enum": [ + "", + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution" + ], + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "company_specs", + "type": "object" + }, + "controller": { + "description": "A hash of configuration describing the account controller's attributes.", + "properties": { + "fees": { + "properties": { + "payer": { + "enum": ["account", "application"], + "type": "string" + } + }, + "title": "controller_fees_specs", + "type": "object" + }, + "losses": { + "properties": { + "payments": { + "enum": ["application", "stripe"], + "type": "string" + } + }, + "title": "controller_losses_specs", + "type": "object" + }, + "requirement_collection": { + "enum": ["application", "stripe"], + "type": "string" + }, + "stripe_dashboard": { + "properties": { + "type": { + "enum": ["express", "full", "none"], + "type": "string" + } + }, + "title": "controller_dashboard_specs", + "type": "object" + } + }, + "title": "controller_specs", + "type": "object" + }, + "country": { + "description": "The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.", + "maxLength": 5000, + "type": "string" + }, + "default_currency": { + "description": "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://docs.stripe.com/payouts).", + "format": "currency", + "type": "string" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_license": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_memorandum_of_association": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_ministerial_decree": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_registration_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_tax_id_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_registration": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_ultimate_beneficial_ownership": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "documents_specs", + "type": "object" + }, + "email": { + "description": "The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "groups": { + "description": "A hash of account group type to tokens. These are account groups this account should be added to.", + "properties": { + "payments_pricing": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "account_groups_specs", + "type": "object" + }, + "individual": { + "description": "Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "individual_relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "settings": { + "description": "Options for customizing how the account functions within Stripe.", + "properties": { + "bacs_debit_payments": { + "properties": { + "display_name": { + "type": "string" + } + }, + "title": "bacs_debit_payments_specs", + "type": "object" + }, + "branding": { + "properties": { + "icon": { + "maxLength": 5000, + "type": "string" + }, + "logo": { + "maxLength": 5000, + "type": "string" + }, + "primary_color": { + "maxLength": 5000, + "type": "string" + }, + "secondary_color": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "branding_settings_specs", + "type": "object" + }, + "card_issuing": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "card_issuing_settings_specs", + "type": "object" + }, + "card_payments": { + "properties": { + "decline_on": { + "properties": { + "avs_failure": { + "type": "boolean" + }, + "cvc_failure": { + "type": "boolean" + } + }, + "title": "decline_charge_on_specs", + "type": "object" + }, + "statement_descriptor_prefix": { + "maxLength": 10, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor_prefix_kanji": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "card_payments_settings_specs", + "type": "object" + }, + "payments": { + "properties": { + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kanji": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payments_settings_specs", + "type": "object" + }, + "payouts": { + "properties": { + "debit_negative_balances": { + "type": "boolean" + }, + "schedule": { + "properties": { + "delay_days": { + "anyOf": [ + { + "enum": ["minimum"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "interval": { + "enum": [ + "daily", + "manual", + "monthly", + "weekly" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "monthly_anchor": { + "type": "integer" + }, + "weekly_anchor": { + "enum": [ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "transfer_schedule_specs", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payout_settings_specs", + "type": "object" + }, + "treasury": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "treasury_settings_specs", + "type": "object" + } + }, + "title": "settings_specs", + "type": "object" + }, + "tos_acceptance": { + "description": "Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.", + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "service_agreement": { + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "tos_acceptance_specs", + "type": "object" + }, + "type": { + "description": "The type of Stripe account to create. May be one of `custom`, `express` or `standard`.", + "enum": ["custom", "express", "standard"], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}": { + "delete": { + "description": "

With Connect, you can delete accounts you manage.

\n\n

Test-mode accounts can be deleted at any time.

\n\n

Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all balances are zero.

\n\n

If you want to delete your own account, use the account information tab in your account settings instead.

", + "operationId": "DeleteAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete an account" + }, + "get": { + "description": "

Retrieves the details of an account.

", + "operationId": "GetAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve account" + }, + "post": { + "description": "

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.

\n\n

For accounts where controller.requirement_collection\nis application, which includes Custom accounts, you can update any information on the account.

\n\n

For accounts where controller.requirement_collection\nis stripe, which includes Standard and Express accounts, you can update all information until you create\nan Account Link or Account Session to start Connect onboarding,\nafter which some properties can no longer be updated.

\n\n

To update your own account, use the Dashboard. Refer to our\nConnect documentation to learn more about updating accounts.

", + "operationId": "PostAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "capabilities": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "groups": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + }, + "tos_acceptance": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_token": { + "description": "An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.", + "maxLength": 5000, + "type": "string" + }, + "business_profile": { + "description": "Business information about the account.", + "properties": { + "annual_revenue": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "fiscal_year_end": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency", "fiscal_year_end"], + "title": "annual_revenue_specs", + "type": "object" + }, + "estimated_worker_count": { + "type": "integer" + }, + "mcc": { + "maxLength": 4, + "type": "string" + }, + "monthly_estimated_revenue": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "monthly_estimated_revenue_specs", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 40000, + "type": "string" + }, + "support_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "support_email": { + "type": "string" + }, + "support_phone": { + "maxLength": 5000, + "type": "string" + }, + "support_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "title": "business_profile_update_specs", + "type": "object" + }, + "business_type": { + "description": "The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "description": "Each key of the dictionary represents a capability, and each capability\nmaps to its settings (for example, whether it has been requested or not). Each\ncapability is inactive until you have provided its specific\nrequirements and Stripe has verified them. An account might have some\nof its requested capabilities be active and some be inactive.\n\nRequired when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)\nis `none`, which includes Custom accounts.", + "properties": { + "acss_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "affirm_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "afterpay_clearpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "alma_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "amazon_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "au_becs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bacs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bancontact_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "blik_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "boleto_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cartes_bancaires_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cashapp_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "eps_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "fpx_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "gb_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "giropay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "grabpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "ideal_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "india_international_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jcb_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jp_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "kakao_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "klarna_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "konbini_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "kr_card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "legacy_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "link_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "mobilepay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "multibanco_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "mx_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "naver_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "oxxo_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "p24_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "pay_by_bank_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "payco_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "paynow_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "promptpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "revolut_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "samsung_pay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sofort_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "swish_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_k": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_misc": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "transfers": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "treasury": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "twint_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_account_ach_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "zip_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + } + }, + "title": "capabilities_param", + "type": "object" + }, + "company": { + "description": "Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "directorship_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_directorship_declaration", + "type": "object" + }, + "executives_provided": { + "type": "boolean" + }, + "export_license_id": { + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "ownership_exemption_reason": { + "enum": [ + "", + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution" + ], + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "company_update_specs", + "type": "object" + }, + "default_currency": { + "description": "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://docs.stripe.com/payouts).", + "format": "currency", + "type": "string" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_license": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_memorandum_of_association": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_ministerial_decree": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_registration_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_tax_id_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_registration": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_ultimate_beneficial_ownership": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "documents_specs", + "type": "object" + }, + "email": { + "description": "The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "groups": { + "description": "A hash of account group type to tokens. These are account groups this account should be added to.", + "properties": { + "payments_pricing": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "account_groups_specs", + "type": "object" + }, + "individual": { + "description": "Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "individual_relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_update_specs", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "settings": { + "description": "Options for customizing how the account functions within Stripe.", + "properties": { + "bacs_debit_payments": { + "properties": { + "display_name": { + "type": "string" + } + }, + "title": "bacs_debit_payments_specs", + "type": "object" + }, + "branding": { + "properties": { + "icon": { + "maxLength": 5000, + "type": "string" + }, + "logo": { + "maxLength": 5000, + "type": "string" + }, + "primary_color": { + "maxLength": 5000, + "type": "string" + }, + "secondary_color": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "branding_settings_specs", + "type": "object" + }, + "card_issuing": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "card_issuing_settings_specs", + "type": "object" + }, + "card_payments": { + "properties": { + "decline_on": { + "properties": { + "avs_failure": { + "type": "boolean" + }, + "cvc_failure": { + "type": "boolean" + } + }, + "title": "decline_charge_on_specs", + "type": "object" + }, + "statement_descriptor_prefix": { + "maxLength": 10, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor_prefix_kanji": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "card_payments_settings_specs", + "type": "object" + }, + "invoices": { + "properties": { + "default_account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "invoices_settings_specs", + "type": "object" + }, + "payments": { + "properties": { + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kanji": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payments_settings_specs", + "type": "object" + }, + "payouts": { + "properties": { + "debit_negative_balances": { + "type": "boolean" + }, + "schedule": { + "properties": { + "delay_days": { + "anyOf": [ + { + "enum": ["minimum"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "interval": { + "enum": [ + "daily", + "manual", + "monthly", + "weekly" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "monthly_anchor": { + "type": "integer" + }, + "weekly_anchor": { + "enum": [ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "transfer_schedule_specs", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payout_settings_specs", + "type": "object" + }, + "treasury": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "treasury_settings_specs", + "type": "object" + } + }, + "title": "settings_specs_update", + "type": "object" + }, + "tos_acceptance": { + "description": "Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.", + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "service_agreement": { + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "tos_acceptance_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an account" + } + }, + "/v1/accounts/{account}/bank_accounts": { + "post": { + "description": "

Create an external account for a given account.

", + "operationId": "PostAccountsAccountBankAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "futsu", "savings", "toza"], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "documents": { + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "external_account_documents_param", + "type": "object" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "default_for_currency": { + "description": "When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an external account" + } + }, + "/v1/accounts/{account}/bank_accounts/{id}": { + "delete": { + "description": "

Delete a specified external account for a given account.

", + "operationId": "DeleteAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete an external account" + }, + "get": { + "description": "

Retrieve a specified external account for a given account.

", + "operationId": "GetAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an external account" + }, + "post": { + "description": "

Updates the metadata, account holder name, account holder type of a bank account belonging to\na connected account and optionally sets it as the default for its currency. Other bank account\ndetails are not editable by design.

\n\n

You can only update bank accounts when account.controller.requirement_collection is application, which includes Custom accounts.

\n\n

You can re-enable a disabled bank account by performing an update call without providing any\narguments or changes.

", + "operationId": "PostAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["", "company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "enum": ["checking", "futsu", "savings", "toza"], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "default_for_currency": { + "description": "When set to true, this becomes the default external account for its currency.", + "type": "boolean" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "external_account_documents_param", + "type": "object" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/capabilities": { + "get": { + "description": "

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

", + "operationId": "GetAccountsAccountCapabilities", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/capability" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ListAccountCapability", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all account capabilities" + } + }, + "/v1/accounts/{account}/capabilities/{capability}": { + "get": { + "description": "

Retrieves information about the specified Account Capability.

", + "operationId": "GetAccountsAccountCapabilitiesCapability", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "capability", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/capability" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an Account Capability" + }, + "post": { + "description": "

Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.

", + "operationId": "PostAccountsAccountCapabilitiesCapability", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "capability", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "requested": { + "description": "To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.\n\nIf a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/capability" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an Account Capability" + } + }, + "/v1/accounts/{account}/external_accounts": { + "get": { + "description": "

List external accounts for an account.

", + "operationId": "GetAccountsAccountExternalAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter external accounts according to a particular object type.", + "in": "query", + "name": "object", + "required": false, + "schema": { + "enum": ["bank_account", "card"], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all external accounts" + }, + "post": { + "description": "

Create an external account for a given account.

", + "operationId": "PostAccountsAccountExternalAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "futsu", "savings", "toza"], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "documents": { + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "external_account_documents_param", + "type": "object" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "default_for_currency": { + "description": "When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an external account" + } + }, + "/v1/accounts/{account}/external_accounts/{id}": { + "delete": { + "description": "

Delete a specified external account for a given account.

", + "operationId": "DeleteAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete an external account" + }, + "get": { + "description": "

Retrieve a specified external account for a given account.

", + "operationId": "GetAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an external account" + }, + "post": { + "description": "

Updates the metadata, account holder name, account holder type of a bank account belonging to\na connected account and optionally sets it as the default for its currency. Other bank account\ndetails are not editable by design.

\n\n

You can only update bank accounts when account.controller.requirement_collection is application, which includes Custom accounts.

\n\n

You can re-enable a disabled bank account by performing an update call without providing any\narguments or changes.

", + "operationId": "PostAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["", "company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "enum": ["checking", "futsu", "savings", "toza"], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "default_for_currency": { + "description": "When set to true, this becomes the default external account for its currency.", + "type": "boolean" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "external_account_documents_param", + "type": "object" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/login_links": { + "post": { + "description": "

Creates a login link for a connected account to access the Express Dashboard.

\n\n

You can only create login links for accounts that use the Express Dashboard and are connected to your platform.

", + "operationId": "PostAccountsAccountLoginLinks", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/login_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a login link" + } + }, + "/v1/accounts/{account}/people": { + "get": { + "description": "

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.

", + "operationId": "GetAccountsAccountPeople", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filters on the list of people returned based on the person's relationship to the account's company.", + "explode": true, + "in": "query", + "name": "relationship", + "required": false, + "schema": { + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "representative": { + "type": "boolean" + } + }, + "title": "all_people_relationship_specs", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/person" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PersonList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all persons" + }, + "post": { + "description": "

Creates a new person.

", + "operationId": "PostAccountsAccountPeople", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "additional_tos_acceptances": { + "explode": true, + "style": "deepObject" + }, + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "additional_tos_acceptances": { + "description": "Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.", + "properties": { + "account": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "person_additional_tos_acceptances_specs", + "type": "object" + }, + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "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.", + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a person" + } + }, + "/v1/accounts/{account}/people/{person}": { + "delete": { + "description": "

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.

", + "operationId": "DeleteAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a person" + }, + "get": { + "description": "

Retrieves an existing person.

", + "operationId": "GetAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a person" + }, + "post": { + "description": "

Updates an existing person.

", + "operationId": "PostAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "additional_tos_acceptances": { + "explode": true, + "style": "deepObject" + }, + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "additional_tos_acceptances": { + "description": "Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.", + "properties": { + "account": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "person_additional_tos_acceptances_specs", + "type": "object" + }, + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "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.", + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a person" + } + }, + "/v1/accounts/{account}/persons": { + "get": { + "description": "

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.

", + "operationId": "GetAccountsAccountPersons", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filters on the list of people returned based on the person's relationship to the account's company.", + "explode": true, + "in": "query", + "name": "relationship", + "required": false, + "schema": { + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "representative": { + "type": "boolean" + } + }, + "title": "all_people_relationship_specs", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/person" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PersonList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all persons" + }, + "post": { + "description": "

Creates a new person.

", + "operationId": "PostAccountsAccountPersons", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "additional_tos_acceptances": { + "explode": true, + "style": "deepObject" + }, + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "additional_tos_acceptances": { + "description": "Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.", + "properties": { + "account": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "person_additional_tos_acceptances_specs", + "type": "object" + }, + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "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.", + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a person" + } + }, + "/v1/accounts/{account}/persons/{person}": { + "delete": { + "description": "

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.

", + "operationId": "DeleteAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a person" + }, + "get": { + "description": "

Retrieves an existing person.

", + "operationId": "GetAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a person" + }, + "post": { + "description": "

Updates an existing person.

", + "operationId": "PostAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "additional_tos_acceptances": { + "explode": true, + "style": "deepObject" + }, + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "additional_tos_acceptances": { + "description": "Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.", + "properties": { + "account": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "person_additional_tos_acceptances_specs", + "type": "object" + }, + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "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.", + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a person" + } + }, + "/v1/accounts/{account}/reject": { + "post": { + "description": "

With Connect, you can reject accounts that you have flagged as suspicious.

\n\n

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.

", + "operationId": "PostAccountsAccountReject", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reason": { + "description": "The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["reason"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Reject an account" + } + }, + "/v1/apple_pay/domains": { + "get": { + "description": "

List apple pay domains.

", + "operationId": "GetApplePayDomains", + "parameters": [ + { + "in": "query", + "name": "domain_name", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/apple_pay_domain" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/apple_pay/domains", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ApplePayDomainList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create an apple pay domain.

", + "operationId": "PostApplePayDomains", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "domain_name": { + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["domain_name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apple_pay/domains/{domain}": { + "delete": { + "description": "

Delete an apple pay domain.

", + "operationId": "DeleteApplePayDomainsDomain", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve an apple pay domain.

", + "operationId": "GetApplePayDomainsDomain", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees": { + "get": { + "description": "

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.

", + "operationId": "GetApplicationFees", + "parameters": [ + { + "description": "Only return application fees for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return applications fees that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/application_fee" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/application_fees", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PlatformEarningList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all application fees" + } + }, + "/v1/application_fees/{fee}/refunds/{id}": { + "get": { + "description": "

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.

", + "operationId": "GetApplicationFeesFeeRefundsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "fee", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an application fee refund" + }, + "post": { + "description": "

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

\n\n

This request only accepts metadata as an argument.

", + "operationId": "PostApplicationFeesFeeRefundsId", + "parameters": [ + { + "in": "path", + "name": "fee", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an application fee refund" + } + }, + "/v1/application_fees/{id}": { + "get": { + "description": "

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

", + "operationId": "GetApplicationFeesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_fee" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an application fee" + } + }, + "/v1/application_fees/{id}/refund": { + "post": { + "description": "", + "operationId": "PostApplicationFeesIdRefund", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "directive": { + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_fee" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}/refunds": { + "get": { + "description": "

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.

", + "operationId": "GetApplicationFeesIdRefunds", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all application fee refunds" + }, + "post": { + "description": "

Refunds an application fee that has previously been collected but not yet refunded.\nFunds will be refunded to the Stripe account from which the fee was originally collected.

\n\n

You can optionally refund only part of an application fee.\nYou can do so multiple times, until the entire fee has been refunded.

\n\n

Once entirely refunded, an application fee can’t be refunded again.\nThis method will raise an error when called on an already-refunded application fee,\nor when trying to refund more money than is left on an application fee.

", + "operationId": "PostApplicationFeesIdRefunds", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an application fee refund" + } + }, + "/v1/apps/secrets": { + "get": { + "description": "

List all secrets stored on the given scope.

", + "operationId": "GetAppsSecrets", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "explode": true, + "in": "query", + "name": "scope", + "required": true, + "schema": { + "properties": { + "type": { + "enum": ["account", "user"], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "scope_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/apps.secret" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/apps/secrets", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SecretServiceResourceSecretList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List secrets" + }, + "post": { + "description": "

Create or replace a secret in the secret store.

", + "operationId": "PostAppsSecrets", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "scope": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "type": "integer" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "type": "string" + }, + "scope": { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "properties": { + "type": { + "enum": ["account", "user"], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "scope_param", + "type": "object" + } + }, + "required": ["name", "payload", "scope"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Set a Secret" + } + }, + "/v1/apps/secrets/delete": { + "post": { + "description": "

Deletes a secret from the secret store by name and scope.

", + "operationId": "PostAppsSecretsDelete", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "scope": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "scope": { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "properties": { + "type": { + "enum": ["account", "user"], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "scope_param", + "type": "object" + } + }, + "required": ["name", "scope"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a Secret" + } + }, + "/v1/apps/secrets/find": { + "get": { + "description": "

Finds a secret in the secret store by name and scope.

", + "operationId": "GetAppsSecretsFind", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A name for the secret that's unique within the scope.", + "in": "query", + "name": "name", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "explode": true, + "in": "query", + "name": "scope", + "required": true, + "schema": { + "properties": { + "type": { + "enum": ["account", "user"], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "scope_param", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Find a Secret" + } + }, + "/v1/balance": { + "get": { + "description": "

Retrieves the current account balance, based on the authentication that was used to make the request.\n For a sample request, see Accounting for negative balances.

", + "operationId": "GetBalance", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve balance" + } + }, + "/v1/balance/history": { + "get": { + "description": "

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.

\n\n

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

", + "operationId": "GetBalanceHistory", + "parameters": [ + { + "description": "Only return transactions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transactions in a certain currency. 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).", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "format": "currency", + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.", + "in": "query", + "name": "payout", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns the original transaction.", + "in": "query", + "name": "source", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns transactions of the given type. One of: `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`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/balance_transactions", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BalanceTransactionsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all balance transactions" + } + }, + "/v1/balance/history/{id}": { + "get": { + "description": "

Retrieves the balance transaction with the given ID.

\n\n

Note that this endpoint previously used the path /v1/balance/history/:id.

", + "operationId": "GetBalanceHistoryId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a balance transaction" + } + }, + "/v1/balance_transactions": { + "get": { + "description": "

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.

\n\n

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

", + "operationId": "GetBalanceTransactions", + "parameters": [ + { + "description": "Only return transactions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transactions in a certain currency. 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).", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "format": "currency", + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.", + "in": "query", + "name": "payout", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns the original transaction.", + "in": "query", + "name": "source", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns transactions of the given type. One of: `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`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/balance_transactions", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BalanceTransactionsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all balance transactions" + } + }, + "/v1/balance_transactions/{id}": { + "get": { + "description": "

Retrieves the balance transaction with the given ID.

\n\n

Note that this endpoint previously used the path /v1/balance/history/:id.

", + "operationId": "GetBalanceTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a balance transaction" + } + }, + "/v1/billing/alerts": { + "get": { + "description": "

Lists billing active and inactive alerts

", + "operationId": "GetBillingAlerts", + "parameters": [ + { + "description": "Filter results to only include this type of alert.", + "in": "query", + "name": "alert_type", + "required": false, + "schema": { + "enum": ["usage_threshold"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter results to only include alerts with the given meter.", + "in": "query", + "name": "meter", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing.alert" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing/alerts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ThresholdsResourceAlertList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List billing alerts" + }, + "post": { + "description": "

Creates a billing alert

", + "operationId": "PostBillingAlerts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "usage_threshold": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alert_type": { + "description": "The type of alert to create.", + "enum": ["usage_threshold"], + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The title of the alert.", + "maxLength": 256, + "type": "string" + }, + "usage_threshold": { + "description": "The configuration of the usage threshold.", + "properties": { + "filters": { + "items": { + "properties": { + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["customer"], + "type": "string" + } + }, + "required": ["type"], + "title": "usage_alert_filter", + "type": "object" + }, + "type": "array" + }, + "gte": { + "type": "integer" + }, + "meter": { + "maxLength": 5000, + "type": "string" + }, + "recurrence": { + "enum": ["one_time"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["gte", "recurrence"], + "title": "usage_threshold_config", + "type": "object" + } + }, + "required": ["alert_type", "title"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.alert" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a billing alert" + } + }, + "/v1/billing/alerts/{id}": { + "get": { + "description": "

Retrieves a billing alert given an ID

", + "operationId": "GetBillingAlertsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.alert" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a billing alert" + } + }, + "/v1/billing/alerts/{id}/activate": { + "post": { + "description": "

Reactivates this alert, allowing it to trigger again.

", + "operationId": "PostBillingAlertsIdActivate", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.alert" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Activate a billing alert" + } + }, + "/v1/billing/alerts/{id}/archive": { + "post": { + "description": "

Archives this alert, removing it from the list view and APIs. This is non-reversible.

", + "operationId": "PostBillingAlertsIdArchive", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.alert" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Archive a billing alert" + } + }, + "/v1/billing/alerts/{id}/deactivate": { + "post": { + "description": "

Deactivates this alert, preventing it from triggering.

", + "operationId": "PostBillingAlertsIdDeactivate", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.alert" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Deactivate a billing alert" + } + }, + "/v1/billing/credit_balance_summary": { + "get": { + "description": "

Retrieves the credit balance summary for a customer.

", + "operationId": "GetBillingCreditBalanceSummary", + "parameters": [ + { + "description": "The customer for which to fetch credit balance summary.", + "in": "query", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The filter criteria for the credit balance summary.", + "explode": true, + "in": "query", + "name": "filter", + "required": true, + "schema": { + "properties": { + "applicability_scope": { + "properties": { + "price_type": { + "enum": ["metered"], + "type": "string" + }, + "prices": { + "items": { + "properties": { + "id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["id"], + "title": "applicable_price_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "scope_param", + "type": "object" + }, + "credit_grant": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["applicability_scope", "credit_grant"], + "type": "string" + } + }, + "required": ["type"], + "title": "balance_summary_filter_param", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_balance_summary" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve the credit balance summary for a customer" + } + }, + "/v1/billing/credit_balance_transactions": { + "get": { + "description": "

Retrieve a list of credit balance transactions.

", + "operationId": "GetBillingCreditBalanceTransactions", + "parameters": [ + { + "description": "The credit grant for which to fetch credit balance transactions.", + "in": "query", + "name": "credit_grant", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The customer for which to fetch credit balance transactions.", + "in": "query", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing.credit_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing/credit_grants", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BillingCreditGrantsResourceBalanceTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List credit balance transactions" + } + }, + "/v1/billing/credit_balance_transactions/{id}": { + "get": { + "description": "

Retrieves a credit balance transaction.

", + "operationId": "GetBillingCreditBalanceTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a credit balance transaction" + } + }, + "/v1/billing/credit_grants": { + "get": { + "description": "

Retrieve a list of credit grants.

", + "operationId": "GetBillingCreditGrants", + "parameters": [ + { + "description": "Only return credit grants for this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing.credit_grant" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing/credit_grants", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BillingCreditGrantsResourceCreditGrantList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List credit grants" + }, + "post": { + "description": "

Creates a credit grant.

", + "operationId": "PostBillingCreditGrants", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amount": { + "explode": true, + "style": "deepObject" + }, + "applicability_config": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount of this credit grant.", + "properties": { + "monetary": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["currency", "value"], + "title": "monetary_amount_param", + "type": "object" + }, + "type": { + "enum": ["monetary"], + "type": "string" + } + }, + "required": ["type"], + "title": "amount_param", + "type": "object" + }, + "applicability_config": { + "description": "Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.", + "properties": { + "scope": { + "properties": { + "price_type": { + "enum": ["metered"], + "type": "string" + }, + "prices": { + "items": { + "properties": { + "id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["id"], + "title": "applicable_price_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "scope_param", + "type": "object" + } + }, + "required": ["scope"], + "title": "applicability_config_param", + "type": "object" + }, + "category": { + "description": "The category of this credit grant.", + "enum": ["paid", "promotional"], + "type": "string" + }, + "customer": { + "description": "ID of the customer to receive the billing credits.", + "maxLength": 5000, + "type": "string" + }, + "effective_at": { + "description": "The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.", + "format": "unix-time", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The time when the billing credits expire. If not specified, the billing credits don't expire.", + "format": "unix-time", + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.", + "type": "object" + }, + "name": { + "description": "A descriptive name shown in the Dashboard.", + "maxLength": 100, + "type": "string" + }, + "priority": { + "description": "The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.", + "type": "integer" + } + }, + "required": [ + "amount", + "applicability_config", + "category", + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_grant" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a credit grant" + } + }, + "/v1/billing/credit_grants/{id}": { + "get": { + "description": "

Retrieves a credit grant.

", + "operationId": "GetBillingCreditGrantsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_grant" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a credit grant" + }, + "post": { + "description": "

Updates a credit grant.

", + "operationId": "PostBillingCreditGrantsId", + "parameters": [ + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "expires_at": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire." + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_grant" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a credit grant" + } + }, + "/v1/billing/credit_grants/{id}/expire": { + "post": { + "description": "

Expires a credit grant.

", + "operationId": "PostBillingCreditGrantsIdExpire", + "parameters": [ + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_grant" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Expire a credit grant" + } + }, + "/v1/billing/credit_grants/{id}/void": { + "post": { + "description": "

Voids a credit grant.

", + "operationId": "PostBillingCreditGrantsIdVoid", + "parameters": [ + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.credit_grant" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Void a credit grant" + } + }, + "/v1/billing/meter_event_adjustments": { + "post": { + "description": "

Creates a billing meter event adjustment.

", + "operationId": "PostBillingMeterEventAdjustments", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "cancel": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancel": { + "description": "Specifies which event to cancel.", + "properties": { + "identifier": { + "maxLength": 100, + "type": "string" + } + }, + "title": "event_adjustment_cancel_settings_param", + "type": "object" + }, + "event_name": { + "description": "The name of the meter event. Corresponds with the `event_name` field on a meter.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.", + "enum": ["cancel"], + "type": "string" + } + }, + "required": ["event_name", "type"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter_event_adjustment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a billing meter event adjustment" + } + }, + "/v1/billing/meter_events": { + "post": { + "description": "

Creates a billing meter event.

", + "operationId": "PostBillingMeterEvents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "payload": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "event_name": { + "description": "The name of the meter event. Corresponds with the `event_name` field on a meter.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "identifier": { + "description": "A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.", + "maxLength": 100, + "type": "string" + }, + "payload": { + "additionalProperties": { + "type": "string" + }, + "description": "The payload of the event. This must contain 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://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).", + "type": "object" + }, + "timestamp": { + "description": "The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["event_name", "payload"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter_event" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a billing meter event" + } + }, + "/v1/billing/meters": { + "get": { + "description": "

Retrieve a list of billing meters.

", + "operationId": "GetBillingMeters", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter results to only include meters with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "inactive"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing.meter" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing/meters", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BillingMeterResourceBillingMeterList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List billing meters" + }, + "post": { + "description": "

Creates a billing meter.

", + "operationId": "PostBillingMeters", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "customer_mapping": { + "explode": true, + "style": "deepObject" + }, + "default_aggregation": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "value_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer_mapping": { + "description": "Fields that specify how to map a meter event to a customer.", + "properties": { + "event_payload_key": { + "maxLength": 100, + "type": "string" + }, + "type": { + "enum": ["by_id"], + "type": "string" + } + }, + "required": ["event_payload_key", "type"], + "title": "customer_mapping_param", + "type": "object" + }, + "default_aggregation": { + "description": "The default settings to aggregate a meter's events with.", + "properties": { + "formula": { + "enum": ["count", "sum"], + "type": "string" + } + }, + "required": ["formula"], + "title": "aggregation_settings_param", + "type": "object" + }, + "display_name": { + "description": "The meter’s name. Not visible to the customer.", + "maxLength": 250, + "type": "string" + }, + "event_name": { + "description": "The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.", + "maxLength": 100, + "type": "string" + }, + "event_time_window": { + "description": "The time window to pre-aggregate meter events for, if any.", + "enum": ["day", "hour"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "value_settings": { + "description": "Fields that specify how to calculate a meter event's value.", + "properties": { + "event_payload_key": { + "maxLength": 100, + "type": "string" + } + }, + "required": ["event_payload_key"], + "title": "meter_value_settings_param", + "type": "object" + } + }, + "required": [ + "default_aggregation", + "display_name", + "event_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a billing meter" + } + }, + "/v1/billing/meters/{id}": { + "get": { + "description": "

Retrieves a billing meter given an ID.

", + "operationId": "GetBillingMetersId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a billing meter" + }, + "post": { + "description": "

Updates a billing meter.

", + "operationId": "PostBillingMetersId", + "parameters": [ + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "display_name": { + "description": "The meter’s name. Not visible to the customer.", + "maxLength": 250, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a billing meter" + } + }, + "/v1/billing/meters/{id}/deactivate": { + "post": { + "description": "

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.

", + "operationId": "PostBillingMetersIdDeactivate", + "parameters": [ + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Deactivate a billing meter" + } + }, + "/v1/billing/meters/{id}/event_summaries": { + "get": { + "description": "

Retrieve a list of billing meter event summaries.

", + "operationId": "GetBillingMetersIdEventSummaries", + "parameters": [ + { + "description": "The customer for which to fetch event summaries.", + "in": "query", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.", + "in": "query", + "name": "end_time", + "required": true, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.", + "in": "query", + "name": "start_time", + "required": true, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).", + "in": "query", + "name": "value_grouping_window", + "required": false, + "schema": { + "enum": ["day", "hour"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing.meter_event_summary" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing/meters/[^/]+/event_summaries", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BillingMeterResourceBillingMeterEventSummaryList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List billing meter event summaries" + } + }, + "/v1/billing/meters/{id}/reactivate": { + "post": { + "description": "

When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.

", + "operationId": "PostBillingMetersIdReactivate", + "parameters": [ + { + "description": "Unique identifier for the object.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.meter" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Reactivate a billing meter" + } + }, + "/v1/billing_portal/configurations": { + "get": { + "description": "

Returns a list of configurations that describe the functionality of the customer portal.

", + "operationId": "GetBillingPortalConfigurations", + "parameters": [ + { + "description": "Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).", + "in": "query", + "name": "is_default", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing_portal.configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing_portal/configurations", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PortalPublicResourceConfigurationList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List portal configurations" + }, + "post": { + "description": "

Creates a configuration that describes the functionality and behavior of a PortalSession

", + "operationId": "PostBillingPortalConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "default_return_url": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "login_page": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "business_profile": { + "description": "The business information shown to customers in the portal.", + "properties": { + "headline": { + "anyOf": [ + { + "maxLength": 60, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "privacy_policy_url": { + "type": "string" + }, + "terms_of_service_url": { + "type": "string" + } + }, + "title": "business_profile_create_param", + "type": "object" + }, + "default_return_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Information about the features available in the portal.", + "properties": { + "customer_update": { + "properties": { + "allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "customer_update_creation_param", + "type": "object" + }, + "invoice_history": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "invoice_list_param", + "type": "object" + }, + "payment_method_update": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "payment_method_update_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "cancellation_reason": { + "properties": { + "enabled": { + "type": "boolean" + }, + "options": { + "anyOf": [ + { + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["enabled", "options"], + "title": "subscription_cancellation_reason_creation_param", + "type": "object" + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "enum": ["at_period_end", "immediately"], + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": ["enabled"], + "title": "subscription_cancel_creation_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "default_allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "products": { + "anyOf": [ + { + "items": { + "properties": { + "prices": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["prices", "product"], + "title": "subscription_update_product_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "schedule_at_period_end": { + "properties": { + "conditions": { + "items": { + "properties": { + "type": { + "enum": [ + "decreasing_item_amount", + "shortening_interval" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "schedule_update_at_period_end_condition_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "schedule_update_at_period_end_creating_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "subscription_update_creation_param", + "type": "object" + } + }, + "title": "features_creation_param", + "type": "object" + }, + "login_page": { + "description": "The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "login_page_create_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "required": ["features"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a portal configuration" + } + }, + "/v1/billing_portal/configurations/{configuration}": { + "get": { + "description": "

Retrieves a configuration that describes the functionality of the customer portal.

", + "operationId": "GetBillingPortalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a portal configuration" + }, + "post": { + "description": "

Updates a configuration that describes the functionality of the customer portal.

", + "operationId": "PostBillingPortalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "default_return_url": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "login_page": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "business_profile": { + "description": "The business information shown to customers in the portal.", + "properties": { + "headline": { + "anyOf": [ + { + "maxLength": 60, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "privacy_policy_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "terms_of_service_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "business_profile_update_param", + "type": "object" + }, + "default_return_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Information about the features available in the portal.", + "properties": { + "customer_update": { + "properties": { + "allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + } + }, + "title": "customer_update_updating_param", + "type": "object" + }, + "invoice_history": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "invoice_list_param", + "type": "object" + }, + "payment_method_update": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "payment_method_update_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "cancellation_reason": { + "properties": { + "enabled": { + "type": "boolean" + }, + "options": { + "anyOf": [ + { + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["enabled"], + "title": "subscription_cancellation_reason_updating_param", + "type": "object" + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "enum": ["at_period_end", "immediately"], + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "title": "subscription_cancel_updating_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "default_allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "products": { + "anyOf": [ + { + "items": { + "properties": { + "prices": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["prices", "product"], + "title": "subscription_update_product_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "schedule_at_period_end": { + "properties": { + "conditions": { + "anyOf": [ + { + "items": { + "properties": { + "type": { + "enum": [ + "decreasing_item_amount", + "shortening_interval" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "schedule_update_at_period_end_condition_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "schedule_update_at_period_end_updating_param", + "type": "object" + } + }, + "title": "subscription_update_updating_param", + "type": "object" + } + }, + "title": "features_updating_param", + "type": "object" + }, + "login_page": { + "description": "The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "login_page_update_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a portal configuration" + } + }, + "/v1/billing_portal/sessions": { + "post": { + "description": "

Creates a session of the customer portal.

", + "operationId": "PostBillingPortalSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "configuration": { + "description": "The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_data": { + "description": "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.", + "properties": { + "after_completion": { + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_hosted_confirmation_param", + "type": "object" + }, + "redirect": { + "properties": { + "return_url": { + "type": "string" + } + }, + "required": ["return_url"], + "title": "after_completion_redirect_param", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "portal_homepage", + "redirect" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "flow_data_after_completion_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "retention": { + "properties": { + "coupon_offer": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["coupon"], + "title": "coupon_offer_param", + "type": "object" + }, + "type": { + "enum": ["coupon_offer"], + "type": "string" + } + }, + "required": ["coupon_offer", "type"], + "title": "retention_param", + "type": "object" + }, + "subscription": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["subscription"], + "title": "flow_data_subscription_cancel_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "subscription": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["subscription"], + "title": "flow_data_subscription_update_param", + "type": "object" + }, + "subscription_update_confirm": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "subscription_update_confirm_discount_params", + "type": "object" + }, + "type": "array" + }, + "items": { + "items": { + "properties": { + "id": { + "maxLength": 5000, + "type": "string" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": ["id"], + "title": "subscription_update_confirm_item_params", + "type": "object" + }, + "type": "array" + }, + "subscription": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["items", "subscription"], + "title": "flow_data_subscription_update_confirm_param", + "type": "object" + }, + "type": { + "enum": [ + "payment_method_update", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "flow_data_param", + "type": "object" + }, + "locale": { + "description": "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.", + "enum": [ + "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" + ], + "type": "string" + }, + "on_behalf_of": { + "description": "The `on_behalf_of` account to use for this session. 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.", + "type": "string" + }, + "return_url": { + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website.", + "type": "string" + } + }, + "required": ["customer"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a portal session" + } + }, + "/v1/charges": { + "get": { + "description": "

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

", + "operationId": "GetCharges", + "parameters": [ + { + "description": "Only return charges that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return charges for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return charges for this transfer group, limited to 100.", + "in": "query", + "name": "transfer_group", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/charge" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/charges", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ChargeList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all charges" + }, + "post": { + "description": "

This method is no longer recommended—use the Payment Intents API\nto initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge\nobject used to request payment.

", + "operationId": "PostCharges", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card": { + "explode": true, + "style": "deepObject" + }, + "destination": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "application_fee": { + "type": "integer" + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).", + "type": "integer" + }, + "capture": { + "description": "Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.", + "type": "boolean" + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": ["card"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer that will be charged in this request.", + "maxLength": 500, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.", + "maxLength": 40000, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "amount": { + "type": "integer" + } + }, + "required": ["account"], + "title": "destination_specs", + "type": "object" + }, + { + "type": "string" + } + ] + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "description": "The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).", + "maxLength": 5000, + "type": "string" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "receipt_email": { + "description": "The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).", + "type": "string" + }, + "shipping": { + "description": "Shipping information for the charge. Helps prevent fraud on charges for physical goods.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "optional_fields_shipping", + "type": "object" + }, + "source": { + "description": "A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "statement_descriptor": { + "description": "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).\n\nFor 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.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "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.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/search": { + "get": { + "description": "

Search for charges you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetChargesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/charge" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search charges" + } + }, + "/v1/charges/{charge}": { + "get": { + "description": "

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.

", + "operationId": "GetChargesCharge", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a charge" + }, + "post": { + "description": "

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostChargesCharge", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fraud_details": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fraud_details": { + "description": "A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.", + "properties": { + "user_report": { + "enum": ["", "fraudulent", "safe"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["user_report"], + "title": "fraud_details", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "description": "Shipping information for the charge. Helps prevent fraud on charges for physical goods.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "optional_fields_shipping", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a charge" + } + }, + "/v1/charges/{charge}/capture": { + "post": { + "description": "

Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.

\n\n

Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.

\n\n

Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.

", + "operationId": "PostChargesChargeCapture", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.", + "type": "integer" + }, + "application_fee": { + "description": "An application fee to add on to this charge.", + "type": "integer" + }, + "application_fee_amount": { + "description": "An application fee amount to add on to this charge, which must be less than or equal to the original amount.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "receipt_email": { + "description": "The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.", + "type": "string" + }, + "statement_descriptor": { + "description": "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).\n\nFor 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.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "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.", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_specs", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Capture a payment" + } + }, + "/v1/charges/{charge}/dispute": { + "get": { + "description": "

Retrieve a dispute for a specified charge.

", + "operationId": "GetChargesChargeDispute", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "", + "operationId": "PostChargesChargeDispute", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "evidence": { + "description": "Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.", + "properties": { + "access_activity_log": { + "maxLength": 20000, + "type": "string" + }, + "billing_address": { + "maxLength": 5000, + "type": "string" + }, + "cancellation_policy": { + "type": "string" + }, + "cancellation_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "cancellation_rebuttal": { + "maxLength": 20000, + "type": "string" + }, + "customer_communication": { + "type": "string" + }, + "customer_email_address": { + "maxLength": 5000, + "type": "string" + }, + "customer_name": { + "maxLength": 5000, + "type": "string" + }, + "customer_purchase_ip": { + "maxLength": 5000, + "type": "string" + }, + "customer_signature": { + "type": "string" + }, + "duplicate_charge_documentation": { + "type": "string" + }, + "duplicate_charge_explanation": { + "maxLength": 20000, + "type": "string" + }, + "duplicate_charge_id": { + "maxLength": 5000, + "type": "string" + }, + "enhanced_evidence": { + "anyOf": [ + { + "properties": { + "visa_compelling_evidence_3": { + "properties": { + "disputed_transaction": { + "properties": { + "customer_account_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_fingerprint": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_email_address": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_purchase_ip": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "merchandise_or_services": { + "enum": ["merchandise", "services"], + "type": "string" + }, + "product_description": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "country": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line1": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line2": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "postal_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "state": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "shipping_address", + "type": "object" + } + }, + "title": "visa_compelling_evidence3_disputed_transaction", + "type": "object" + }, + "prior_undisputed_transactions": { + "items": { + "properties": { + "charge": { + "maxLength": 5000, + "type": "string" + }, + "customer_account_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_fingerprint": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_email_address": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_purchase_ip": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "country": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line1": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line2": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "postal_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "state": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "shipping_address", + "type": "object" + } + }, + "required": ["charge"], + "title": "visa_compelling_evidence3_prior_undisputed_transaction", + "type": "object" + }, + "type": "array" + } + }, + "title": "visa_compelling_evidence3", + "type": "object" + }, + "visa_compliance": { + "properties": { + "fee_acknowledged": { + "type": "boolean" + } + }, + "title": "visa_compliance", + "type": "object" + } + }, + "title": "enhanced_evidence", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 20000, + "type": "string" + }, + "receipt": { + "type": "string" + }, + "refund_policy": { + "type": "string" + }, + "refund_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "refund_refusal_explanation": { + "maxLength": 20000, + "type": "string" + }, + "service_date": { + "maxLength": 5000, + "type": "string" + }, + "service_documentation": { + "type": "string" + }, + "shipping_address": { + "maxLength": 5000, + "type": "string" + }, + "shipping_carrier": { + "maxLength": 5000, + "type": "string" + }, + "shipping_date": { + "maxLength": 5000, + "type": "string" + }, + "shipping_documentation": { + "type": "string" + }, + "shipping_tracking_number": { + "maxLength": 5000, + "type": "string" + }, + "uncategorized_file": { + "type": "string" + }, + "uncategorized_text": { + "maxLength": 20000, + "type": "string" + } + }, + "title": "dispute_evidence_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "submit": { + "description": "Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/dispute/close": { + "post": { + "description": "", + "operationId": "PostChargesChargeDisputeClose", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refund": { + "post": { + "description": "

When you create a new refund, you must specify either a Charge or a PaymentIntent object.

\n\n

This action refunds a previously created charge that’s not refunded yet.\nFunds are refunded to the credit or debit card that’s originally charged.

\n\n

You can optionally refund only part of a charge.\nYou can repeat this until the entire charge is refunded.

\n\n

After you entirely refund a charge, you can’t refund it again.\nThis method raises an error when it’s called on an already-refunded charge,\nor when you attempt to refund more money than is left on a charge.

", + "operationId": "PostChargesChargeRefund", + "parameters": [ + { + "description": "The identifier of the charge to refund.", + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing how much of this charge to refund. Can refund only up to the remaining, unrefunded amount of the charge.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_intent": { + "description": "The identifier of the PaymentIntent to refund.", + "maxLength": 5000, + "type": "string" + }, + "reason": { + "description": "String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "description": "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.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "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.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a refund" + } + }, + "/v1/charges/{charge}/refunds": { + "get": { + "description": "

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.

", + "operationId": "GetChargesChargeRefunds", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RefundList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all refunds" + }, + "post": { + "description": "

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

\n\n

Creating a new refund will refund a charge that has previously been created but not yet refunded.\nFunds will be refunded to the credit or debit card that was originally charged.

\n\n

You can optionally refund only part of a charge.\nYou can do so multiple times, until the entire charge has been refunded.

\n\n

Once entirely refunded, a charge can’t be refunded again.\nThis method will raise an error when called on an already-refunded charge,\nor when trying to refund more money than is left on a charge.

", + "operationId": "PostChargesChargeRefunds", + "parameters": [ + { + "description": "The identifier of the charge to refund.", + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "Customer whose customer balance to refund from.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "origin": { + "description": "Origin of the refund", + "enum": ["customer_balance"], + "type": "string" + }, + "payment_intent": { + "description": "The identifier of the PaymentIntent to refund.", + "maxLength": 5000, + "type": "string" + }, + "reason": { + "description": "String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "description": "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.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "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.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create customer balance refund" + } + }, + "/v1/charges/{charge}/refunds/{refund}": { + "get": { + "description": "

Retrieves the details of an existing refund.

", + "operationId": "GetChargesChargeRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified refund.

", + "operationId": "PostChargesChargeRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions": { + "get": { + "description": "

Returns a list of Checkout Sessions.

", + "operationId": "GetCheckoutSessions", + "parameters": [ + { + "description": "Only return Checkout Sessions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return the Checkout Sessions for the Customer specified.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions for the Customer details specified.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "email": { + "type": "string" + } + }, + "required": ["email"], + "title": "customer_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Session for the PaymentIntent specified.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions for the Payment Link specified.", + "in": "query", + "name": "payment_link", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions matching the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["complete", "expired", "open"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Session for the subscription specified.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/checkout.session" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentPagesCheckoutSessionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Checkout Sessions" + }, + "post": { + "description": "

Creates a Session object.

", + "operationId": "PostCheckoutSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "adaptive_pricing": { + "explode": true, + "style": "deepObject" + }, + "after_expiration": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "consent_collection": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "customer_update": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "saved_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "setup_intent_data": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_options": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "adaptive_pricing": { + "description": "Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "adaptive_pricing_params", + "type": "object" + }, + "after_expiration": { + "description": "Configure actions after a Checkout Session has expired.", + "properties": { + "recovery": { + "properties": { + "allow_promotion_codes": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "recovery_params", + "type": "object" + } + }, + "title": "after_expiration_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.", + "enum": ["auto", "required"], + "type": "string" + }, + "cancel_url": { + "description": "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. This parameter is not allowed if ui_mode is `embedded`.", + "maxLength": 5000, + "type": "string" + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nsession with your internal systems.", + "maxLength": 200, + "type": "string" + }, + "consent_collection": { + "description": "Configure fields for the Checkout Session to gather active consent from customers.", + "properties": { + "payment_method_reuse_agreement": { + "properties": { + "position": { + "enum": ["auto", "hidden"], + "type": "string" + } + }, + "required": ["position"], + "title": "payment_method_reuse_agreement_params", + "type": "object" + }, + "promotions": { + "enum": ["auto", "none"], + "type": "string" + }, + "terms_of_service": { + "enum": ["none", "required"], + "type": "string" + } + }, + "title": "consent_collection_params", + "type": "object" + }, + "currency": { + "description": "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). Required in `setup` mode when `payment_method_types` is not set.", + "format": "currency", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 3 fields are supported.", + "items": { + "properties": { + "dropdown": { + "properties": { + "default_value": { + "maxLength": 100, + "type": "string" + }, + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": ["options"], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": ["custom"], + "type": "string" + } + }, + "required": ["custom", "type"], + "title": "custom_field_label_param", + "type": "object" + }, + "numeric": { + "properties": { + "default_value": { + "maxLength": 255, + "type": "string" + }, + "maximum_length": { + "type": "integer" + }, + "minimum_length": { + "type": "integer" + } + }, + "title": "custom_field_numeric_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "text": { + "properties": { + "default_value": { + "maxLength": 255, + "type": "string" + }, + "maximum_length": { + "type": "integer" + }, + "minimum_length": { + "type": "integer" + } + }, + "title": "custom_field_text_param", + "type": "object" + }, + "type": { + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "type"], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "after_submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "terms_of_service_acceptance": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer": { + "description": "ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card\npayment method will be used to prefill the email, name, card details, and billing address\non the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)\nwill be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.\n\nIf the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.\nIf the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.\n\nIf blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.\n\nYou can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.", + "maxLength": 5000, + "type": "string" + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.\n\nWhen a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout\nwith [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).\n\nSessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)\nin the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.\n\nCan only be set in `payment` and `setup` mode.", + "enum": ["always", "if_required"], + "type": "string" + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once a session is\ncomplete, use the `customer` field.", + "type": "string" + }, + "customer_update": { + "description": "Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.", + "properties": { + "address": { + "enum": ["auto", "never"], + "type": "string", + "x-stripeBypassValidation": true + }, + "name": { + "enum": ["auto", "never"], + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "enum": ["auto", "never"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "customer_update_params", + "type": "object" + }, + "discounts": { + "description": "The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.", + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discount_params", + "type": "object" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.", + "format": "unix-time", + "type": "integer" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "checkout_rendering_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "invoice_data_params", + "type": "object" + } + }, + "required": ["enabled"], + "title": "invoice_creation_params", + "type": "object" + }, + "line_items": { + "description": "A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).\n\nFor `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.\n\nFor `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "adjustable_quantity_params", + "type": "object" + }, + "dynamic_tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "properties": { + "description": { + "maxLength": 40000, + "type": "string" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "title": "product_data", + "type": "object" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency"], + "title": "price_data_with_product_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "line_item_params", + "type": "object" + }, + "type": "array" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "mode": { + "description": "The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.", + "enum": ["payment", "setup", "subscription"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "application_fee_amount": { + "type": "integer" + }, + "capture_method": { + "enum": ["automatic", "automatic_async", "manual"], + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "receipt_email": { + "type": "string" + }, + "setup_future_usage": { + "enum": ["off_session", "on_session"], + "type": "string" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["line1"], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "shipping", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_params", + "type": "object" + }, + "transfer_group": { + "type": "string" + } + }, + "title": "payment_intent_data_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.\nThis may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode. Defaults to `always`.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": ["always", "if_required"], + "type": "string" + }, + "payment_method_configuration": { + "description": "The ID of the payment method configuration to use with this Checkout session.", + "maxLength": 100, + "type": "string" + }, + "payment_method_data": { + "description": "This parameter allows you to set some attributes on the payment method created during a Checkout session.", + "properties": { + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + } + }, + "title": "payment_method_data_param", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": ["cad", "usd"], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": ["combined", "interval", "sporadic"], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "affirm": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "alipay": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "amazon_pay": { + "properties": { + "setup_future_usage": { + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "bancontact": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "boleto": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "installments_param", + "type": "object" + }, + "request_extended_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "restrictions": { + "properties": { + "brands_blocked": { + "items": { + "enum": [ + "american_express", + "discover_global_network", + "mastercard", + "visa" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "restrictions_param", + "type": "object" + }, + "setup_future_usage": { + "enum": ["off_session", "on_session"], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "maxLength": 17, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "cashapp": { + "properties": { + "setup_future_usage": { + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "customer_balance": { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": ["bank_transfer"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "eps": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "fpx": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "giropay": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "grabpay": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "ideal": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "kakao_pay": { + "properties": { + "capture_method": { + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "klarna": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "konbini": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "kr_card": { + "properties": { + "capture_method": { + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "link": { + "properties": { + "setup_future_usage": { + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "mobilepay": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "multibanco": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "naver_pay": { + "properties": { + "capture_method": { + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "oxxo": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "p24": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + "payco": { + "properties": { + "capture_method": { + "enum": ["manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "paynow": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "paypal": { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reference": { + "maxLength": 127, + "type": "string" + }, + "risk_correlation_id": { + "maxLength": 32, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "pix": { + "properties": { + "expires_after_seconds": { + "type": "integer" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "revolut_pay": { + "properties": { + "setup_future_usage": { + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "samsung_pay": { + "properties": { + "capture_method": { + "enum": ["manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sofort": { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "swish": { + "properties": { + "reference": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": ["automatic", "instant"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "wechat_pay": { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": ["android", "ios", "web"], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "required": ["client"], + "title": "payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.\n\nYou can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).\nSee [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.\n\nRead more about the supported payment methods and their requirements in our [payment\nmethod details guide](/docs/payments/checkout/payment-methods).\n\nIf multiple payment methods are passed, Checkout will dynamically reorder them to\nprioritize the most relevant payment methods based on the customer's location and\nother characteristics.", + "items": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "phone_number_collection": { + "description": "Controls phone number collection settings for the session.\n\nWe recommend that you review your privacy policy and check with your legal contacts\nbefore using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "phone_number_collection_params", + "type": "object" + }, + "redirect_on_completion": { + "description": "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`.", + "enum": ["always", "if_required", "never"], + "type": "string" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the\npayment method's app or site. This parameter is required if ui_mode is `embedded`\nand redirect-based payment methods are enabled on the session.", + "maxLength": 5000, + "type": "string" + }, + "saved_payment_method_options": { + "description": "Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.", + "properties": { + "allow_redisplay_filters": { + "items": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "type": "array" + }, + "payment_method_save": { + "enum": ["disabled", "enabled"], + "type": "string" + } + }, + "title": "saved_payment_method_options_param", + "type": "object" + }, + "setup_intent_data": { + "description": "A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.", + "properties": { + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + } + }, + "title": "setup_intent_data_param", + "type": "object" + }, + "shipping_address_collection": { + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer.", + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "shipping_address_collection_params", + "type": "object" + }, + "shipping_options": { + "description": "The shipping rate options to apply to this Session. Up to a maximum of 5.", + "items": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": ["amount"], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": ["amount", "currency"], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": ["display_name"], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_option_params", + "type": "object" + }, + "type": "array" + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.", + "enum": ["auto", "book", "donate", "pay", "subscribe"], + "type": "string" + }, + "subscription_data": { + "description": "A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "billing_cycle_anchor": { + "format": "unix-time", + "type": "integer" + }, + "default_tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "invoice_settings": { + "properties": { + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings_params", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": ["create_prorations", "none"], + "type": "string" + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "format": "unix-time", + "type": "integer" + }, + "trial_period_days": { + "type": "integer" + }, + "trial_settings": { + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + } + }, + "title": "subscription_data_params", + "type": "object" + }, + "success_url": { + "description": "The URL to which Stripe should send customers when payment or setup\nis complete.\nThis parameter is not allowed if ui_mode is `embedded`. If you’d like to use\ninformation from the successful Checkout Session on your page, read the\nguide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "description": "Controls tax ID collection during checkout.", + "properties": { + "enabled": { + "type": "boolean" + }, + "required": { + "enum": ["if_supported", "never"], + "type": "string" + } + }, + "required": ["enabled"], + "title": "tax_id_collection_params", + "type": "object" + }, + "ui_mode": { + "description": "The UI mode of the Session. Defaults to `hosted`.", + "enum": ["embedded", "hosted"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Session" + } + }, + "/v1/checkout/sessions/{session}": { + "get": { + "description": "

Retrieves a Session object.

", + "operationId": "GetCheckoutSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 66, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Session" + }, + "post": { + "description": "

Updates a Session object.

", + "operationId": "PostCheckoutSessionsSession", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "collected_information": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "collected_information": { + "description": "Information about the customer collected within the Checkout Session.", + "properties": { + "shipping_details": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country", "line1"], + "title": "address", + "type": "object" + }, + "name": { + "maxLength": 255, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "shipping_details_params", + "type": "object" + } + }, + "title": "collected_information_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a Session" + } + }, + "/v1/checkout/sessions/{session}/expire": { + "post": { + "description": "

A Session can be expired when it is in one of these statuses: open

\n\n

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

", + "operationId": "PostCheckoutSessionsSessionExpire", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Expire a Session" + } + }, + "/v1/checkout/sessions/{session}/line_items": { + "get": { + "description": "

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.

", + "operationId": "GetCheckoutSessionsSessionLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Checkout Session's line items" + } + }, + "/v1/climate/orders": { + "get": { + "description": "

Lists all Climate order objects. The orders are returned sorted by creation date, with the\nmost recently created orders appearing first.

", + "operationId": "GetClimateOrders", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/climate.order" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/climate/orders", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ClimateRemovalsOrdersList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List orders" + }, + "post": { + "description": "

Creates a Climate order object for a given Climate product. The order will be processed immediately\nafter creation and payment will be deducted your Stripe balance.

", + "operationId": "PostClimateOrders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "beneficiary": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Requested amount of carbon removal units. Either this or `metric_tons` must be specified.", + "type": "integer" + }, + "beneficiary": { + "description": "Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.", + "properties": { + "public_name": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["public_name"], + "title": "beneficiary_params", + "type": "object" + }, + "currency": { + "description": "Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "metric_tons": { + "description": "Requested number of tons for the order. Either this or `amount` must be specified.", + "format": "decimal", + "type": "string" + }, + "product": { + "description": "Unique identifier of the Climate product.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["product"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.order" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an order" + } + }, + "/v1/climate/orders/{order}": { + "get": { + "description": "

Retrieves the details of a Climate order object with the given ID.

", + "operationId": "GetClimateOrdersOrder", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Unique identifier of the order.", + "in": "path", + "name": "order", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.order" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an order" + }, + "post": { + "description": "

Updates the specified order by setting the values of the parameters passed.

", + "operationId": "PostClimateOrdersOrder", + "parameters": [ + { + "description": "Unique identifier of the order.", + "in": "path", + "name": "order", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "beneficiary": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "beneficiary": { + "anyOf": [ + { + "properties": { + "public_name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["public_name"], + "title": "beneficiary_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.order" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an order" + } + }, + "/v1/climate/orders/{order}/cancel": { + "post": { + "description": "

Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the\nreservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier\nmight cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe\nprovides 90 days advance notice and refunds the amount_total.

", + "operationId": "PostClimateOrdersOrderCancel", + "parameters": [ + { + "description": "Unique identifier of the order.", + "in": "path", + "name": "order", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.order" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel an order" + } + }, + "/v1/climate/products": { + "get": { + "description": "

Lists all available Climate product objects.

", + "operationId": "GetClimateProducts", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/climate.product" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/climate/products", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ClimateRemovalsProductsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List products" + } + }, + "/v1/climate/products/{product}": { + "get": { + "description": "

Retrieves the details of a Climate product with the given ID.

", + "operationId": "GetClimateProductsProduct", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "product", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a product" + } + }, + "/v1/climate/suppliers": { + "get": { + "description": "

Lists all available Climate supplier objects.

", + "operationId": "GetClimateSuppliers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/climate.supplier" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/climate/suppliers", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ClimateRemovalsSuppliersList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List suppliers" + } + }, + "/v1/climate/suppliers/{supplier}": { + "get": { + "description": "

Retrieves a Climate supplier object.

", + "operationId": "GetClimateSuppliersSupplier", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "supplier", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.supplier" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a supplier" + } + }, + "/v1/confirmation_tokens/{confirmation_token}": { + "get": { + "description": "

Retrieves an existing ConfirmationToken object

", + "operationId": "GetConfirmationTokensConfirmationToken", + "parameters": [ + { + "in": "path", + "name": "confirmation_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/confirmation_token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a ConfirmationToken" + } + }, + "/v1/country_specs": { + "get": { + "description": "

Lists all Country Spec objects available in the API.

", + "operationId": "GetCountrySpecs", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/country_spec" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/country_specs", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CountrySpecList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List Country Specs" + } + }, + "/v1/country_specs/{country}": { + "get": { + "description": "

Returns a Country Spec for a given Country code.

", + "operationId": "GetCountrySpecsCountry", + "parameters": [ + { + "in": "path", + "name": "country", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/country_spec" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Country Spec" + } + }, + "/v1/coupons": { + "get": { + "description": "

Returns a list of your coupons.

", + "operationId": "GetCoupons", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/coupon" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/coupons", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CouponsResourceCouponList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all coupons" + }, + "post": { + "description": "

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

\n\n

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.

", + "operationId": "PostCoupons", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "applies_to": { + "explode": true, + "style": "deepObject" + }, + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_off": { + "description": "A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).", + "type": "integer" + }, + "applies_to": { + "description": "A hash containing directions for what this Coupon will apply discounts to.", + "properties": { + "products": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "applies_to_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).", + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount_off": { + "type": "integer" + } + }, + "required": ["amount_off"], + "title": "currency_option", + "type": "object" + }, + "description": "Coupons defined in each available currency option (only supported if `amount_off` is passed). 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).", + "type": "object" + }, + "duration": { + "description": "Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.", + "enum": ["forever", "once", "repeating"], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.", + "maxLength": 5000, + "type": "string" + }, + "max_redemptions": { + "description": "A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.", + "maxLength": 40, + "type": "string" + }, + "percent_off": { + "description": "A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).", + "type": "number" + }, + "redeem_by": { + "description": "Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a coupon" + } + }, + "/v1/coupons/{coupon}": { + "delete": { + "description": "

You can delete coupons via the coupon management 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.

", + "operationId": "DeleteCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a coupon" + }, + "get": { + "description": "

Retrieves the coupon with the given ID.

", + "operationId": "GetCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a coupon" + }, + "post": { + "description": "

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

", + "operationId": "PostCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "amount_off": { + "type": "integer" + } + }, + "required": ["amount_off"], + "title": "currency_option", + "type": "object" + }, + "description": "Coupons defined in each available currency option (only supported if the coupon is amount-based). 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).", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.", + "maxLength": 40, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a coupon" + } + }, + "/v1/credit_notes": { + "get": { + "description": "

Returns a list of credit notes.

", + "operationId": "GetCreditNotes", + "parameters": [ + { + "description": "Only return credit notes that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return credit notes for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return credit notes for the invoice specified by this invoice ID.", + "in": "query", + "name": "invoice", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/credit_note" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CreditNotesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all credit notes" + }, + "post": { + "description": "

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces\nits amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result\nin any combination of the following:

\n\n
    \n
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • \n
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • \n
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • \n
\n\n

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

\n\n

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount\nor post_payment_credit_notes_amount depending on its status at the time of credit note creation.

", + "operationId": "PostCreditNotes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "lines": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "type": "integer" + }, + "credit_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "type": "integer" + }, + "effective_at": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "email_type": { + "description": "Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.", + "enum": ["credit_note", "none"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice": { + "description": "ID of the invoice.", + "maxLength": 5000, + "type": "string" + }, + "lines": { + "description": "Line items that make up the credit note.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_amounts": { + "anyOf": [ + { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_rate": { + "maxLength": 5000, + "type": "string" + }, + "taxable_amount": { + "type": "integer" + } + }, + "required": [ + "amount", + "tax_rate", + "taxable_amount" + ], + "title": "tax_amount_with_tax_rate_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": { + "enum": ["custom_line_item", "invoice_line_item"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["type"], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "memo": { + "description": "The credit note's memo appears on the credit note PDF.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "out_of_band_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "type": "integer" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "refund": { + "description": "ID of an existing refund to link this credit note to.", + "type": "string" + }, + "refund_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "type": "integer" + }, + "shipping_cost": { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + } + }, + "required": ["invoice"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a credit note" + } + }, + "/v1/credit_notes/preview": { + "get": { + "description": "

Get a preview of a credit note without creating it.

", + "operationId": "GetCreditNotesPreview", + "parameters": [ + { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "in": "query", + "name": "amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "in": "query", + "name": "credit_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "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.", + "in": "query", + "name": "effective_at", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.", + "in": "query", + "name": "email_type", + "required": false, + "schema": { + "enum": ["credit_note", "none"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "ID of the invoice.", + "in": "query", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Line items that make up the credit note.", + "explode": true, + "in": "query", + "name": "lines", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_amounts": { + "anyOf": [ + { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_rate": { + "maxLength": 5000, + "type": "string" + }, + "taxable_amount": { + "type": "integer" + } + }, + "required": ["amount", "tax_rate", "taxable_amount"], + "title": "tax_amount_with_tax_rate_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": { + "enum": ["custom_line_item", "invoice_line_item"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["type"], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The credit note's memo appears on the credit note PDF.", + "in": "query", + "name": "memo", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "explode": true, + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "in": "query", + "name": "out_of_band_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "in": "query", + "name": "reason", + "required": false, + "schema": { + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "ID of an existing refund to link this credit note to.", + "in": "query", + "name": "refund", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "in": "query", + "name": "refund_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "explode": true, + "in": "query", + "name": "shipping_cost", + "required": false, + "schema": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Preview a credit note" + } + }, + "/v1/credit_notes/preview/lines": { + "get": { + "description": "

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.

", + "operationId": "GetCreditNotesPreviewLines", + "parameters": [ + { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "in": "query", + "name": "amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "in": "query", + "name": "credit_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "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.", + "in": "query", + "name": "effective_at", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.", + "in": "query", + "name": "email_type", + "required": false, + "schema": { + "enum": ["credit_note", "none"], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "ID of the invoice.", + "in": "query", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Line items that make up the credit note.", + "explode": true, + "in": "query", + "name": "lines", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_amounts": { + "anyOf": [ + { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_rate": { + "maxLength": 5000, + "type": "string" + }, + "taxable_amount": { + "type": "integer" + } + }, + "required": ["amount", "tax_rate", "taxable_amount"], + "title": "tax_amount_with_tax_rate_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": { + "enum": ["custom_line_item", "invoice_line_item"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["type"], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The credit note's memo appears on the credit note PDF.", + "in": "query", + "name": "memo", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "explode": true, + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "in": "query", + "name": "out_of_band_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "in": "query", + "name": "reason", + "required": false, + "schema": { + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "ID of an existing refund to link this credit note to.", + "in": "query", + "name": "refund", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "in": "query", + "name": "refund_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "explode": true, + "in": "query", + "name": "shipping_cost", + "required": false, + "schema": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a credit note preview's line items" + } + }, + "/v1/credit_notes/{credit_note}/lines": { + "get": { + "description": "

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.

", + "operationId": "GetCreditNotesCreditNoteLines", + "parameters": [ + { + "in": "path", + "name": "credit_note", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a credit note's line items" + } + }, + "/v1/credit_notes/{id}": { + "get": { + "description": "

Retrieves the credit note object with the given identifier.

", + "operationId": "GetCreditNotesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a credit note" + }, + "post": { + "description": "

Updates an existing credit note.

", + "operationId": "PostCreditNotesId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "memo": { + "description": "Credit note memo.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a credit note" + } + }, + "/v1/credit_notes/{id}/void": { + "post": { + "description": "

Marks a credit note as void. Learn more about voiding credit notes.

", + "operationId": "PostCreditNotesIdVoid", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Void a credit note" + } + }, + "/v1/customer_sessions": { + "post": { + "description": "

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.

", + "operationId": "PostCustomerSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "components": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "components": { + "description": "Configuration for each component. Exactly 1 component must be enabled.", + "properties": { + "buy_button": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "buy_button_param", + "type": "object" + }, + "payment_element": { + "properties": { + "enabled": { + "type": "boolean" + }, + "features": { + "properties": { + "payment_method_allow_redisplay_filters": { + "items": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "type": "array" + }, + "payment_method_redisplay": { + "enum": ["disabled", "enabled"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_method_redisplay_limit": { + "type": "integer" + }, + "payment_method_remove": { + "enum": ["disabled", "enabled"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_method_save": { + "enum": ["disabled", "enabled"], + "type": "string", + "x-stripeBypassValidation": true + }, + "payment_method_save_usage": { + "enum": ["off_session", "on_session"], + "type": "string" + } + }, + "title": "features_param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "payment_element_param", + "type": "object" + }, + "pricing_table": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "pricing_table_param", + "type": "object" + } + }, + "title": "components", + "type": "object" + }, + "customer": { + "description": "The ID of an existing customer for which to create the Customer Session.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["components", "customer"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Customer Session" + } + }, + "/v1/customers": { + "get": { + "description": "

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

", + "operationId": "GetCustomers", + "parameters": [ + { + "description": "Only return customers that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.", + "in": "query", + "name": "email", + "required": false, + "schema": { + "maxLength": 512, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/customer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/customers", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CustomerResourceCustomerList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all customers" + }, + "post": { + "description": "

Creates a new customer object.

", + "operationId": "PostCustomers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "cash_balance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "tax": { + "explode": true, + "style": "deepObject" + }, + "tax_id_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.", + "type": "integer" + }, + "cash_balance": { + "description": "Balance information and default balance settings for this customer.", + "properties": { + "settings": { + "properties": { + "reconciliation_mode": { + "enum": ["automatic", "manual", "merchant_default"], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "title": "cash_balance_param", + "type": "object" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "email": { + "description": "Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.", + "maxLength": 512, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "description": "Default invoice settings for this customer.", + "properties": { + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + }, + "template": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "customer_rendering_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "customer_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 256, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The sequence to be used on the customer's next invoice. Defaults to 1.", + "type": "integer" + }, + "payment_method": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 20, + "type": "string" + }, + "preferred_locales": { + "description": "Customer's preferred languages, ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "promotion_code": { + "description": "The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The customer's shipping information. Appears on invoices emailed to this customer." + }, + "source": { + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "tax": { + "description": "Tax details about the customer.", + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "validate_location": { + "enum": ["deferred", "immediately"], + "type": "string" + } + }, + "title": "shared_tax_create_param", + "type": "object" + }, + "tax_exempt": { + "description": "The customer's tax exemption. One of `none`, `exempt`, or `reverse`.", + "enum": ["", "exempt", "none", "reverse"], + "type": "string" + }, + "tax_id_data": { + "description": "The customer's tax IDs.", + "items": { + "properties": { + "type": { + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": ["type", "value"], + "title": "data_params", + "type": "object" + }, + "type": "array" + }, + "test_clock": { + "description": "ID of the test clock to attach to the customer.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a customer" + } + }, + "/v1/customers/search": { + "get": { + "description": "

Search for customers you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetCustomersSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/customer" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search customers" + } + }, + "/v1/customers/{customer}": { + "delete": { + "description": "

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

", + "operationId": "DeleteCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a customer" + }, + "get": { + "description": "

Retrieves a Customer object.

", + "operationId": "GetCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a customer" + }, + "post": { + "description": "

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.

\n\n

This request accepts mostly the same arguments as the customer creation call.

", + "operationId": "PostCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cash_balance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "tax": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.", + "type": "integer" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": ["card"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "cash_balance": { + "description": "Balance information and default balance settings for this customer.", + "properties": { + "settings": { + "properties": { + "reconciliation_mode": { + "enum": ["automatic", "manual", "merchant_default"], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "title": "cash_balance_param", + "type": "object" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_alipay_account": { + "description": "ID of Alipay account to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_bank_account": { + "description": "ID of bank account to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_card": { + "description": "ID of card to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_source": { + "description": "If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.\n\nProvide the ID of a payment source already attached to this customer to make it this customer's default payment source.\n\nIf you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.", + "maxLength": 500, + "type": "string" + }, + "description": { + "description": "An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "email": { + "description": "Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.", + "maxLength": 512, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "description": "Default invoice settings for this customer.", + "properties": { + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + }, + "template": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "customer_rendering_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "customer_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 256, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The sequence to be used on the customer's next invoice. Defaults to 1.", + "type": "integer" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 20, + "type": "string" + }, + "preferred_locales": { + "description": "Customer's preferred languages, ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "promotion_code": { + "description": "The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The customer's shipping information. Appears on invoices emailed to this customer." + }, + "source": { + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "tax": { + "description": "Tax details about the customer.", + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "validate_location": { + "enum": ["auto", "deferred", "immediately"], + "type": "string" + } + }, + "title": "shared_tax_update_param", + "type": "object" + }, + "tax_exempt": { + "description": "The customer's tax exemption. One of `none`, `exempt`, or `reverse`.", + "enum": ["", "exempt", "none", "reverse"], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a customer" + } + }, + "/v1/customers/{customer}/balance_transactions": { + "get": { + "description": "

Returns a list of transactions that updated the customer’s balances.

", + "operationId": "GetCustomersCustomerBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/customer_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CustomerBalanceTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List customer balance transactions" + }, + "post": { + "description": "

Creates an immutable transaction that updates the customer’s credit balance.

", + "operationId": "PostCustomersCustomerBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.", + "type": "integer" + }, + "currency": { + "description": "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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 350, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": ["amount", "currency"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a customer balance transaction" + } + }, + "/v1/customers/{customer}/balance_transactions/{transaction}": { + "get": { + "description": "

Retrieves a specific customer balance transaction that updated the customer’s balances.

", + "operationId": "GetCustomersCustomerBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a customer balance transaction" + }, + "post": { + "description": "

Most credit balance transaction fields are immutable, but you may update its description and metadata.

", + "operationId": "PostCustomersCustomerBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 350, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a customer credit balance transaction" + } + }, + "/v1/customers/{customer}/bank_accounts": { + "get": { + "deprecated": true, + "description": "

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.

", + "operationId": "GetCustomersCustomerBankAccounts", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/bank_account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankAccountList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all bank accounts" + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerBankAccounts", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": ["card"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a card" + } + }, + "/v1/customers/{customer}/bank_accounts/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a customer source" + }, + "get": { + "deprecated": true, + "description": "

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.

", + "operationId": "GetCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a bank account" + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts/{id}/verify": { + "post": { + "description": "

Verify a specified bank account for a given customer.

", + "operationId": "PostCustomersCustomerBankAccountsIdVerify", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Verify a bank account" + } + }, + "/v1/customers/{customer}/cards": { + "get": { + "deprecated": true, + "description": "

You can see a list of the cards belonging to a customer.\nNote that the 10 most recent sources are always available on the Customer object.\nIf you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

", + "operationId": "GetCustomersCustomerCards", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/card" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CardList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all cards" + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerCards", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": ["card"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a card" + } + }, + "/v1/customers/{customer}/cards/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a customer source" + }, + "get": { + "deprecated": true, + "description": "

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.

", + "operationId": "GetCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a card" + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance": { + "get": { + "description": "

Retrieves a customer’s cash balance.

", + "operationId": "GetCustomersCustomerCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cash_balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a cash balance" + }, + "post": { + "description": "

Changes the settings on a customer’s cash balance.

", + "operationId": "PostCustomersCustomerCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "settings": { + "description": "A hash of settings for this cash balance.", + "properties": { + "reconciliation_mode": { + "enum": ["automatic", "manual", "merchant_default"], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cash_balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a cash balance's settings" + } + }, + "/v1/customers/{customer}/cash_balance_transactions": { + "get": { + "description": "

Returns a list of transactions that modified the customer’s cash balance.

", + "operationId": "GetCustomersCustomerCashBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CustomerCashBalanceTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List cash balance transactions" + } + }, + "/v1/customers/{customer}/cash_balance_transactions/{transaction}": { + "get": { + "description": "

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

", + "operationId": "GetCustomersCustomerCashBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a cash balance transaction" + } + }, + "/v1/customers/{customer}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a customer.

", + "operationId": "DeleteCustomersCustomerDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a customer discount" + }, + "get": { + "description": "", + "operationId": "GetCustomersCustomerDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/funding_instructions": { + "post": { + "description": "

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new\nfunding instructions will be created. If funding instructions have already been created for a given customer, the same\nfunding instructions will be retrieved. In other words, we will return the same funding instructions each time.

", + "operationId": "PostCustomersCustomerFundingInstructions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_transfer": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_transfer": { + "description": "Additional parameters for `bank_transfer` funding types", + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_account_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": ["iban", "sort_code", "spei", "zengin"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "bank_transfer_params", + "type": "object" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "funding_type": { + "description": "The `funding_type` to get the instructions for.", + "enum": ["bank_transfer"], + "type": "string" + } + }, + "required": ["bank_transfer", "currency", "funding_type"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/funding_instructions" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create or retrieve funding instructions for a customer cash balance" + } + }, + "/v1/customers/{customer}/payment_methods": { + "get": { + "description": "

Returns a list of PaymentMethods for a given Customer

", + "operationId": "GetCustomersCustomerPaymentMethods", + "parameters": [ + { + "description": "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`.", + "in": "query", + "name": "allow_redisplay", + "required": false, + "schema": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "style": "form" + }, + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CustomerPaymentMethodResourceList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List a Customer's PaymentMethods" + } + }, + "/v1/customers/{customer}/payment_methods/{payment_method}": { + "get": { + "description": "

Retrieves a PaymentMethod object for a given Customer.

", + "operationId": "GetCustomersCustomerPaymentMethodsPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Customer's PaymentMethod" + } + }, + "/v1/customers/{customer}/sources": { + "get": { + "description": "

List sources for a specified customer.

", + "operationId": "GetCustomersCustomerSources", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter sources according to a particular object type.", + "in": "query", + "name": "object", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerSources", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "object": { + "enum": ["bank_account"], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": ["card"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a card" + } + }, + "/v1/customers/{customer}/sources/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a customer source" + }, + "get": { + "description": "

Retrieve a specified source for a given customer.

", + "operationId": "GetCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources/{id}/verify": { + "post": { + "description": "

Verify a specified bank account for a given customer.

", + "operationId": "PostCustomersCustomerSourcesIdVerify", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Verify a bank account" + } + }, + "/v1/customers/{customer}/subscriptions": { + "get": { + "description": "

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.

", + "operationId": "GetCustomersCustomerSubscriptions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List active subscriptions" + }, + "post": { + "description": "

Creates a new subscription on an existing customer.

", + "operationId": "PostCustomersCustomerSubscriptions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions)." + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "backdate_start_date": { + "description": "For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor": { + "description": "A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future 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.", + "format": "unix-time", + "type": "integer", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.", + "format": "unix-time", + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.", + "type": "boolean" + }, + "collection_method": { + "description": "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`. Defaults to `charge_automatically`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings_param", + "type": "object" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).", + "type": "boolean" + }, + "payment_behavior": { + "description": "Only applies to subscriptions with `collection_method=charge_automatically`.\n\nUse `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.\n\n`pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.\n\nSubscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": ["off", "on_subscription"], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.", + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." + }, + "trial_from_plan": { + "description": "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.", + "type": "boolean" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "integer" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a subscription" + } + }, + "/v1/customers/{customer}/subscriptions/{subscription_exposed_id}": { + "delete": { + "description": "

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.

\n\n

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. 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.

\n\n

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.

", + "operationId": "DeleteCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.", + "type": "boolean" + }, + "prorate": { + "description": "Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a subscription" + }, + "get": { + "description": "

Retrieves the subscription with the given ID.

", + "operationId": "GetCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a subscription" + }, + "post": { + "description": "

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 endpoint.

", + "operationId": "PostCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "cancel_at": { + "explode": true, + "style": "deepObject" + }, + "cancellation_details": { + "explode": true, + "style": "deepObject" + }, + "default_source": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pause_collection": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions)." + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." + }, + "cancel_at_period_end": { + "description": "Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.", + "type": "boolean" + }, + "cancellation_details": { + "description": "Details about why this subscription was cancelled", + "properties": { + "comment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "feedback": { + "enum": [ + "", + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + } + }, + "title": "cancellation_details_param", + "type": "object" + }, + "collection_method": { + "description": "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`. Defaults to `charge_automatically`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. Pass an empty string to remove previously-defined tax rates." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings_param", + "type": "object" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).", + "type": "boolean" + }, + "pause_collection": { + "anyOf": [ + { + "properties": { + "behavior": { + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["behavior"], + "title": "pause_collection_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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)." + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": ["off", "on_subscription"], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value." + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`." + }, + "trial_from_plan": { + "description": "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.", + "type": "boolean" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a subscription on a customer" + } + }, + "/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a customer.

", + "operationId": "DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a customer discount" + }, + "get": { + "description": "", + "operationId": "GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/tax_ids": { + "get": { + "description": "

Returns a list of tax IDs for a customer.

", + "operationId": "GetCustomersCustomerTaxIds", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Customer tax IDs" + }, + "post": { + "description": "

Creates a new tax_id object for a customer.

", + "operationId": "PostCustomersCustomerTaxIds", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `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`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `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`, `kh_tin`, `kr_brn`, `kz_bin`, `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`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "description": "Value of the tax ID.", + "type": "string" + } + }, + "required": ["type", "value"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Customer tax ID" + } + }, + "/v1/customers/{customer}/tax_ids/{id}": { + "delete": { + "description": "

Deletes an existing tax_id object.

", + "operationId": "DeleteCustomersCustomerTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a Customer tax ID" + }, + "get": { + "description": "

Retrieves the tax_id object with the given identifier.

", + "operationId": "GetCustomersCustomerTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Customer tax ID" + } + }, + "/v1/disputes": { + "get": { + "description": "

Returns a list of your disputes.

", + "operationId": "GetDisputes", + "parameters": [ + { + "description": "Only return disputes associated to the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return disputes that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/dispute" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/disputes", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "DisputeList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all disputes" + } + }, + "/v1/disputes/{dispute}": { + "get": { + "description": "

Retrieves the dispute with the given ID.

", + "operationId": "GetDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a dispute" + }, + "post": { + "description": "

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, but if you prefer, you can use the API to submit evidence programmatically.

\n\n

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.

", + "operationId": "PostDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "evidence": { + "description": "Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.", + "properties": { + "access_activity_log": { + "maxLength": 20000, + "type": "string" + }, + "billing_address": { + "maxLength": 5000, + "type": "string" + }, + "cancellation_policy": { + "type": "string" + }, + "cancellation_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "cancellation_rebuttal": { + "maxLength": 20000, + "type": "string" + }, + "customer_communication": { + "type": "string" + }, + "customer_email_address": { + "maxLength": 5000, + "type": "string" + }, + "customer_name": { + "maxLength": 5000, + "type": "string" + }, + "customer_purchase_ip": { + "maxLength": 5000, + "type": "string" + }, + "customer_signature": { + "type": "string" + }, + "duplicate_charge_documentation": { + "type": "string" + }, + "duplicate_charge_explanation": { + "maxLength": 20000, + "type": "string" + }, + "duplicate_charge_id": { + "maxLength": 5000, + "type": "string" + }, + "enhanced_evidence": { + "anyOf": [ + { + "properties": { + "visa_compelling_evidence_3": { + "properties": { + "disputed_transaction": { + "properties": { + "customer_account_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_fingerprint": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_email_address": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_purchase_ip": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "merchandise_or_services": { + "enum": ["merchandise", "services"], + "type": "string" + }, + "product_description": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "country": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line1": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line2": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "postal_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "state": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "shipping_address", + "type": "object" + } + }, + "title": "visa_compelling_evidence3_disputed_transaction", + "type": "object" + }, + "prior_undisputed_transactions": { + "items": { + "properties": { + "charge": { + "maxLength": 5000, + "type": "string" + }, + "customer_account_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_fingerprint": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_device_id": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_email_address": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_purchase_ip": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "country": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line1": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line2": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "postal_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "state": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "shipping_address", + "type": "object" + } + }, + "required": ["charge"], + "title": "visa_compelling_evidence3_prior_undisputed_transaction", + "type": "object" + }, + "type": "array" + } + }, + "title": "visa_compelling_evidence3", + "type": "object" + }, + "visa_compliance": { + "properties": { + "fee_acknowledged": { + "type": "boolean" + } + }, + "title": "visa_compliance", + "type": "object" + } + }, + "title": "enhanced_evidence", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 20000, + "type": "string" + }, + "receipt": { + "type": "string" + }, + "refund_policy": { + "type": "string" + }, + "refund_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "refund_refusal_explanation": { + "maxLength": 20000, + "type": "string" + }, + "service_date": { + "maxLength": 5000, + "type": "string" + }, + "service_documentation": { + "type": "string" + }, + "shipping_address": { + "maxLength": 5000, + "type": "string" + }, + "shipping_carrier": { + "maxLength": 5000, + "type": "string" + }, + "shipping_date": { + "maxLength": 5000, + "type": "string" + }, + "shipping_documentation": { + "type": "string" + }, + "shipping_tracking_number": { + "maxLength": 5000, + "type": "string" + }, + "uncategorized_file": { + "type": "string" + }, + "uncategorized_text": { + "maxLength": 20000, + "type": "string" + } + }, + "title": "dispute_evidence_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "submit": { + "description": "Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a dispute" + } + }, + "/v1/disputes/{dispute}/close": { + "post": { + "description": "

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.

\n\n

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

", + "operationId": "PostDisputesDisputeClose", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Close a dispute" + } + }, + "/v1/entitlements/active_entitlements": { + "get": { + "description": "

Retrieve a list of active entitlements for a customer

", + "operationId": "GetEntitlementsActiveEntitlements", + "parameters": [ + { + "description": "The ID of the customer.", + "in": "query", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/entitlements.active_entitlement" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "EntitlementsResourceCustomerEntitlementList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all active entitlements" + } + }, + "/v1/entitlements/active_entitlements/{id}": { + "get": { + "description": "

Retrieve an active entitlement

", + "operationId": "GetEntitlementsActiveEntitlementsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The ID of the entitlement.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/entitlements.active_entitlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an active entitlement" + } + }, + "/v1/entitlements/features": { + "get": { + "description": "

Retrieve a list of features

", + "operationId": "GetEntitlementsFeatures", + "parameters": [ + { + "description": "If set, filter results to only include features with the given archive status.", + "in": "query", + "name": "archived", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If set, filter results to only include features with the given lookup_key.", + "in": "query", + "name": "lookup_key", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/entitlements.feature" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/entitlements/features", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "EntitlementsResourceFeatureList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all features" + }, + "post": { + "description": "

Creates a feature

", + "operationId": "PostEntitlementsFeatures", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A unique key you provide as your own system identifier. This may be up to 80 characters.", + "maxLength": 80, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "The feature's name, for your own purpose, not meant to be displayable to the customer.", + "maxLength": 80, + "type": "string" + } + }, + "required": ["lookup_key", "name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/entitlements.feature" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a feature" + } + }, + "/v1/entitlements/features/{id}": { + "get": { + "description": "

Retrieves a feature

", + "operationId": "GetEntitlementsFeaturesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The ID of the feature.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/entitlements.feature" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a feature" + }, + "post": { + "description": "

Update a feature’s metadata or permanently deactivate it.

", + "operationId": "PostEntitlementsFeaturesId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Inactive features cannot be attached to new products and will not be returned from the features list endpoint.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "name": { + "description": "The feature's name, for your own purpose, not meant to be displayable to the customer.", + "maxLength": 80, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/entitlements.feature" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Updates a feature" + } + }, + "/v1/ephemeral_keys": { + "post": { + "description": "

Creates a short-lived API key for a given resource.

", + "operationId": "PostEphemeralKeys", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of the Customer you'd like to modify using the resulting ephemeral key.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "issuing_card": { + "description": "The ID of the Issuing Card you'd like to access using the resulting ephemeral key.", + "maxLength": 5000, + "type": "string" + }, + "nonce": { + "description": "A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information.", + "maxLength": 5000, + "type": "string" + }, + "verification_session": { + "description": "The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ephemeral_key" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an ephemeral key" + } + }, + "/v1/ephemeral_keys/{key}": { + "delete": { + "description": "

Invalidates a short-lived API key for a given resource.

", + "operationId": "DeleteEphemeralKeysKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ephemeral_key" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Immediately invalidate an ephemeral key" + } + }, + "/v1/events": { + "get": { + "description": "

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 api_version attribute (not according to your current Stripe API version or Stripe-Version header).

", + "operationId": "GetEvents", + "parameters": [ + { + "description": "Only return events that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.", + "in": "query", + "name": "delivery_success", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.", + "explode": true, + "in": "query", + "name": "types", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/event" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/events", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "NotificationEventList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all events" + } + }, + "/v1/events/{id}": { + "get": { + "description": "

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.

", + "operationId": "GetEventsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/event" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an event" + } + }, + "/v1/exchange_rates": { + "get": { + "description": "

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.

", + "operationId": "GetExchangeRates", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/exchange_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/exchange_rates", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ExchangeRateList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all exchange rates" + } + }, + "/v1/exchange_rates/{rate_id}": { + "get": { + "description": "

Retrieves the exchange rates from the given currency to every supported currency.

", + "operationId": "GetExchangeRatesRateId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "rate_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/exchange_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an exchange rate" + } + }, + "/v1/file_links": { + "get": { + "description": "

Returns a list of file links.

", + "operationId": "GetFileLinks", + "parameters": [ + { + "description": "Only return links that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Filter links by their expiration status. By default, Stripe returns all links.", + "in": "query", + "name": "expired", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return links for the given file.", + "in": "query", + "name": "file", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FileResourceFileLinkList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all file links" + }, + "post": { + "description": "

Creates a new file link object.

", + "operationId": "PostFileLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The link isn't usable after this future timestamp.", + "format": "unix-time", + "type": "integer" + }, + "file": { + "description": "The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": ["file"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a file link" + } + }, + "/v1/file_links/{link}": { + "get": { + "description": "

Retrieves the file link with the given ID.

", + "operationId": "GetFileLinksLink", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "link", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a file link" + }, + "post": { + "description": "

Updates an existing file link object. Expired links can no longer be updated.

", + "operationId": "PostFileLinksLink", + "parameters": [ + { + "in": "path", + "name": "link", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "expires_at": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a file link" + } + }, + "/v1/files": { + "get": { + "description": "

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.

", + "operationId": "GetFiles", + "parameters": [ + { + "description": "Only return files that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.", + "in": "query", + "name": "purpose", + "required": false, + "schema": { + "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", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/file" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/files", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FileResourceFileList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all files" + }, + "post": { + "description": "

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.

\n\n

All of Stripe’s officially supported Client libraries support sending multipart/form-data.

", + "operationId": "PostFiles", + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "file_link_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "file": { + "description": "A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.", + "format": "binary", + "type": "string" + }, + "file_link_data": { + "description": "Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.", + "properties": { + "create": { + "type": "boolean" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["create"], + "title": "file_link_creation_params", + "type": "object" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "identity_document", + "issuing_regulatory_reporting", + "pci_document", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["file", "purpose"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "servers": [ + { + "url": "https://files.stripe.com/" + } + ], + "summary": "Create a file" + } + }, + "/v1/files/{file}": { + "get": { + "description": "

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.

", + "operationId": "GetFilesFile", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "file", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a file" + } + }, + "/v1/financial_connections/accounts": { + "get": { + "description": "

Returns a list of Financial Connections Account objects.

", + "operationId": "GetFinancialConnectionsAccounts", + "parameters": [ + { + "description": "If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.", + "explode": true, + "in": "query", + "name": "account_holder", + "required": false, + "schema": { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "accountholder_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If present, only return accounts that were collected as part of the given session.", + "in": "query", + "name": "session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List Accounts" + } + }, + "/v1/financial_connections/accounts/{account}": { + "get": { + "description": "

Retrieves the details of an Financial Connections Account.

", + "operationId": "GetFinancialConnectionsAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an Account" + } + }, + "/v1/financial_connections/accounts/{account}/disconnect": { + "post": { + "description": "

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).

", + "operationId": "PostFinancialConnectionsAccountsAccountDisconnect", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Disconnect an Account" + } + }, + "/v1/financial_connections/accounts/{account}/owners": { + "get": { + "description": "

Lists all owners for a given Account

", + "operationId": "GetFinancialConnectionsAccountsAccountOwners", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ID of the ownership object to fetch owners from.", + "in": "query", + "name": "ownership", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List Account Owners" + } + }, + "/v1/financial_connections/accounts/{account}/refresh": { + "post": { + "description": "

Refreshes the data associated with a Financial Connections Account.

", + "operationId": "PostFinancialConnectionsAccountsAccountRefresh", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features that you would like to refresh.", + "items": { + "enum": ["balance", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": ["features"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Refresh Account data" + } + }, + "/v1/financial_connections/accounts/{account}/subscribe": { + "post": { + "description": "

Subscribes to periodic refreshes of data associated with a Financial Connections Account.

", + "operationId": "PostFinancialConnectionsAccountsAccountSubscribe", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features to which you would like to subscribe.", + "items": { + "enum": ["transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": ["features"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Subscribe to data refreshes for an Account" + } + }, + "/v1/financial_connections/accounts/{account}/unsubscribe": { + "post": { + "description": "

Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.

", + "operationId": "PostFinancialConnectionsAccountsAccountUnsubscribe", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features from which you would like to unsubscribe.", + "items": { + "enum": ["transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": ["features"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Unsubscribe from data refreshes for an Account" + } + }, + "/v1/financial_connections/sessions": { + "post": { + "description": "

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.

", + "operationId": "PostFinancialConnectionsSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_holder": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "filters": { + "explode": true, + "style": "deepObject" + }, + "permissions": { + "explode": true, + "style": "deepObject" + }, + "prefetch": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder": { + "description": "The account holder to link accounts for.", + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["account", "customer"], + "type": "string" + } + }, + "required": ["type"], + "title": "accountholder_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "filters": { + "description": "Filters to restrict the kinds of accounts to collect.", + "properties": { + "account_subcategories": { + "items": { + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings" + ], + "type": "string" + }, + "type": "array" + }, + "countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "filters_params", + "type": "object" + }, + "permissions": { + "description": "List of data features that you would like to request access to.\n\nPossible values are `balances`, `transactions`, `ownership`, and `payment_method`.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "description": "List of data features that you would like to retrieve upon account creation.", + "items": { + "enum": ["balances", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_holder", "permissions"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Session" + } + }, + "/v1/financial_connections/sessions/{session}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Session

", + "operationId": "GetFinancialConnectionsSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Session" + } + }, + "/v1/financial_connections/transactions": { + "get": { + "description": "

Returns a list of Financial Connections Transaction objects.

", + "operationId": "GetFinancialConnectionsTransactions", + "parameters": [ + { + "description": "The ID of the Financial Connections Account whose transactions will be retrieved.", + "in": "query", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:", + "explode": true, + "in": "query", + "name": "transacted_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:", + "explode": true, + "in": "query", + "name": "transaction_refresh", + "required": false, + "schema": { + "properties": { + "after": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["after"], + "title": "transaction_refresh_params", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/transactions", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List Transactions" + } + }, + "/v1/financial_connections/transactions/{transaction}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Transaction

", + "operationId": "GetFinancialConnectionsTransactionsTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Transaction" + } + }, + "/v1/forwarding/requests": { + "get": { + "description": "

Lists all ForwardingRequest objects.

", + "operationId": "GetForwardingRequests", + "parameters": [ + { + "description": "Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "created_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "List of ForwardingRequest data.", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/forwarding.request" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ForwardingRequestList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all ForwardingRequests" + }, + "post": { + "description": "

Creates a ForwardingRequest object.

", + "operationId": "PostForwardingRequests", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "replacements": { + "explode": true, + "style": "deepObject" + }, + "request": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_method": { + "description": "The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.", + "maxLength": 5000, + "type": "string" + }, + "replacements": { + "description": "The field kinds to be replaced in the forwarded request.", + "items": { + "enum": [ + "card_cvc", + "card_expiry", + "card_number", + "cardholder_name", + "request_signature" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "request": { + "description": "The request body and headers to be sent to the destination endpoint.", + "properties": { + "body": { + "maxLength": 5000, + "type": "string" + }, + "headers": { + "items": { + "properties": { + "name": { + "maxLength": 5000, + "type": "string" + }, + "value": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "header_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "request_param", + "type": "object" + }, + "url": { + "description": "The destination URL for the forwarded request. Must be supported by the config.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_method", "replacements", "url"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/forwarding.request" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a ForwardingRequest" + } + }, + "/v1/forwarding/requests/{id}": { + "get": { + "description": "

Retrieves a ForwardingRequest object.

", + "operationId": "GetForwardingRequestsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/forwarding.request" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a ForwardingRequest" + } + }, + "/v1/identity/verification_reports": { + "get": { + "description": "

List all verification reports.

", + "operationId": "GetIdentityVerificationReports", + "parameters": [ + { + "description": "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.", + "in": "query", + "name": "client_reference_id", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationReports that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationReports of this type", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": ["document", "id_number"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.", + "in": "query", + "name": "verification_session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/identity.verification_report" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/identity/verification_reports", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "GelatoVerificationReportList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List VerificationReports" + } + }, + "/v1/identity/verification_reports/{report}": { + "get": { + "description": "

Retrieves an existing VerificationReport

", + "operationId": "GetIdentityVerificationReportsReport", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_report" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a VerificationReport" + } + }, + "/v1/identity/verification_sessions": { + "get": { + "description": "

Returns a list of VerificationSessions

", + "operationId": "GetIdentityVerificationSessions", + "parameters": [ + { + "description": "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.", + "in": "query", + "name": "client_reference_id", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationSessions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "query", + "name": "related_customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["canceled", "processing", "requires_input", "verified"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/identity.verification_session" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/identity/verification_sessions", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "GelatoVerificationSessionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List VerificationSessions" + }, + "post": { + "description": "

Creates a VerificationSession object.

\n\n

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

\n\n

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

\n\n

Related guide: Verify your users’ identity documents

", + "operationId": "PostIdentityVerificationSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "options": { + "explode": true, + "style": "deepObject" + }, + "provided_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "client_reference_id": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "options": { + "description": "A set of options for the session’s verification checks.", + "properties": { + "document": { + "anyOf": [ + { + "properties": { + "allowed_types": { + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "type": "boolean" + }, + "require_live_capture": { + "type": "boolean" + }, + "require_matching_selfie": { + "type": "boolean" + } + }, + "title": "document_options", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "session_options_param", + "type": "object" + }, + "provided_details": { + "description": "Details provided about the user being verified. These details may be shown to the user.", + "properties": { + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "title": "provided_details_param", + "type": "object" + }, + "related_customer": { + "description": "Token referencing a Customer resource.", + "maxLength": 5000, + "type": "string" + }, + "return_url": { + "description": "The URL that the user will be redirected to upon completing the verification flow.", + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.", + "enum": ["document", "id_number"], + "type": "string", + "x-stripeBypassValidation": true + }, + "verification_flow": { + "description": "The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a VerificationSession" + } + }, + "/v1/identity/verification_sessions/{session}": { + "get": { + "description": "

Retrieves the details of a VerificationSession that was previously created.

\n\n

When the session status is requires_input, you can use this method to retrieve a valid\nclient_secret or url to allow re-submission.

", + "operationId": "GetIdentityVerificationSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a VerificationSession" + }, + "post": { + "description": "

Updates a VerificationSession object.

\n\n

When the session status is requires_input, you can use this method to update the\nverification check and options.

", + "operationId": "PostIdentityVerificationSessionsSession", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "options": { + "explode": true, + "style": "deepObject" + }, + "provided_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "options": { + "description": "A set of options for the session’s verification checks.", + "properties": { + "document": { + "anyOf": [ + { + "properties": { + "allowed_types": { + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "type": "boolean" + }, + "require_live_capture": { + "type": "boolean" + }, + "require_matching_selfie": { + "type": "boolean" + } + }, + "title": "document_options", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "session_options_param", + "type": "object" + }, + "provided_details": { + "description": "Details provided about the user being verified. These details may be shown to the user.", + "properties": { + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "title": "provided_details_param", + "type": "object" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": ["document", "id_number"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a VerificationSession" + } + }, + "/v1/identity/verification_sessions/{session}/cancel": { + "post": { + "description": "

A VerificationSession object can be canceled when it is in requires_input status.

\n\n

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

", + "operationId": "PostIdentityVerificationSessionsSessionCancel", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a VerificationSession" + } + }, + "/v1/identity/verification_sessions/{session}/redact": { + "post": { + "description": "

Redact a VerificationSession to remove all collected information from Stripe. This will redact\nthe VerificationSession and all objects related to it, including VerificationReports, Events,\nrequest logs, etc.

\n\n

A VerificationSession object can be redacted when it is in requires_input or verified\nstatus. Redacting a VerificationSession in requires_action\nstate will automatically cancel it.

\n\n

The redaction process may take up to four days. When the redaction process is in progress, the\nVerificationSession’s redaction.status field will be set to processing; when the process is\nfinished, it will change to redacted and an identity.verification_session.redacted event\nwill be emitted.

\n\n

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the\nfields that contain personal data will be replaced by the string [redacted] or a similar\nplaceholder. The metadata field will also be erased. Redacted objects cannot be updated or\nused for any purpose.

\n\n

Learn more.

", + "operationId": "PostIdentityVerificationSessionsSessionRedact", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Redact a VerificationSession" + } + }, + "/v1/invoice_rendering_templates": { + "get": { + "description": "

List all templates, ordered by creation date, with the most recently created template appearing first.

", + "operationId": "GetInvoiceRenderingTemplates", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "archived"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/invoice_rendering_template" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoiceRenderingTemplatesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all invoice rendering templates" + } + }, + "/v1/invoice_rendering_templates/{template}": { + "get": { + "description": "

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.

", + "operationId": "GetInvoiceRenderingTemplatesTemplate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "template", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice_rendering_template" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an invoice rendering template" + } + }, + "/v1/invoice_rendering_templates/{template}/archive": { + "post": { + "description": "

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.

", + "operationId": "PostInvoiceRenderingTemplatesTemplateArchive", + "parameters": [ + { + "in": "path", + "name": "template", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice_rendering_template" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Archive an invoice rendering template" + } + }, + "/v1/invoice_rendering_templates/{template}/unarchive": { + "post": { + "description": "

Unarchive an invoice rendering template so it can be used on new Stripe objects again.

", + "operationId": "PostInvoiceRenderingTemplatesTemplateUnarchive", + "parameters": [ + { + "in": "path", + "name": "template", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice_rendering_template" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Unarchive an invoice rendering template" + } + }, + "/v1/invoiceitems": { + "get": { + "description": "

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

", + "operationId": "GetInvoiceitems", + "parameters": [ + { + "description": "Only return invoice items that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.", + "in": "query", + "name": "invoice", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.", + "in": "query", + "name": "pending", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoiceitem" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/invoiceitems", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoicesItemsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all invoice items" + }, + "post": { + "description": "

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.

", + "operationId": "PostInvoiceitems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice": { + "description": "The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object. One of `price` or `price_data` is required.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the invoice item.", + "type": "integer" + }, + "subscription": { + "description": "The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "tax_rates": { + "description": "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.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "unit_amount": { + "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "required": ["customer"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an invoice item" + } + }, + "/v1/invoiceitems/{invoiceitem}": { + "delete": { + "description": "

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.

", + "operationId": "DeleteInvoiceitemsInvoiceitem", + "parameters": [ + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete an invoice item" + }, + "get": { + "description": "

Retrieves the invoice item with the given ID.

", + "operationId": "GetInvoiceitemsInvoiceitem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an invoice item" + }, + "post": { + "description": "

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.

", + "operationId": "PostInvoiceitemsInvoiceitem", + "parameters": [ + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object. One of `price` or `price_data` is required.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the invoice item.", + "type": "integer" + }, + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. Pass an empty string to remove previously-defined tax rates." + }, + "unit_amount": { + "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an invoice item" + } + }, + "/v1/invoices": { + "get": { + "description": "

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.

", + "operationId": "GetInvoices", + "parameters": [ + { + "description": "The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.", + "in": "query", + "name": "collection_method", + "required": false, + "schema": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return invoices that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return invoices for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "due_date", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["draft", "open", "paid", "uncollectible", "void"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return invoices for the subscription specified by this subscription ID.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoice" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/invoices", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoicesResourceList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all invoices" + }, + "post": { + "description": "

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

", + "operationId": "PostInvoices", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_tax_ids": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "from_invoice": { + "explode": true, + "style": "deepObject" + }, + "issuer": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "rendering": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + }, + "shipping_details": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft." + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).", + "type": "integer" + }, + "auto_advance": { + "description": "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.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "automatically_finalizes_at": { + "description": "The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.", + "format": "unix-time", + "type": "integer" + }, + "collection_method": { + "description": "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. Defaults to `charge_automatically`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "currency": { + "description": "The currency to create this invoice in. Defaults to that of `customer` if not specified.", + "format": "currency", + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of up to 4 custom fields to be displayed on the invoice." + }, + "customer": { + "description": "The ID of the customer who will be billed.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 1500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts." + }, + "due_date": { + "description": "The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.", + "format": "unix-time", + "type": "integer" + }, + "effective_at": { + "description": "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.", + "format": "unix-time", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": "string" + }, + "from_invoice": { + "description": "Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.", + "properties": { + "action": { + "enum": ["revision"], + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["action", "invoice"], + "title": "from_invoice", + "type": "object" + }, + "issuer": { + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "number": { + "description": "Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.", + "maxLength": 26, + "type": "string" + }, + "on_behalf_of": { + "description": "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.", + "type": "string" + }, + "payment_settings": { + "description": "Configuration settings for the PaymentIntent that is generated when the invoice is finalized.", + "properties": { + "default_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": ["month"], + "type": "string" + }, + "type": { + "enum": ["fixed_count"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_items_behavior": { + "description": "How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.", + "enum": ["exclude", "include"], + "type": "string", + "x-stripeBypassValidation": true + }, + "rendering": { + "description": "The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.", + "properties": { + "amount_tax_display": { + "enum": ["", "exclude_tax", "include_inclusive_tax"], + "type": "string" + }, + "pdf": { + "properties": { + "page_size": { + "enum": ["a4", "auto", "letter"], + "type": "string" + } + }, + "title": "rendering_pdf_param", + "type": "object" + }, + "template": { + "maxLength": 5000, + "type": "string" + }, + "template_version": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "rendering_param", + "type": "object" + }, + "shipping_cost": { + "description": "Settings for the cost of shipping for this invoice.", + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": ["amount"], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": ["amount", "currency"], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": ["display_name"], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_cost", + "type": "object" + }, + "shipping_details": { + "description": "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.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["address", "name"], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + }, + "statement_descriptor": { + "description": "Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.", + "maxLength": 22, + "type": "string" + }, + "subscription": { + "description": "The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.", + "maxLength": 5000, + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an invoice" + } + }, + "/v1/invoices/create_preview": { + "post": { + "description": "

At any time, you can preview the upcoming invoice for a customer. 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.

\n\n

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.

\n\n

You can preview the effects of updating a subscription, including a preview of what proration 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 is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.

\n\n

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

", + "operationId": "PostInvoicesCreatePreview", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "customer_details": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_items": { + "explode": true, + "style": "deepObject" + }, + "issuer": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "schedule_details": { + "explode": true, + "style": "deepObject" + }, + "subscription_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice preview.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "coupon": { + "description": "The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.", + "maxLength": 5000, + "type": "string" + }, + "customer_details": { + "description": "Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": ["", "exempt", "none", "reverse"], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": ["type", "value"], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_items": { + "description": "List of invoice items to add or update in the upcoming invoice preview (up to 250).", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "issuer": { + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "preview_mode": { + "description": "Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.", + "enum": ["next", "recurring"], + "type": "string" + }, + "schedule": { + "description": "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "maxLength": 5000, + "type": "string" + }, + "schedule_details": { + "description": "The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.", + "properties": { + "end_behavior": { + "enum": ["cancel", "release"], + "type": "string" + }, + "phases": { + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "end_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + } + }, + "required": ["items"], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "title": "schedule_details_params", + "type": "object" + }, + "subscription": { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "maxLength": 5000, + "type": "string" + }, + "subscription_details": { + "description": "The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.", + "properties": { + "billing_cycle_anchor": { + "anyOf": [ + { + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancel_at_period_end": { + "type": "boolean" + }, + "cancel_now": { + "type": "boolean" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "format": "unix-time", + "type": "integer" + }, + "resume_at": { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + } + }, + "title": "subscription_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a preview invoice" + } + }, + "/v1/invoices/search": { + "get": { + "description": "

Search for invoices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetInvoicesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoice" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search invoices" + } + }, + "/v1/invoices/upcoming": { + "get": { + "description": "

At any time, you can preview the upcoming invoice for a customer. 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.

\n\n

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.

\n\n

You can preview the effects of updating a subscription, including a preview of what proration 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 is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.

\n\n

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

", + "operationId": "GetInvoicesUpcoming", + "parameters": [ + { + "description": "Settings for automatic tax lookup for this invoice preview.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "format": "currency", + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": ["", "exempt", "none", "reverse"], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": ["type", "value"], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.", + "explode": true, + "in": "query", + "name": "discounts", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "List of invoice items to add or update in the upcoming invoice preview (up to 250).", + "explode": true, + "in": "query", + "name": "invoice_items", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "explode": true, + "in": "query", + "name": "issuer", + "required": false, + "schema": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "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.", + "explode": true, + "in": "query", + "name": "on_behalf_of", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.", + "in": "query", + "name": "preview_mode", + "required": false, + "schema": { + "enum": ["next", "recurring"], + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "in": "query", + "name": "schedule", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.", + "explode": true, + "in": "query", + "name": "schedule_details", + "required": false, + "schema": { + "properties": { + "end_behavior": { + "enum": ["cancel", "release"], + "type": "string" + }, + "phases": { + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "end_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "start_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + } + }, + "required": ["items"], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "title": "schedule_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead.", + "explode": true, + "in": "query", + "name": "subscription_billing_cycle_anchor", + "required": false, + "schema": { + "anyOf": [ + { + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.", + "explode": true, + "in": "query", + "name": "subscription_cancel_at", + "required": false, + "schema": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.", + "in": "query", + "name": "subscription_cancel_at_period_end", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.", + "in": "query", + "name": "subscription_cancel_now", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.", + "explode": true, + "in": "query", + "name": "subscription_default_tax_rates", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.", + "explode": true, + "in": "query", + "name": "subscription_details", + "required": false, + "schema": { + "properties": { + "billing_cycle_anchor": { + "anyOf": [ + { + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancel_at_period_end": { + "type": "boolean" + }, + "cancel_now": { + "type": "boolean" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "format": "unix-time", + "type": "integer" + }, + "resume_at": { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + } + }, + "title": "subscription_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.", + "explode": true, + "in": "query", + "name": "subscription_items", + "required": false, + "schema": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.", + "in": "query", + "name": "subscription_proration_behavior", + "required": false, + "schema": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "style": "form" + }, + { + "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead.", + "in": "query", + "name": "subscription_proration_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.", + "in": "query", + "name": "subscription_resume_at", + "required": false, + "schema": { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.", + "in": "query", + "name": "subscription_start_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.", + "explode": true, + "in": "query", + "name": "subscription_trial_end", + "required": false, + "schema": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an upcoming invoice" + } + }, + "/v1/invoices/upcoming/lines": { + "get": { + "description": "

When retrieving an upcoming 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.

", + "operationId": "GetInvoicesUpcomingLines", + "parameters": [ + { + "description": "Settings for automatic tax lookup for this invoice preview.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "format": "currency", + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_customer_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": ["", "exempt", "none", "reverse"], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": ["type", "value"], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.", + "explode": true, + "in": "query", + "name": "discounts", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "List of invoice items to add or update in the upcoming invoice preview (up to 250).", + "explode": true, + "in": "query", + "name": "invoice_items", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "explode": true, + "in": "query", + "name": "issuer", + "required": false, + "schema": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "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.", + "explode": true, + "in": "query", + "name": "on_behalf_of", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.", + "in": "query", + "name": "preview_mode", + "required": false, + "schema": { + "enum": ["next", "recurring"], + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "in": "query", + "name": "schedule", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.", + "explode": true, + "in": "query", + "name": "schedule_details", + "required": false, + "schema": { + "properties": { + "end_behavior": { + "enum": ["cancel", "release"], + "type": "string" + }, + "phases": { + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "end_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "start_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + } + }, + "required": ["items"], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "title": "schedule_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead.", + "explode": true, + "in": "query", + "name": "subscription_billing_cycle_anchor", + "required": false, + "schema": { + "anyOf": [ + { + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.", + "explode": true, + "in": "query", + "name": "subscription_cancel_at", + "required": false, + "schema": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.", + "in": "query", + "name": "subscription_cancel_at_period_end", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.", + "in": "query", + "name": "subscription_cancel_now", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.", + "explode": true, + "in": "query", + "name": "subscription_default_tax_rates", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.", + "explode": true, + "in": "query", + "name": "subscription_details", + "required": false, + "schema": { + "properties": { + "billing_cycle_anchor": { + "anyOf": [ + { + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancel_at_period_end": { + "type": "boolean" + }, + "cancel_now": { + "type": "boolean" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "format": "unix-time", + "type": "integer" + }, + "resume_at": { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + } + }, + "title": "subscription_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.", + "explode": true, + "in": "query", + "name": "subscription_items", + "required": false, + "schema": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.", + "in": "query", + "name": "subscription_proration_behavior", + "required": false, + "schema": { + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "style": "form" + }, + { + "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead.", + "in": "query", + "name": "subscription_proration_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.", + "in": "query", + "name": "subscription_resume_at", + "required": false, + "schema": { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.", + "in": "query", + "name": "subscription_start_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.", + "explode": true, + "in": "query", + "name": "subscription_trial_end", + "required": false, + "schema": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an upcoming invoice's line items" + } + }, + "/v1/invoices/{invoice}": { + "delete": { + "description": "

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.

", + "operationId": "DeleteInvoicesInvoice", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a draft invoice" + }, + "get": { + "description": "

Retrieves the invoice with the given ID.

", + "operationId": "GetInvoicesInvoice", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an invoice" + }, + "post": { + "description": "

Draft invoices are fully editable. Once an invoice is finalized,\nmonetary values, as well as collection_method, become uneditable.

\n\n

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,\nsending reminders for, or automatically reconciling invoices, pass\nauto_advance=false.

", + "operationId": "PostInvoicesInvoice", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_tax_ids": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "default_source": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "effective_at": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "issuer": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "number": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "rendering": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + }, + "shipping_details": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft." + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).", + "type": "integer" + }, + "auto_advance": { + "description": "Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "automatically_finalizes_at": { + "description": "The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.", + "format": "unix-time", + "type": "integer" + }, + "collection_method": { + "description": "Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields." + }, + "days_until_due": { + "description": "The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.", + "type": "integer" + }, + "default_payment_method": { + "description": "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.", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates." + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 1500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts." + }, + "due_date": { + "description": "The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.", + "format": "unix-time", + "type": "integer" + }, + "effective_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": "string" + }, + "issuer": { + "description": "The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.", + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "number": { + "anyOf": [ + { + "maxLength": 26, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically." + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "payment_settings": { + "description": "Configuration settings for the PaymentIntent that is generated when the invoice is finalized.", + "properties": { + "default_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": ["month"], + "type": "string" + }, + "type": { + "enum": ["fixed_count"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_settings", + "type": "object" + }, + "rendering": { + "description": "The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.", + "properties": { + "amount_tax_display": { + "enum": ["", "exclude_tax", "include_inclusive_tax"], + "type": "string" + }, + "pdf": { + "properties": { + "page_size": { + "enum": ["a4", "auto", "letter"], + "type": "string" + } + }, + "title": "rendering_pdf_param", + "type": "object" + }, + "template": { + "maxLength": 5000, + "type": "string" + }, + "template_version": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "rendering_param", + "type": "object" + }, + "shipping_cost": { + "anyOf": [ + { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": ["amount"], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": ["amount", "currency"], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": ["display_name"], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_cost", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Settings for the cost of shipping for this invoice." + }, + "shipping_details": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["address", "name"], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "statement_descriptor": { + "description": "Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an invoice" + } + }, + "/v1/invoices/{invoice}/add_lines": { + "post": { + "description": "

Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.

", + "operationId": "PostInvoicesInvoiceAddLines", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_metadata": { + "explode": true, + "style": "deepObject" + }, + "lines": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "lines": { + "description": "The line items to add.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "invoice_item": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "properties": { + "description": { + "maxLength": 40000, + "type": "string" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "title": "product_data", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency"], + "title": "one_time_price_data_with_product_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_amounts": { + "anyOf": [ + { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_rate_data": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "inclusive": { + "type": "boolean" + }, + "jurisdiction": { + "maxLength": 200, + "type": "string" + }, + "percentage": { + "type": "number" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "display_name", + "inclusive", + "percentage" + ], + "title": "tax_rate_data_param", + "type": "object" + }, + "taxable_amount": { + "type": "integer" + } + }, + "required": [ + "amount", + "tax_rate_data", + "taxable_amount" + ], + "title": "tax_amount_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "lines_data_param", + "type": "object" + }, + "type": "array" + } + }, + "required": ["lines"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Bulk add invoice line items" + } + }, + "/v1/invoices/{invoice}/finalize": { + "post": { + "description": "

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.

", + "operationId": "PostInvoicesInvoiceFinalize", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "auto_advance": { + "description": "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.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Finalize an invoice" + } + }, + "/v1/invoices/{invoice}/lines": { + "get": { + "description": "

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.

", + "operationId": "GetInvoicesInvoiceLines", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an invoice's line items" + } + }, + "/v1/invoices/{invoice}/lines/{line_item_id}": { + "post": { + "description": "

Updates an invoice’s line item. Some fields, such as tax_amounts, only live on the invoice line item,\nso they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice\nitem and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.\nUpdating an invoice’s line item is only possible before the invoice is finalized.

", + "operationId": "PostInvoicesInvoiceLinesLineItemId", + "parameters": [ + { + "description": "Invoice ID of line item", + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Invoice line item ID", + "in": "path", + "name": "line_item_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_amounts": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object. One of `price` or `price_data` is required.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "properties": { + "description": { + "maxLength": 40000, + "type": "string" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "title": "product_data", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency"], + "title": "one_time_price_data_with_product_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the line item.", + "type": "integer" + }, + "tax_amounts": { + "anyOf": [ + { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_rate_data": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "inclusive": { + "type": "boolean" + }, + "jurisdiction": { + "maxLength": 200, + "type": "string" + }, + "percentage": { + "type": "number" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "display_name", + "inclusive", + "percentage" + ], + "title": "tax_rate_data_param", + "type": "object" + }, + "taxable_amount": { + "type": "integer" + } + }, + "required": [ + "amount", + "tax_rate_data", + "taxable_amount" + ], + "title": "tax_amount_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts." + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/line_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an invoice's line item" + } + }, + "/v1/invoices/{invoice}/mark_uncollectible": { + "post": { + "description": "

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

", + "operationId": "PostInvoicesInvoiceMarkUncollectible", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Mark an invoice as uncollectible" + } + }, + "/v1/invoices/{invoice}/pay": { + "post": { + "description": "

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. 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.

", + "operationId": "PostInvoicesInvoicePay", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "forgive": { + "description": "In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. \n\nPassing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.", + "type": "boolean" + }, + "payment_method": { + "description": "A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Pay an invoice" + } + }, + "/v1/invoices/{invoice}/remove_lines": { + "post": { + "description": "

Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.

", + "operationId": "PostInvoicesInvoiceRemoveLines", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_metadata": { + "explode": true, + "style": "deepObject" + }, + "lines": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "lines": { + "description": "The line items to remove.", + "items": { + "properties": { + "behavior": { + "enum": ["delete", "unassign"], + "type": "string" + }, + "id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["behavior", "id"], + "title": "lines_data_param", + "type": "object" + }, + "type": "array" + } + }, + "required": ["lines"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Bulk remove invoice line items" + } + }, + "/v1/invoices/{invoice}/send": { + "post": { + "description": "

Stripe will automatically send invoices to customers according to your subscriptions settings. 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.

\n\n

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

", + "operationId": "PostInvoicesInvoiceSend", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Send an invoice for manual payment" + } + }, + "/v1/invoices/{invoice}/update_lines": { + "post": { + "description": "

Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.

", + "operationId": "PostInvoicesInvoiceUpdateLines", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_metadata": { + "explode": true, + "style": "deepObject" + }, + "lines": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data." + }, + "lines": { + "description": "The line items to update.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "properties": { + "description": { + "maxLength": 40000, + "type": "string" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "title": "product_data", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency"], + "title": "one_time_price_data_with_product_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_amounts": { + "anyOf": [ + { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_rate_data": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "inclusive": { + "type": "boolean" + }, + "jurisdiction": { + "maxLength": 200, + "type": "string" + }, + "percentage": { + "type": "number" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "display_name", + "inclusive", + "percentage" + ], + "title": "tax_rate_data_param", + "type": "object" + }, + "taxable_amount": { + "type": "integer" + } + }, + "required": [ + "amount", + "tax_rate_data", + "taxable_amount" + ], + "title": "tax_amount_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["id"], + "title": "lines_data_param", + "type": "object" + }, + "type": "array" + } + }, + "required": ["lines"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Bulk update invoice line items" + } + }, + "/v1/invoices/{invoice}/void": { + "post": { + "description": "

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

\n\n

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 or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.

", + "operationId": "PostInvoicesInvoiceVoid", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Void an invoice" + } + }, + "/v1/issuing/authorizations": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingAuthorizations", + "parameters": [ + { + "description": "Only return authorizations that belong to the given card.", + "in": "query", + "name": "card", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations that belong to the given cardholder.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["closed", "pending", "reversed"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.authorization" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/authorizations", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingAuthorizationList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all authorizations" + } + }, + "/v1/issuing/authorizations/{authorization}": { + "get": { + "description": "

Retrieves an Issuing Authorization object.

", + "operationId": "GetIssuingAuthorizationsAuthorization", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an authorization" + }, + "post": { + "description": "

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostIssuingAuthorizationsAuthorization", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update an authorization" + } + }, + "/v1/issuing/authorizations/{authorization}/approve": { + "post": { + "deprecated": true, + "description": "

[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow. \nThis method is deprecated. Instead, respond directly to the webhook request to approve an authorization.

", + "operationId": "PostIssuingAuthorizationsAuthorizationApprove", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Approve an authorization" + } + }, + "/v1/issuing/authorizations/{authorization}/decline": { + "post": { + "deprecated": true, + "description": "

[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.\nThis method is deprecated. Instead, respond directly to the webhook request to decline an authorization.

", + "operationId": "PostIssuingAuthorizationsAuthorizationDecline", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Decline an authorization" + } + }, + "/v1/issuing/cardholders": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingCardholders", + "parameters": [ + { + "description": "Only return cardholders that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return cardholders that have the given email address.", + "in": "query", + "name": "email", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given phone number.", + "in": "query", + "name": "phone_number", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "blocked", "inactive"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given type. One of `individual` or `company`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": ["company", "individual"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/cardholders", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingCardholderList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all cardholders" + }, + "post": { + "description": "

Creates a new Issuing Cardholder object that can be issued cards.

", + "operationId": "PostIssuingCardholders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing": { + "description": "The cardholder's billing address.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["city", "country", "line1", "postal_code"], + "title": "required_address", + "type": "object" + } + }, + "required": ["address"], + "title": "billing_specs", + "type": "object" + }, + "company": { + "description": "Additional information about a `company` cardholder.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_param", + "type": "object" + }, + "email": { + "description": "The cardholder's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "individual": { + "description": "Additional information about an `individual` cardholder.", + "properties": { + "card_issuing": { + "properties": { + "user_terms_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "terms_acceptance_param", + "type": "object" + } + }, + "title": "card_issuing_param", + "type": "object" + }, + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 5000, + "type": "string" + }, + "front": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "person_verification_document_param", + "type": "object" + } + }, + "title": "person_verification_param", + "type": "object" + } + }, + "title": "individual_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.", + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. 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.", + "type": "string" + }, + "preferred_locales": { + "description": "The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.\n 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.", + "items": { + "enum": ["de", "en", "es", "fr", "it"], + "type": "string" + }, + "type": "array" + }, + "spending_controls": { + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "allowed_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + }, + "spending_limits_currency": { + "type": "string" + } + }, + "title": "authorization_controls_param_v2", + "type": "object" + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.", + "enum": ["active", "inactive"], + "type": "string" + }, + "type": { + "description": "One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.", + "enum": ["company", "individual"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["billing", "name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a cardholder" + } + }, + "/v1/issuing/cardholders/{cardholder}": { + "get": { + "description": "

Retrieves an Issuing Cardholder object.

", + "operationId": "GetIssuingCardholdersCardholder", + "parameters": [ + { + "in": "path", + "name": "cardholder", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a cardholder" + }, + "post": { + "description": "

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostIssuingCardholdersCardholder", + "parameters": [ + { + "in": "path", + "name": "cardholder", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing": { + "description": "The cardholder's billing address.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["city", "country", "line1", "postal_code"], + "title": "required_address", + "type": "object" + } + }, + "required": ["address"], + "title": "billing_specs", + "type": "object" + }, + "company": { + "description": "Additional information about a `company` cardholder.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_param", + "type": "object" + }, + "email": { + "description": "The cardholder's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "individual": { + "description": "Additional information about an `individual` cardholder.", + "properties": { + "card_issuing": { + "properties": { + "user_terms_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "terms_acceptance_param", + "type": "object" + } + }, + "title": "card_issuing_param", + "type": "object" + }, + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 5000, + "type": "string" + }, + "front": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "person_verification_document_param", + "type": "object" + } + }, + "title": "person_verification_param", + "type": "object" + } + }, + "title": "individual_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "phone_number": { + "description": "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) for more details.", + "type": "string" + }, + "preferred_locales": { + "description": "The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.\n 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.", + "items": { + "enum": ["de", "en", "es", "fr", "it"], + "type": "string" + }, + "type": "array" + }, + "spending_controls": { + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "allowed_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + }, + "spending_limits_currency": { + "type": "string" + } + }, + "title": "authorization_controls_param_v2", + "type": "object" + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards.", + "enum": ["active", "inactive"], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a cardholder" + } + }, + "/v1/issuing/cards": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingCards", + "parameters": [ + { + "description": "Only return cards belonging to the Cardholder with the provided ID.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that were issued during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given expiration month.", + "in": "query", + "name": "exp_month", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given expiration year.", + "in": "query", + "name": "exp_year", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return cards that have the given last four digits.", + "in": "query", + "name": "last4", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "query", + "name": "personalization_design", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "canceled", "inactive"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Only return cards that have the given type. One of `virtual` or `physical`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": ["physical", "virtual"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.card" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/cards", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingCardList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all cards" + }, + "post": { + "description": "

Creates an Issuing Card object.

", + "operationId": "PostIssuingCards", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pin": { + "explode": true, + "style": "deepObject" + }, + "second_line": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cardholder": { + "description": "The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency for the card.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "personalization_design": { + "description": "The personalization design object belonging to this card.", + "maxLength": 5000, + "type": "string" + }, + "pin": { + "description": "The desired PIN for this card.", + "properties": { + "encrypted_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "encrypted_pin_param", + "type": "object" + }, + "replacement_for": { + "description": "The card this is meant to be a replacement for (if any).", + "maxLength": 5000, + "type": "string" + }, + "replacement_reason": { + "description": "If `replacement_for` is specified, this should indicate why that card is being replaced.", + "enum": ["damaged", "expired", "lost", "stolen"], + "type": "string", + "x-stripeBypassValidation": true + }, + "second_line": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The second line to print on the card. Max length: 24 characters." + }, + "shipping": { + "description": "The address where the card will be shipped.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["city", "country", "line1", "postal_code"], + "title": "required_address", + "type": "object" + }, + "address_validation": { + "properties": { + "mode": { + "enum": [ + "disabled", + "normalization_only", + "validation_and_normalization" + ], + "type": "string" + } + }, + "required": ["mode"], + "title": "address_validation_param", + "type": "object" + }, + "customs": { + "properties": { + "eori_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "customs_param", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "require_signature": { + "type": "boolean" + }, + "service": { + "enum": ["express", "priority", "standard"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "enum": ["bulk", "individual"], + "type": "string" + } + }, + "required": ["address", "name"], + "title": "shipping_specs", + "type": "object" + }, + "spending_controls": { + "description": "Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "allowed_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "authorization_controls_param", + "type": "object" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": ["active", "inactive"], + "type": "string" + }, + "type": { + "description": "The type of card to issue. Possible values are `physical` or `virtual`.", + "enum": ["physical", "virtual"], + "type": "string" + } + }, + "required": ["currency", "type"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a card" + } + }, + "/v1/issuing/cards/{card}": { + "get": { + "description": "

Retrieves an Issuing Card object.

", + "operationId": "GetIssuingCardsCard", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a card" + }, + "post": { + "description": "

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostIssuingCardsCard", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pin": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason why the `status` of this card is `canceled`.", + "enum": ["lost", "stolen"], + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "personalization_design": { + "maxLength": 5000, + "type": "string" + }, + "pin": { + "description": "The desired new PIN for this card.", + "properties": { + "encrypted_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "encrypted_pin_param", + "type": "object" + }, + "shipping": { + "description": "Updated shipping information for the card.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["city", "country", "line1", "postal_code"], + "title": "required_address", + "type": "object" + }, + "address_validation": { + "properties": { + "mode": { + "enum": [ + "disabled", + "normalization_only", + "validation_and_normalization" + ], + "type": "string" + } + }, + "required": ["mode"], + "title": "address_validation_param", + "type": "object" + }, + "customs": { + "properties": { + "eori_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "customs_param", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "require_signature": { + "type": "boolean" + }, + "service": { + "enum": ["express", "priority", "standard"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "enum": ["bulk", "individual"], + "type": "string" + } + }, + "required": ["address", "name"], + "title": "shipping_specs", + "type": "object" + }, + "spending_controls": { + "description": "Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "allowed_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_merchant_countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "authorization_controls_param", + "type": "object" + }, + "status": { + "description": "Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.", + "enum": ["active", "canceled", "inactive"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a card" + } + }, + "/v1/issuing/disputes": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingDisputes", + "parameters": [ + { + "description": "Only return Issuing disputes that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Select Issuing disputes with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["expired", "lost", "submitted", "unsubmitted", "won"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Select the Issuing dispute for the given transaction.", + "in": "query", + "name": "transaction", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.dispute" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/disputes", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingDisputeList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all disputes" + }, + "post": { + "description": "

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 for more details about evidence requirements.

", + "operationId": "PostIssuingDisputes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "treasury": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.", + "type": "integer" + }, + "evidence": { + "description": "Evidence provided for the dispute.", + "properties": { + "canceled": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancellation_policy_provided": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancellation_reason": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_type": { + "enum": ["", "merchandise", "service"], + "type": "string" + }, + "return_status": { + "enum": ["", "merchant_rejected", "successful"], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "canceled", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "duplicate": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card_statement": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cash_receipt": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "check_image": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "original_transaction": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "duplicate", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "fraudulent": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "fraudulent", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "merchandise_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "return_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "return_status": { + "enum": ["", "merchant_rejected", "successful"], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "merchandise_not_as_described", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "no_valid_authorization": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "no_valid_authorization", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "not_received": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_type": { + "enum": ["", "merchandise", "service"], + "type": "string" + } + }, + "title": "not_received", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "other": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_type": { + "enum": ["", "merchandise", "service"], + "type": "string" + } + }, + "title": "other", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "reason": { + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancellation_reason": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "service_not_as_described", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "evidence_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "transaction": { + "description": "The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.", + "maxLength": 5000, + "type": "string" + }, + "treasury": { + "description": "Params for disputes related to Treasury FinancialAccounts", + "properties": { + "received_debit": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["received_debit"], + "title": "treasury_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a dispute" + } + }, + "/v1/issuing/disputes/{dispute}": { + "get": { + "description": "

Retrieves an Issuing Dispute object.

", + "operationId": "GetIssuingDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a dispute" + }, + "post": { + "description": "

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.

", + "operationId": "PostIssuingDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "evidence": { + "description": "Evidence provided for the dispute.", + "properties": { + "canceled": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancellation_policy_provided": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancellation_reason": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_type": { + "enum": ["", "merchandise", "service"], + "type": "string" + }, + "return_status": { + "enum": ["", "merchant_rejected", "successful"], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "canceled", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "duplicate": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card_statement": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cash_receipt": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "check_image": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "original_transaction": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "duplicate", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "fraudulent": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "fraudulent", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "merchandise_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "return_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "return_status": { + "enum": ["", "merchant_rejected", "successful"], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "merchandise_not_as_described", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "no_valid_authorization": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "no_valid_authorization", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "not_received": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_type": { + "enum": ["", "merchandise", "service"], + "type": "string" + } + }, + "title": "not_received", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "other": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_type": { + "enum": ["", "merchandise", "service"], + "type": "string" + } + }, + "title": "other", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "reason": { + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cancellation_reason": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "explanation": { + "anyOf": [ + { + "maxLength": 2500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "service_not_as_described", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "evidence_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a dispute" + } + }, + "/v1/issuing/disputes/{dispute}/submit": { + "post": { + "description": "

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.

", + "operationId": "PostIssuingDisputesDisputeSubmit", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Submit a dispute" + } + }, + "/v1/issuing/personalization_designs": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingPersonalizationDesigns", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return personalization designs with the given lookup keys.", + "explode": true, + "in": "query", + "name": "lookup_keys", + "required": false, + "schema": { + "items": { + "maxLength": 200, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return personalization designs with the given preferences.", + "explode": true, + "in": "query", + "name": "preferences", + "required": false, + "schema": { + "properties": { + "is_default": { + "type": "boolean" + }, + "is_platform_default": { + "type": "boolean" + } + }, + "title": "preferences_list_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return personalization designs with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "inactive", "rejected", "review"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.personalization_design" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/personalization_designs", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingPersonalizationDesignList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all personalization designs" + }, + "post": { + "description": "

Creates a personalization design object.

", + "operationId": "PostIssuingPersonalizationDesigns", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "carrier_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferences": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_logo": { + "description": "The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.", + "type": "string" + }, + "carrier_text": { + "description": "Hash containing carrier text, for use with physical bundles that support carrier text.", + "properties": { + "footer_body": { + "anyOf": [ + { + "maxLength": 200, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "footer_title": { + "anyOf": [ + { + "maxLength": 30, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "header_body": { + "anyOf": [ + { + "maxLength": 200, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "header_title": { + "anyOf": [ + { + "maxLength": 30, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "carrier_text_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "Friendly display name.", + "maxLength": 200, + "type": "string" + }, + "physical_bundle": { + "description": "The physical bundle object belonging to this personalization design.", + "maxLength": 5000, + "type": "string" + }, + "preferences": { + "description": "Information on whether this personalization design is used to create cards when one is not specified.", + "properties": { + "is_default": { + "type": "boolean" + } + }, + "required": ["is_default"], + "title": "preferences_param", + "type": "object" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.", + "type": "boolean" + } + }, + "required": ["physical_bundle"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.personalization_design" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a personalization design" + } + }, + "/v1/issuing/personalization_designs/{personalization_design}": { + "get": { + "description": "

Retrieves a personalization design object.

", + "operationId": "GetIssuingPersonalizationDesignsPersonalizationDesign", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "personalization_design", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.personalization_design" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a personalization design" + }, + "post": { + "description": "

Updates a card personalization object.

", + "operationId": "PostIssuingPersonalizationDesignsPersonalizationDesign", + "parameters": [ + { + "in": "path", + "name": "personalization_design", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_logo": { + "explode": true, + "style": "deepObject" + }, + "carrier_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "lookup_key": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "name": { + "explode": true, + "style": "deepObject" + }, + "preferences": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_logo": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`." + }, + "carrier_text": { + "anyOf": [ + { + "properties": { + "footer_body": { + "anyOf": [ + { + "maxLength": 200, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "footer_title": { + "anyOf": [ + { + "maxLength": 30, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "header_body": { + "anyOf": [ + { + "maxLength": 200, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "header_title": { + "anyOf": [ + { + "maxLength": 30, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "carrier_text_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Hash containing carrier text, for use with physical bundles that support carrier text." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "anyOf": [ + { + "maxLength": 200, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters." + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "anyOf": [ + { + "maxLength": 200, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Friendly display name. Providing an empty string will set the field to null." + }, + "physical_bundle": { + "description": "The physical bundle object belonging to this personalization design.", + "maxLength": 5000, + "type": "string" + }, + "preferences": { + "description": "Information on whether this personalization design is used to create cards when one is not specified.", + "properties": { + "is_default": { + "type": "boolean" + } + }, + "required": ["is_default"], + "title": "preferences_param", + "type": "object" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.personalization_design" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a personalization design" + } + }, + "/v1/issuing/physical_bundles": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingPhysicalBundles", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return physical bundles with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "inactive", "review"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return physical bundles with the given type.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": ["custom", "standard"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.physical_bundle" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/physical_bundles", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingPhysicalBundleList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all physical bundles" + } + }, + "/v1/issuing/physical_bundles/{physical_bundle}": { + "get": { + "description": "

Retrieves a physical bundle object.

", + "operationId": "GetIssuingPhysicalBundlesPhysicalBundle", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "physical_bundle", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.physical_bundle" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a physical bundle" + } + }, + "/v1/issuing/settlements/{settlement}": { + "get": { + "description": "

Retrieves an Issuing Settlement object.

", + "operationId": "GetIssuingSettlementsSettlement", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a settlement" + }, + "post": { + "description": "

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostIssuingSettlementsSettlement", + "parameters": [ + { + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a settlement" + } + }, + "/v1/issuing/tokens": { + "get": { + "description": "

Lists all Issuing Token objects for a given card.

", + "operationId": "GetIssuingTokens", + "parameters": [ + { + "description": "The Issuing card identifier to list tokens for.", + "in": "query", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return Issuing tokens that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Select Issuing tokens with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "deleted", "requested", "suspended"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.token" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingNetworkTokenList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all issuing tokens for card" + } + }, + "/v1/issuing/tokens/{token}": { + "get": { + "description": "

Retrieves an Issuing Token object.

", + "operationId": "GetIssuingTokensToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an issuing token" + }, + "post": { + "description": "

Attempts to update the specified Issuing Token object to the status specified.

", + "operationId": "PostIssuingTokensToken", + "parameters": [ + { + "in": "path", + "name": "token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "status": { + "description": "Specifies which status the token should be updated to.", + "enum": ["active", "deleted", "suspended"], + "type": "string" + } + }, + "required": ["status"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a token status" + } + }, + "/v1/issuing/transactions": { + "get": { + "description": "

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.

", + "operationId": "GetIssuingTransactions", + "parameters": [ + { + "description": "Only return transactions that belong to the given card.", + "in": "query", + "name": "card", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that belong to the given cardholder.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that have the given type. One of `capture` or `refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": ["capture", "refund"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/transactions", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "IssuingTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all transactions" + } + }, + "/v1/issuing/transactions/{transaction}": { + "get": { + "description": "

Retrieves an Issuing Transaction object.

", + "operationId": "GetIssuingTransactionsTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a transaction" + }, + "post": { + "description": "

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostIssuingTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a transaction" + } + }, + "/v1/link_account_sessions": { + "post": { + "description": "

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.

", + "operationId": "PostLinkAccountSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_holder": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "filters": { + "explode": true, + "style": "deepObject" + }, + "permissions": { + "explode": true, + "style": "deepObject" + }, + "prefetch": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder": { + "description": "The account holder to link accounts for.", + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["account", "customer"], + "type": "string" + } + }, + "required": ["type"], + "title": "accountholder_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "filters": { + "description": "Filters to restrict the kinds of accounts to collect.", + "properties": { + "account_subcategories": { + "items": { + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings" + ], + "type": "string" + }, + "type": "array" + }, + "countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "filters_params", + "type": "object" + }, + "permissions": { + "description": "List of data features that you would like to request access to.\n\nPossible values are `balances`, `transactions`, `ownership`, and `payment_method`.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "description": "List of data features that you would like to retrieve upon account creation.", + "items": { + "enum": ["balances", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "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.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_holder", "permissions"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Session" + } + }, + "/v1/link_account_sessions/{session}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Session

", + "operationId": "GetLinkAccountSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Session" + } + }, + "/v1/linked_accounts": { + "get": { + "description": "

Returns a list of Financial Connections Account objects.

", + "operationId": "GetLinkedAccounts", + "parameters": [ + { + "description": "If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.", + "explode": true, + "in": "query", + "name": "account_holder", + "required": false, + "schema": { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "accountholder_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If present, only return accounts that were collected as part of the given session.", + "in": "query", + "name": "session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List Accounts" + } + }, + "/v1/linked_accounts/{account}": { + "get": { + "description": "

Retrieves the details of an Financial Connections Account.

", + "operationId": "GetLinkedAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an Account" + } + }, + "/v1/linked_accounts/{account}/disconnect": { + "post": { + "description": "

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).

", + "operationId": "PostLinkedAccountsAccountDisconnect", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Disconnect an Account" + } + }, + "/v1/linked_accounts/{account}/owners": { + "get": { + "description": "

Lists all owners for a given Account

", + "operationId": "GetLinkedAccountsAccountOwners", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ID of the ownership object to fetch owners from.", + "in": "query", + "name": "ownership", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List Account Owners" + } + }, + "/v1/linked_accounts/{account}/refresh": { + "post": { + "description": "

Refreshes the data associated with a Financial Connections Account.

", + "operationId": "PostLinkedAccountsAccountRefresh", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features that you would like to refresh.", + "items": { + "enum": ["balance", "ownership", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": ["features"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Refresh Account data" + } + }, + "/v1/mandates/{mandate}": { + "get": { + "description": "

Retrieves a Mandate object.

", + "operationId": "GetMandatesMandate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "mandate", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mandate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Mandate" + } + }, + "/v1/payment_intents": { + "get": { + "description": "

Returns a list of PaymentIntents.

", + "operationId": "GetPaymentIntents", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return PaymentIntents for the customer that this customer ID specifies.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_intent" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_intents", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentFlowsPaymentIntentList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all PaymentIntents" + }, + "post": { + "description": "

Creates a PaymentIntent object.

\n\n

After the PaymentIntent is created, attach a payment method and confirm\nto continue the payment. Learn more about the available payment flows\nwith the Payment Intents API.

\n\n

When you use confirm=true during creation, it’s equivalent to creating\nand confirming the PaymentIntent in the same call. You can use any parameters\navailable in the confirm API when you supply\nconfirm=true.

", + "operationId": "PostPaymentIntents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "automatic_payment_methods": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "off_session": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "application_fee_amount": { + "description": "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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "automatic_payment_methods": { + "description": "When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.", + "properties": { + "allow_redirects": { + "enum": ["always", "never"], + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "automatic_payment_methods_param", + "type": "object" + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["automatic", "automatic_async", "manual"], + "type": "string" + }, + "confirm": { + "description": "Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).", + "type": "boolean" + }, + "confirmation_method": { + "description": "Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.", + "enum": ["automatic", "manual"], + "type": "string" + }, + "confirmation_token": { + "description": "ID of the ConfirmationToken used to confirm this PaymentIntent.\n\nIf the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf [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.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "error_on_requires_action": { + "description": "Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "maxLength": 5000, + "type": "string" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["ip_address", "user_agent"], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": ["offline", "online"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": ["customer_acceptance"], + "title": "secret_key_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm)." + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "off_session": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": ["one_off", "recurring"], + "maxLength": 5000, + "type": "string" + } + ], + "description": "Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm)." + }, + "on_behalf_of": { + "description": "The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "string" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.\n\nIf you omit this parameter with `confirm=true`, `customer.default_source` attaches as this PaymentIntent's payment instrument to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_configuration": { + "description": "The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.", + "maxLength": 100, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "maxLength": 30, + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "alma": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "amazon_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": ["month"], + "type": "string" + }, + "type": { + "enum": ["fixed_count"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": ["india"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_extended_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "require_cvc_recollection": { + "type": "boolean" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "three_d_secure": { + "properties": { + "ares_trans_status": { + "enum": ["A", "C", "I", "N", "R", "U", "Y"], + "type": "string" + }, + "cryptogram": { + "maxLength": 5000, + "type": "string" + }, + "electronic_commerce_indicator": { + "enum": ["01", "02", "05", "06", "07"], + "type": "string", + "x-stripeBypassValidation": true + }, + "exemption_indicator": { + "enum": ["low_risk", "none"], + "type": "string" + }, + "network_options": { + "properties": { + "cartes_bancaires": { + "properties": { + "cb_avalgo": { + "enum": [ + "0", + "1", + "2", + "3", + "4", + "A" + ], + "type": "string" + }, + "cb_exemption": { + "maxLength": 4, + "type": "string" + }, + "cb_score": { + "type": "integer" + } + }, + "required": ["cb_avalgo"], + "title": "cartes_bancaires_network_options_param", + "type": "object" + } + }, + "title": "network_options_param", + "type": "object" + }, + "requestor_challenge_indicator": { + "maxLength": 2, + "type": "string" + }, + "transaction_id": { + "maxLength": 5000, + "type": "string" + }, + "version": { + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "cryptogram", + "transaction_id", + "version" + ], + "title": "payment_method_options_param", + "type": "object" + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + }, + "routing": { + "properties": { + "requested_priority": { + "enum": ["domestic", "international"], + "type": "string" + } + }, + "title": "routing_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cashapp": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": ["bank_transfer"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "kakao_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "anyOf": [ + { + "maxLength": 11, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "kr_card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "mobilepay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "multibanco": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "naver_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "pay_by_bank": { + "anyOf": [ + { + "properties": {}, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "payco": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "paypal": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reference": { + "maxLength": 127, + "type": "string" + }, + "risk_correlation_id": { + "maxLength": 32, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "revolut_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "samsung_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "swish": { + "anyOf": [ + { + "properties": { + "reference": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "twint": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "collection_method": { + "enum": ["", "paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "preferred_settlement_speed": { + "enum": ["", "fastest", "standard"], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": ["android", "ios", "web"], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "required": ["client"], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "zip": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "radar_options": { + "description": "Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "receipt_email": { + "description": "Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).", + "type": "string" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).", + "enum": ["off_session", "on_session"], + "type": "string" + }, + "shipping": { + "description": "Shipping information for this PaymentIntent.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "optional_fields_shipping", + "type": "object" + }, + "statement_descriptor": { + "description": "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).\n\nSetting 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.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters that you can use to automatically create a Transfer.\nLearn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_creation_params", + "type": "object" + }, + "transfer_group": { + "description": "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).", + "type": "string" + }, + "use_stripe_sdk": { + "description": "Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.", + "type": "boolean" + } + }, + "required": ["amount", "currency"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a PaymentIntent" + } + }, + "/v1/payment_intents/search": { + "get": { + "description": "

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetPaymentIntentsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_intent" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search PaymentIntents" + } + }, + "/v1/payment_intents/{intent}": { + "get": { + "description": "

Retrieves the details of a PaymentIntent that has previously been created.

\n\n

You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string.

\n\n

If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.

", + "operationId": "GetPaymentIntentsIntent", + "parameters": [ + { + "description": "The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a PaymentIntent" + }, + "post": { + "description": "

Updates properties on a PaymentIntent object without confirming.

\n\n

Depending on which properties you update, you might need to confirm the\nPaymentIntent again. For example, updating the payment_method\nalways requires you to confirm the PaymentIntent again. If you prefer to\nupdate and confirm at the same time, we recommend updating properties through\nthe confirm API instead.

", + "operationId": "PostPaymentIntentsIntent", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "receipt_email": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "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).", + "type": "integer" + }, + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)." + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["automatic", "automatic_async", "manual"], + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf [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.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_configuration": { + "description": "The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.", + "maxLength": 100, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "maxLength": 30, + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "alma": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "amazon_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": ["month"], + "type": "string" + }, + "type": { + "enum": ["fixed_count"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": ["india"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_extended_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "require_cvc_recollection": { + "type": "boolean" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "three_d_secure": { + "properties": { + "ares_trans_status": { + "enum": ["A", "C", "I", "N", "R", "U", "Y"], + "type": "string" + }, + "cryptogram": { + "maxLength": 5000, + "type": "string" + }, + "electronic_commerce_indicator": { + "enum": ["01", "02", "05", "06", "07"], + "type": "string", + "x-stripeBypassValidation": true + }, + "exemption_indicator": { + "enum": ["low_risk", "none"], + "type": "string" + }, + "network_options": { + "properties": { + "cartes_bancaires": { + "properties": { + "cb_avalgo": { + "enum": [ + "0", + "1", + "2", + "3", + "4", + "A" + ], + "type": "string" + }, + "cb_exemption": { + "maxLength": 4, + "type": "string" + }, + "cb_score": { + "type": "integer" + } + }, + "required": ["cb_avalgo"], + "title": "cartes_bancaires_network_options_param", + "type": "object" + } + }, + "title": "network_options_param", + "type": "object" + }, + "requestor_challenge_indicator": { + "maxLength": 2, + "type": "string" + }, + "transaction_id": { + "maxLength": 5000, + "type": "string" + }, + "version": { + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "cryptogram", + "transaction_id", + "version" + ], + "title": "payment_method_options_param", + "type": "object" + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + }, + "routing": { + "properties": { + "requested_priority": { + "enum": ["domestic", "international"], + "type": "string" + } + }, + "title": "routing_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cashapp": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": ["bank_transfer"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "kakao_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "anyOf": [ + { + "maxLength": 11, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "kr_card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "mobilepay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "multibanco": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "naver_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "pay_by_bank": { + "anyOf": [ + { + "properties": {}, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "payco": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "paypal": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reference": { + "maxLength": 127, + "type": "string" + }, + "risk_correlation_id": { + "maxLength": 32, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "revolut_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "samsung_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "swish": { + "anyOf": [ + { + "properties": { + "reference": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "twint": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "collection_method": { + "enum": ["", "paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "preferred_settlement_speed": { + "enum": ["", "fastest", "standard"], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": ["android", "ios", "web"], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "required": ["client"], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "zip": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "receipt_email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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)." + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).\n\nIf you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.", + "enum": ["", "off_session", "on_session"], + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "optional_fields_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "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).\n\nSetting 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.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a PaymentIntent" + } + }, + "/v1/payment_intents/{intent}/apply_customer_balance": { + "post": { + "description": "

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

", + "operationId": "PostPaymentIntentsIntentApplyCustomerBalance", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter.\n\nA positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent.\n\nWhen you omit the amount, it defaults to the remaining amount requested on the PaymentIntent.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Reconcile a customer_balance PaymentIntent" + } + }, + "/v1/payment_intents/{intent}/cancel": { + "post": { + "description": "

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, processing.

\n\n

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.

\n\n

You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.

", + "operationId": "PostPaymentIntentsIntentCancel", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`", + "enum": [ + "abandoned", + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a PaymentIntent" + } + }, + "/v1/payment_intents/{intent}/capture": { + "post": { + "description": "

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

\n\n

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.

\n\n

Learn more about separate authorization and capture.

", + "operationId": "PostPaymentIntentsIntentCapture", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_to_capture": { + "description": "The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided.", + "type": "integer" + }, + "application_fee_amount": { + "description": "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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "final_capture": { + "description": "Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents.", + "type": "boolean" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "statement_descriptor": { + "description": "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).\n\nSetting 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.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "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.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters that you can use to automatically create a transfer after the payment\nis captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Capture a PaymentIntent" + } + }, + "/v1/payment_intents/{intent}/confirm": { + "post": { + "description": "

Confirm that your customer intends to pay with current or provided\npayment method. Upon confirmation, the PaymentIntent will attempt to initiate\na payment.\nIf the selected payment method requires additional authentication steps, the\nPaymentIntent will transition to the requires_action status and\nsuggest additional actions via next_action. If payment fails,\nthe PaymentIntent transitions to the requires_payment_method status or the\ncanceled status if the confirmation limit is reached. If\npayment succeeds, the PaymentIntent will transition to the succeeded\nstatus (or requires_capture, if capture_method is set to manual).\nIf the confirmation_method is automatic, payment may be attempted\nusing our client SDKs\nand the PaymentIntent’s client_secret.\nAfter next_actions are handled by the client, no additional\nconfirmation is required to complete the payment.\nIf the confirmation_method is manual, all payment attempts must be\ninitiated using a secret key.\nIf any actions are required for the payment, the PaymentIntent will\nreturn to the requires_confirmation state\nafter those actions are completed. Your server needs to then\nexplicitly re-confirm the PaymentIntent to initiate the next payment\nattempt.\nThere is a variable upper limit on how many times a PaymentIntent can be confirmed.\nAfter this limit is reached, any further calls to this endpoint will\ntransition the PaymentIntent to the canceled state.

", + "operationId": "PostPaymentIntentsIntentConfirm", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "off_session": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "receipt_email": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["automatic", "automatic_async", "manual"], + "type": "string" + }, + "client_secret": { + "description": "The client secret of the PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "confirmation_token": { + "description": "ID of the ConfirmationToken used to confirm this PaymentIntent.\n\nIf the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.", + "maxLength": 5000, + "type": "string" + }, + "error_on_requires_action": { + "description": "Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "ID of the mandate that's used for this payment.", + "maxLength": 5000, + "type": "string" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["ip_address", "user_agent"], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": ["offline", "online"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": ["customer_acceptance"], + "title": "secret_key_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + }, + { + "description": "This hash contains details about the Mandate to create", + "properties": { + "customer_acceptance": { + "properties": { + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "online_param", + "type": "object" + }, + "type": { + "enum": ["online"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["online", "type"], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": ["customer_acceptance"], + "title": "client_key_param", + "type": "object" + } + ] + }, + "off_session": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": ["one_off", "recurring"], + "maxLength": 5000, + "type": "string" + } + ], + "description": "Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards)." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "maxLength": 30, + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "alma": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "amazon_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": ["month"], + "type": "string" + }, + "type": { + "enum": ["fixed_count"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": ["india"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_extended_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "enum": ["if_available", "never"], + "type": "string" + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "require_cvc_recollection": { + "type": "boolean" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "three_d_secure": { + "properties": { + "ares_trans_status": { + "enum": ["A", "C", "I", "N", "R", "U", "Y"], + "type": "string" + }, + "cryptogram": { + "maxLength": 5000, + "type": "string" + }, + "electronic_commerce_indicator": { + "enum": ["01", "02", "05", "06", "07"], + "type": "string", + "x-stripeBypassValidation": true + }, + "exemption_indicator": { + "enum": ["low_risk", "none"], + "type": "string" + }, + "network_options": { + "properties": { + "cartes_bancaires": { + "properties": { + "cb_avalgo": { + "enum": [ + "0", + "1", + "2", + "3", + "4", + "A" + ], + "type": "string" + }, + "cb_exemption": { + "maxLength": 4, + "type": "string" + }, + "cb_score": { + "type": "integer" + } + }, + "required": ["cb_avalgo"], + "title": "cartes_bancaires_network_options_param", + "type": "object" + } + }, + "title": "network_options_param", + "type": "object" + }, + "requestor_challenge_indicator": { + "maxLength": 2, + "type": "string" + }, + "transaction_id": { + "maxLength": 5000, + "type": "string" + }, + "version": { + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "cryptogram", + "transaction_id", + "version" + ], + "title": "payment_method_options_param", + "type": "object" + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + }, + "routing": { + "properties": { + "requested_priority": { + "enum": ["domestic", "international"], + "type": "string" + } + }, + "title": "routing_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "cashapp": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": ["bank_transfer"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "kakao_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "anyOf": [ + { + "maxLength": 11, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "product_description": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "kr_card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "mobilepay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "multibanco": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "naver_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "pay_by_bank": { + "anyOf": [ + { + "properties": {}, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "payco": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "paypal": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reference": { + "maxLength": 127, + "type": "string" + }, + "risk_correlation_id": { + "maxLength": 32, + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "revolut_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "samsung_pay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": ["", "manual"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": ["", "none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "swish": { + "anyOf": [ + { + "properties": { + "reference": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "twint": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "collection_method": { + "enum": ["", "paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "preferred_settlement_speed": { + "enum": ["", "fastest", "standard"], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "target_date": { + "maxLength": 5000, + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": ["android", "ios", "web"], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "required": ["client"], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "zip": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "radar_options": { + "description": "Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "receipt_email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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)." + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.\nIf you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.\nThis parameter is only used for cards and other redirect-based payment methods.", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf 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.\n\nIf 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.\n\nWhen processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).\n\nIf you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.", + "enum": ["", "off_session", "on_session"], + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address", "name"], + "title": "optional_fields_shipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "use_stripe_sdk": { + "description": "Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Confirm a PaymentIntent" + } + }, + "/v1/payment_intents/{intent}/increment_authorization": { + "post": { + "description": "

Perform an incremental authorization on an eligible\nPaymentIntent. To be eligible, the\nPaymentIntent’s status must be requires_capture and\nincremental_authorization_supported\nmust be true.

\n\n

Incremental authorizations attempt to increase the authorized amount on\nyour customer’s card to the new, higher amount provided. Similar to the\ninitial authorization, incremental authorizations can be declined. A\nsingle PaymentIntent can call this endpoint multiple times to further\nincrease the authorized amount.

\n\n

If the incremental authorization succeeds, the PaymentIntent object\nreturns with the updated\namount.\nIf the incremental authorization fails, a\ncard_declined error returns, and no other\nfields on the PaymentIntent or Charge update. The PaymentIntent\nobject remains capturable for the previously authorized amount.

\n\n

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.\nAfter it’s captured, a PaymentIntent can no longer be incremented.

\n\n

Learn more about incremental authorizations.

", + "operationId": "PostPaymentIntentsIntentIncrementAuthorization", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.", + "type": "integer" + }, + "application_fee_amount": { + "description": "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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "Text that appears on the customer's statement as the statement descriptor for a non-card or 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).", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a transfer after the payment is captured.\nLearn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + } + }, + "required": ["amount"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Increment an authorization" + } + }, + "/v1/payment_intents/{intent}/verify_microdeposits": { + "post": { + "description": "

Verifies microdeposits on a PaymentIntent object.

", + "operationId": "PostPaymentIntentsIntentVerifyMicrodeposits", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret of the PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "descriptor_code": { + "description": "A six-character code starting with SM present in the microdeposit sent to the bank account.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Verify microdeposits on a PaymentIntent" + } + }, + "/v1/payment_links": { + "get": { + "description": "

Returns a list of your payment links.

", + "operationId": "GetPaymentLinks", + "parameters": [ + { + "description": "Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_links", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentLinksResourcePaymentLinkList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all payment links" + }, + "post": { + "description": "

Creates a payment link.

", + "operationId": "PostPaymentLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_completion": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "consent_collection": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_options": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "after_completion": { + "description": "Behavior after the purchase is complete.", + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_confirmation_page_params", + "type": "object" + }, + "redirect": { + "properties": { + "url": { + "maxLength": 2048, + "type": "string" + } + }, + "required": ["url"], + "title": "after_completion_redirect_params", + "type": "object" + }, + "type": { + "enum": ["hosted_confirmation", "redirect"], + "type": "string" + } + }, + "required": ["type"], + "title": "after_completion_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "application_fee_amount": { + "description": "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. Can only be applied when there are no line items with recurring prices.", + "type": "integer" + }, + "application_fee_percent": { + "description": "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. There must be at least 1 line item with a recurring price to use this field.", + "type": "number" + }, + "automatic_tax": { + "description": "Configuration for automatic tax collection.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address. Defaults to `auto`.", + "enum": ["auto", "required"], + "type": "string" + }, + "consent_collection": { + "description": "Configure fields to gather active consent from customers.", + "properties": { + "payment_method_reuse_agreement": { + "properties": { + "position": { + "enum": ["auto", "hidden"], + "type": "string" + } + }, + "required": ["position"], + "title": "payment_method_reuse_agreement_params", + "type": "object" + }, + "promotions": { + "enum": ["auto", "none"], + "type": "string" + }, + "terms_of_service": { + "enum": ["none", "required"], + "type": "string" + } + }, + "title": "consent_collection_params", + "type": "object" + }, + "currency": { + "description": "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) and supported by each line item's price.", + "format": "currency", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 3 fields are supported.", + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": ["options"], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": ["custom"], + "type": "string" + } + }, + "required": ["custom", "type"], + "title": "custom_field_label_param", + "type": "object" + }, + "numeric": { + "properties": { + "maximum_length": { + "type": "integer" + }, + "minimum_length": { + "type": "integer" + } + }, + "title": "custom_field_numeric_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "text": { + "properties": { + "maximum_length": { + "type": "integer" + }, + "minimum_length": { + "type": "integer" + } + }, + "title": "custom_field_text_param", + "type": "object" + }, + "type": { + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "type"], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "after_submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "terms_of_service_acceptance": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer_creation": { + "description": "Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).", + "enum": ["always", "if_required"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "inactive_message": { + "description": "The custom message to be displayed to a customer when a payment link is no longer active.", + "maxLength": 500, + "type": "string" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "checkout_rendering_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "invoice_settings_params", + "type": "object" + } + }, + "required": ["enabled"], + "title": "invoice_creation_create_params", + "type": "object" + }, + "line_items": { + "description": "The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "adjustable_quantity_params", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": ["price", "quantity"], + "title": "line_items_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "type": "object" + }, + "on_behalf_of": { + "description": "The account on behalf of which to charge.", + "type": "string" + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "capture_method": { + "enum": ["automatic", "automatic_async", "manual"], + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "setup_future_usage": { + "enum": ["off_session", "on_session"], + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "maxLength": 22, + "type": "string" + }, + "transfer_group": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_data_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode. Defaults to `always`.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": ["always", "if_required"], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "phone_number_collection": { + "description": "Controls phone number collection settings during checkout.\n\nWe recommend that you review your privacy policy and check with your legal contacts.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "phone_number_collection_params", + "type": "object" + }, + "restrictions": { + "description": "Settings that restrict the usage of a payment link.", + "properties": { + "completed_sessions": { + "properties": { + "limit": { + "type": "integer" + } + }, + "required": ["limit"], + "title": "completed_sessions_params", + "type": "object" + } + }, + "required": ["completed_sessions"], + "title": "restrictions_params", + "type": "object" + }, + "shipping_address_collection": { + "description": "Configuration for collecting the customer's shipping address.", + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "shipping_address_collection_params", + "type": "object" + }, + "shipping_options": { + "description": "The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "items": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "shipping_option_params", + "type": "object" + }, + "type": "array" + }, + "submit_type": { + "description": "Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).", + "enum": ["auto", "book", "donate", "pay", "subscribe"], + "type": "string" + }, + "subscription_data": { + "description": "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`.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "invoice_settings": { + "properties": { + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "subscription_data_invoice_settings_params", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "trial_period_days": { + "type": "integer" + }, + "trial_settings": { + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + } + }, + "title": "subscription_data_params", + "type": "object" + }, + "tax_id_collection": { + "description": "Controls tax ID collection during checkout.", + "properties": { + "enabled": { + "type": "boolean" + }, + "required": { + "enum": ["if_supported", "never"], + "type": "string" + } + }, + "required": ["enabled"], + "title": "tax_id_collection_params", + "type": "object" + }, + "transfer_data": { + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_params", + "type": "object" + } + }, + "required": ["line_items"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a payment link" + } + }, + "/v1/payment_links/{payment_link}": { + "get": { + "description": "

Retrieve a payment link.

", + "operationId": "GetPaymentLinksPaymentLink", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve payment link" + }, + "post": { + "description": "

Updates a payment link.

", + "operationId": "PostPaymentLinksPaymentLink", + "parameters": [ + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_completion": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "inactive_message": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "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.", + "type": "boolean" + }, + "after_completion": { + "description": "Behavior after the purchase is complete.", + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_confirmation_page_params", + "type": "object" + }, + "redirect": { + "properties": { + "url": { + "maxLength": 2048, + "type": "string" + } + }, + "required": ["url"], + "title": "after_completion_redirect_params", + "type": "object" + }, + "type": { + "enum": ["hosted_confirmation", "redirect"], + "type": "string" + } + }, + "required": ["type"], + "title": "after_completion_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Configuration for automatic tax collection.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address. Defaults to `auto`.", + "enum": ["auto", "required"], + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": ["options"], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": ["custom"], + "type": "string" + } + }, + "required": ["custom", "type"], + "title": "custom_field_label_param", + "type": "object" + }, + "numeric": { + "properties": { + "maximum_length": { + "type": "integer" + }, + "minimum_length": { + "type": "integer" + } + }, + "title": "custom_field_numeric_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "text": { + "properties": { + "maximum_length": { + "type": "integer" + }, + "minimum_length": { + "type": "integer" + } + }, + "title": "custom_field_text_param", + "type": "object" + }, + "type": { + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "type"], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Collect additional information from your customer using custom fields. Up to 3 fields are supported." + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "after_submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "terms_of_service_acceptance": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1200, + "type": "string" + } + }, + "required": ["message"], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer_creation": { + "description": "Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).", + "enum": ["always", "if_required"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "inactive_message": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The custom message to be displayed to a customer when a payment link is no longer active." + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 40, + "type": "string" + }, + "value": { + "maxLength": 140, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "checkout_rendering_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "invoice_settings_params", + "type": "object" + } + }, + "required": ["enabled"], + "title": "invoice_creation_update_params", + "type": "object" + }, + "line_items": { + "description": "The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "adjustable_quantity_params", + "type": "object" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": ["id"], + "title": "line_items_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "type": "object" + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "description": { + "anyOf": [ + { + "maxLength": 1000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "statement_descriptor_suffix": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "transfer_group": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_intent_data_update_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode. Defaults to `always`.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": ["always", "if_required"], + "type": "string" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods)." + }, + "phone_number_collection": { + "description": "Controls phone number collection settings during checkout.\n\nWe recommend that you review your privacy policy and check with your legal contacts.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "phone_number_collection_params", + "type": "object" + }, + "restrictions": { + "anyOf": [ + { + "properties": { + "completed_sessions": { + "properties": { + "limit": { + "type": "integer" + } + }, + "required": ["limit"], + "title": "completed_sessions_params", + "type": "object" + } + }, + "required": ["completed_sessions"], + "title": "restrictions_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Settings that restrict the usage of a payment link." + }, + "shipping_address_collection": { + "anyOf": [ + { + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "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" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "shipping_address_collection_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Configuration for collecting the customer's shipping address." + }, + "submit_type": { + "description": "Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).", + "enum": ["auto", "book", "donate", "pay", "subscribe"], + "type": "string" + }, + "subscription_data": { + "description": "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`.", + "properties": { + "invoice_settings": { + "properties": { + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "subscription_data_invoice_settings_params", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "trial_settings": { + "anyOf": [ + { + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_data_update_params", + "type": "object" + }, + "tax_id_collection": { + "description": "Controls tax ID collection during checkout.", + "properties": { + "enabled": { + "type": "boolean" + }, + "required": { + "enum": ["if_supported", "never"], + "type": "string" + } + }, + "required": ["enabled"], + "title": "tax_id_collection_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a payment link" + } + }, + "/v1/payment_links/{payment_link}/line_items": { + "get": { + "description": "

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.

", + "operationId": "GetPaymentLinksPaymentLinkLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a payment link's line items" + } + }, + "/v1/payment_method_configurations": { + "get": { + "description": "

List payment method configurations

", + "operationId": "GetPaymentMethodConfigurations", + "parameters": [ + { + "description": "The Connect application to filter by.", + "explode": true, + "in": "query", + "name": "application", + "required": false, + "schema": { + "anyOf": [ + { + "maxLength": 100, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method_configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_method_configurations", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentMethodConfigResourcePaymentMethodConfigurationsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List payment method configurations" + }, + "post": { + "description": "

Creates a payment method configuration

", + "operationId": "PostPaymentMethodConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "acss_debit": { + "explode": true, + "style": "deepObject" + }, + "affirm": { + "explode": true, + "style": "deepObject" + }, + "afterpay_clearpay": { + "explode": true, + "style": "deepObject" + }, + "alipay": { + "explode": true, + "style": "deepObject" + }, + "alma": { + "explode": true, + "style": "deepObject" + }, + "amazon_pay": { + "explode": true, + "style": "deepObject" + }, + "apple_pay": { + "explode": true, + "style": "deepObject" + }, + "apple_pay_later": { + "explode": true, + "style": "deepObject" + }, + "au_becs_debit": { + "explode": true, + "style": "deepObject" + }, + "bacs_debit": { + "explode": true, + "style": "deepObject" + }, + "bancontact": { + "explode": true, + "style": "deepObject" + }, + "blik": { + "explode": true, + "style": "deepObject" + }, + "boleto": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cartes_bancaires": { + "explode": true, + "style": "deepObject" + }, + "cashapp": { + "explode": true, + "style": "deepObject" + }, + "customer_balance": { + "explode": true, + "style": "deepObject" + }, + "eps": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fpx": { + "explode": true, + "style": "deepObject" + }, + "giropay": { + "explode": true, + "style": "deepObject" + }, + "google_pay": { + "explode": true, + "style": "deepObject" + }, + "grabpay": { + "explode": true, + "style": "deepObject" + }, + "ideal": { + "explode": true, + "style": "deepObject" + }, + "jcb": { + "explode": true, + "style": "deepObject" + }, + "klarna": { + "explode": true, + "style": "deepObject" + }, + "konbini": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "mobilepay": { + "explode": true, + "style": "deepObject" + }, + "multibanco": { + "explode": true, + "style": "deepObject" + }, + "oxxo": { + "explode": true, + "style": "deepObject" + }, + "p24": { + "explode": true, + "style": "deepObject" + }, + "pay_by_bank": { + "explode": true, + "style": "deepObject" + }, + "paynow": { + "explode": true, + "style": "deepObject" + }, + "paypal": { + "explode": true, + "style": "deepObject" + }, + "promptpay": { + "explode": true, + "style": "deepObject" + }, + "revolut_pay": { + "explode": true, + "style": "deepObject" + }, + "sepa_debit": { + "explode": true, + "style": "deepObject" + }, + "sofort": { + "explode": true, + "style": "deepObject" + }, + "swish": { + "explode": true, + "style": "deepObject" + }, + "twint": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + }, + "wechat_pay": { + "explode": true, + "style": "deepObject" + }, + "zip": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "acss_debit": { + "description": "Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "description": "[Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "afterpay_clearpay": { + "description": "Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "alipay": { + "description": "Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "alma": { + "description": "Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "amazon_pay": { + "description": "Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "apple_pay": { + "description": "Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "apple_pay_later": { + "description": "Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "au_becs_debit": { + "description": "Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "bacs_debit": { + "description": "Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "bancontact": { + "description": "Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "blik": { + "description": "BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "boleto": { + "description": "Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "card": { + "description": "Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "cartes_bancaires": { + "description": "Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "cashapp": { + "description": "Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "customer_balance": { + "description": "Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "eps": { + "description": "EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fpx": { + "description": "Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "giropay": { + "description": "giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "google_pay": { + "description": "Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "grabpay": { + "description": "GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "ideal": { + "description": "iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "jcb": { + "description": "JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "klarna": { + "description": "Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "konbini": { + "description": "Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "link": { + "description": "[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "mobilepay": { + "description": "MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "multibanco": { + "description": "Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "name": { + "description": "Configuration name.", + "maxLength": 100, + "type": "string" + }, + "oxxo": { + "description": "OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "p24": { + "description": "Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "parent": { + "description": "Configuration's parent configuration. Specify to create a child configuration.", + "maxLength": 100, + "type": "string" + }, + "pay_by_bank": { + "description": "Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "paynow": { + "description": "PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "paypal": { + "description": "PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "promptpay": { + "description": "PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "revolut_pay": { + "description": "Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "sepa_debit": { + "description": "The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "sofort": { + "description": "Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "swish": { + "description": "Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "twint": { + "description": "Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "us_bank_account": { + "description": "Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "description": "WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "zip": { + "description": "Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a payment method configuration" + } + }, + "/v1/payment_method_configurations/{configuration}": { + "get": { + "description": "

Retrieve payment method configuration

", + "operationId": "GetPaymentMethodConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve payment method configuration" + }, + "post": { + "description": "

Update payment method configuration

", + "operationId": "PostPaymentMethodConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "acss_debit": { + "explode": true, + "style": "deepObject" + }, + "affirm": { + "explode": true, + "style": "deepObject" + }, + "afterpay_clearpay": { + "explode": true, + "style": "deepObject" + }, + "alipay": { + "explode": true, + "style": "deepObject" + }, + "alma": { + "explode": true, + "style": "deepObject" + }, + "amazon_pay": { + "explode": true, + "style": "deepObject" + }, + "apple_pay": { + "explode": true, + "style": "deepObject" + }, + "apple_pay_later": { + "explode": true, + "style": "deepObject" + }, + "au_becs_debit": { + "explode": true, + "style": "deepObject" + }, + "bacs_debit": { + "explode": true, + "style": "deepObject" + }, + "bancontact": { + "explode": true, + "style": "deepObject" + }, + "blik": { + "explode": true, + "style": "deepObject" + }, + "boleto": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cartes_bancaires": { + "explode": true, + "style": "deepObject" + }, + "cashapp": { + "explode": true, + "style": "deepObject" + }, + "customer_balance": { + "explode": true, + "style": "deepObject" + }, + "eps": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fpx": { + "explode": true, + "style": "deepObject" + }, + "giropay": { + "explode": true, + "style": "deepObject" + }, + "google_pay": { + "explode": true, + "style": "deepObject" + }, + "grabpay": { + "explode": true, + "style": "deepObject" + }, + "ideal": { + "explode": true, + "style": "deepObject" + }, + "jcb": { + "explode": true, + "style": "deepObject" + }, + "klarna": { + "explode": true, + "style": "deepObject" + }, + "konbini": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "mobilepay": { + "explode": true, + "style": "deepObject" + }, + "multibanco": { + "explode": true, + "style": "deepObject" + }, + "oxxo": { + "explode": true, + "style": "deepObject" + }, + "p24": { + "explode": true, + "style": "deepObject" + }, + "pay_by_bank": { + "explode": true, + "style": "deepObject" + }, + "paynow": { + "explode": true, + "style": "deepObject" + }, + "paypal": { + "explode": true, + "style": "deepObject" + }, + "promptpay": { + "explode": true, + "style": "deepObject" + }, + "revolut_pay": { + "explode": true, + "style": "deepObject" + }, + "sepa_debit": { + "explode": true, + "style": "deepObject" + }, + "sofort": { + "explode": true, + "style": "deepObject" + }, + "swish": { + "explode": true, + "style": "deepObject" + }, + "twint": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + }, + "wechat_pay": { + "explode": true, + "style": "deepObject" + }, + "zip": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "acss_debit": { + "description": "Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "active": { + "description": "Whether the configuration can be used for new payments.", + "type": "boolean" + }, + "affirm": { + "description": "[Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "afterpay_clearpay": { + "description": "Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "alipay": { + "description": "Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "alma": { + "description": "Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "amazon_pay": { + "description": "Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "apple_pay": { + "description": "Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "apple_pay_later": { + "description": "Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "au_becs_debit": { + "description": "Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "bacs_debit": { + "description": "Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "bancontact": { + "description": "Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "blik": { + "description": "BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "boleto": { + "description": "Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "card": { + "description": "Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "cartes_bancaires": { + "description": "Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "cashapp": { + "description": "Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "customer_balance": { + "description": "Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "eps": { + "description": "EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fpx": { + "description": "Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "giropay": { + "description": "giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "google_pay": { + "description": "Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "grabpay": { + "description": "GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "ideal": { + "description": "iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "jcb": { + "description": "JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "klarna": { + "description": "Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "konbini": { + "description": "Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "link": { + "description": "[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "mobilepay": { + "description": "MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "multibanco": { + "description": "Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "name": { + "description": "Configuration name.", + "maxLength": 100, + "type": "string" + }, + "oxxo": { + "description": "OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "p24": { + "description": "Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "pay_by_bank": { + "description": "Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "paynow": { + "description": "PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "paypal": { + "description": "PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "promptpay": { + "description": "PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "revolut_pay": { + "description": "Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "sepa_debit": { + "description": "The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "sofort": { + "description": "Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "swish": { + "description": "Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "twint": { + "description": "Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "us_bank_account": { + "description": "Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "description": "WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "zip": { + "description": "Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.", + "properties": { + "display_preference": { + "properties": { + "preference": { + "enum": ["none", "off", "on"], + "type": "string" + } + }, + "title": "display_preference_param", + "type": "object" + } + }, + "title": "payment_method_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update payment method configuration" + } + }, + "/v1/payment_method_domains": { + "get": { + "description": "

Lists the details of existing payment method domains.

", + "operationId": "GetPaymentMethodDomains", + "parameters": [ + { + "description": "The domain name that this payment method domain object represents.", + "in": "query", + "name": "domain_name", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements", + "in": "query", + "name": "enabled", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method_domain" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_method_domains", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentMethodDomainResourcePaymentMethodDomainList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List payment method domains" + }, + "post": { + "description": "

Creates a payment method domain.

", + "operationId": "PostPaymentMethodDomains", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "domain_name": { + "description": "The domain name that this payment method domain object represents.", + "maxLength": 5000, + "type": "string" + }, + "enabled": { + "description": "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.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["domain_name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a payment method domain" + } + }, + "/v1/payment_method_domains/{payment_method_domain}": { + "get": { + "description": "

Retrieves the details of an existing payment method domain.

", + "operationId": "GetPaymentMethodDomainsPaymentMethodDomain", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method_domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a payment method domain" + }, + "post": { + "description": "

Updates an existing payment method domain.

", + "operationId": "PostPaymentMethodDomainsPaymentMethodDomain", + "parameters": [ + { + "in": "path", + "name": "payment_method_domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "enabled": { + "description": "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.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a payment method domain" + } + }, + "/v1/payment_method_domains/{payment_method_domain}/validate": { + "post": { + "description": "

Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain.\nThe payment method doesn’t appear in Elements for this domain until it is active.

\n\n

To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.

\n\n

Related guides: Payment method domains.

", + "operationId": "PostPaymentMethodDomainsPaymentMethodDomainValidate", + "parameters": [ + { + "in": "path", + "name": "payment_method_domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Validate an existing payment method domain" + } + }, + "/v1/payment_methods": { + "get": { + "description": "

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 API instead.

", + "operationId": "GetPaymentMethods", + "parameters": [ + { + "description": "The ID of the customer whose PaymentMethods will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_methods", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentFlowsPaymentMethodList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List PaymentMethods" + }, + "post": { + "description": "

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

\n\n

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

", + "operationId": "PostPaymentMethods", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "acss_debit": { + "explode": true, + "style": "deepObject" + }, + "affirm": { + "explode": true, + "style": "deepObject" + }, + "afterpay_clearpay": { + "explode": true, + "style": "deepObject" + }, + "alipay": { + "explode": true, + "style": "deepObject" + }, + "alma": { + "explode": true, + "style": "deepObject" + }, + "amazon_pay": { + "explode": true, + "style": "deepObject" + }, + "au_becs_debit": { + "explode": true, + "style": "deepObject" + }, + "bacs_debit": { + "explode": true, + "style": "deepObject" + }, + "bancontact": { + "explode": true, + "style": "deepObject" + }, + "billing_details": { + "explode": true, + "style": "deepObject" + }, + "blik": { + "explode": true, + "style": "deepObject" + }, + "boleto": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cashapp": { + "explode": true, + "style": "deepObject" + }, + "customer_balance": { + "explode": true, + "style": "deepObject" + }, + "eps": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fpx": { + "explode": true, + "style": "deepObject" + }, + "giropay": { + "explode": true, + "style": "deepObject" + }, + "grabpay": { + "explode": true, + "style": "deepObject" + }, + "ideal": { + "explode": true, + "style": "deepObject" + }, + "interac_present": { + "explode": true, + "style": "deepObject" + }, + "kakao_pay": { + "explode": true, + "style": "deepObject" + }, + "klarna": { + "explode": true, + "style": "deepObject" + }, + "konbini": { + "explode": true, + "style": "deepObject" + }, + "kr_card": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "mobilepay": { + "explode": true, + "style": "deepObject" + }, + "multibanco": { + "explode": true, + "style": "deepObject" + }, + "naver_pay": { + "explode": true, + "style": "deepObject" + }, + "oxxo": { + "explode": true, + "style": "deepObject" + }, + "p24": { + "explode": true, + "style": "deepObject" + }, + "pay_by_bank": { + "explode": true, + "style": "deepObject" + }, + "payco": { + "explode": true, + "style": "deepObject" + }, + "paynow": { + "explode": true, + "style": "deepObject" + }, + "paypal": { + "explode": true, + "style": "deepObject" + }, + "pix": { + "explode": true, + "style": "deepObject" + }, + "promptpay": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "revolut_pay": { + "explode": true, + "style": "deepObject" + }, + "samsung_pay": { + "explode": true, + "style": "deepObject" + }, + "sepa_debit": { + "explode": true, + "style": "deepObject" + }, + "sofort": { + "explode": true, + "style": "deepObject" + }, + "swish": { + "explode": true, + "style": "deepObject" + }, + "twint": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + }, + "wechat_pay": { + "explode": true, + "style": "deepObject" + }, + "zip": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "acss_debit": { + "description": "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "description": "If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "description": "If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "description": "If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "description": "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`.", + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "description": "If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "description": "If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "description": "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "description": "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "description": "If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "description": "Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "description": "If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "description": "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "card": { + "anyOf": [ + { + "properties": { + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "networks": { + "properties": { + "preferred": { + "enum": [ + "cartes_bancaires", + "mastercard", + "visa" + ], + "type": "string" + } + }, + "title": "networks_params", + "type": "object" + }, + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "card_details_params", + "type": "object" + }, + { + "properties": { + "token": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["token"], + "title": "token_params", + "type": "object" + } + ], + "description": "If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: \"tok_visa\"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.", + "x-stripeBypassValidation": true + }, + "cashapp": { + "description": "If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "customer": { + "description": "The `Customer` to whom the original PaymentMethod is attached.", + "maxLength": 5000, + "type": "string" + }, + "customer_balance": { + "description": "If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "description": "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.", + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fpx": { + "description": "If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.", + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "description": "If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "description": "If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "description": "If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.", + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "description": "If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "description": "If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "description": "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "description": "If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "description": "If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "description": "If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "mobilepay": { + "description": "If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "description": "If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "description": "If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.", + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "description": "If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "description": "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.", + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "description": "If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "description": "If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "payment_method": { + "description": "The PaymentMethod to share.", + "maxLength": 5000, + "type": "string" + }, + "paynow": { + "description": "If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "description": "If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "description": "If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "description": "If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "description": "If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "description": "If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "description": "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.", + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "description": "If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.", + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "description": "If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "description": "If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "description": "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.", + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "description": "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.", + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "description": "If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "description": "If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.", + "properties": {}, + "title": "param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Shares a PaymentMethod" + } + }, + "/v1/payment_methods/{payment_method}": { + "get": { + "description": "

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

", + "operationId": "GetPaymentMethodsPaymentMethod", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a PaymentMethod" + }, + "post": { + "description": "

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

", + "operationId": "PostPaymentMethodsPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_details": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "naver_pay": { + "explode": true, + "style": "deepObject" + }, + "pay_by_bank": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "allow_redisplay": { + "description": "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`.", + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "billing_details": { + "description": "Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "card": { + "description": "If this is a `card` PaymentMethod, this hash contains the user's card details.", + "properties": { + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "networks": { + "properties": { + "preferred": { + "enum": [ + "", + "cartes_bancaires", + "mastercard", + "visa" + ], + "type": "string" + } + }, + "title": "networks_update_api_param", + "type": "object" + } + }, + "title": "update_api_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "link": { + "description": "If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "naver_pay": { + "description": "If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.", + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "description": "If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "us_bank_account": { + "description": "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.", + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + } + }, + "title": "update_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a PaymentMethod" + } + }, + "/v1/payment_methods/{payment_method}/attach": { + "post": { + "description": "

Attaches a PaymentMethod object to a Customer.

\n\n

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent\nor a PaymentIntent with setup_future_usage.\nThese approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach\nendpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for\nfuture use, which makes later declines and payment friction more likely.\nSee Optimizing cards for future payments for more information about setting up\nfuture payments.

\n\n

To use this PaymentMethod as the default for invoice or subscription payments,\nset invoice_settings.default_payment_method,\non the Customer to the PaymentMethod’s ID.

", + "operationId": "PostPaymentMethodsPaymentMethodAttach", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of the customer to which to attach the PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["customer"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Attach a PaymentMethod to a Customer" + } + }, + "/v1/payment_methods/{payment_method}/detach": { + "post": { + "description": "

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.

", + "operationId": "PostPaymentMethodsPaymentMethodDetach", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Detach a PaymentMethod from a Customer" + } + }, + "/v1/payouts": { + "get": { + "description": "

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.

", + "operationId": "GetPayouts", + "parameters": [ + { + "description": "Only return payouts that are expected to arrive during the given date interval.", + "explode": true, + "in": "query", + "name": "arrival_date", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return payouts that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The ID of an external account - only return payouts sent to this external account.", + "in": "query", + "name": "destination", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payout" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payouts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PayoutList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all payouts" + }, + "post": { + "description": "

To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.

\n\n

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.

\n\n

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 details available and pending amounts by source type.

", + "operationId": "PostPayouts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents representing how much to payout.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination": { + "description": "The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "method": { + "description": "The method used to send this payout, which is `standard` or `instant`. We support `instant` 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).", + "enum": ["instant", "standard"], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "source_type": { + "description": "The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.", + "enum": ["bank_account", "card", "fpx"], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "statement_descriptor": { + "description": "A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.", + "maxLength": 22, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["amount", "currency"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a payout" + } + }, + "/v1/payouts/{payout}": { + "get": { + "description": "

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.

", + "operationId": "GetPayoutsPayout", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a payout" + }, + "post": { + "description": "

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.

", + "operationId": "PostPayoutsPayout", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a payout" + } + }, + "/v1/payouts/{payout}/cancel": { + "post": { + "description": "

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.

", + "operationId": "PostPayoutsPayoutCancel", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a payout" + } + }, + "/v1/payouts/{payout}/reverse": { + "post": { + "description": "

Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead.

\n\n

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.

", + "operationId": "PostPayoutsPayoutReverse", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Reverse a payout" + } + }, + "/v1/plans": { + "get": { + "description": "

Returns a list of your plans.

", + "operationId": "GetPlans", + "parameters": [ + { + "description": "Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return plans for the given product.", + "in": "query", + "name": "product", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/plan" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/plans", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PlanList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all plans" + }, + "post": { + "description": "

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

", + "operationId": "PostPlans", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "product": { + "explode": true, + "style": "deepObject" + }, + "tiers": { + "explode": true, + "style": "deepObject" + }, + "transform_usage": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the plan is currently available for new subscriptions. Defaults to `true`.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": ["last_during_period", "last_ever", "max", "sum"], + "type": "string" + }, + "amount": { + "description": "A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.", + "type": "integer" + }, + "amount_decimal": { + "description": "Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.", + "format": "decimal", + "type": "string" + }, + "billing_scheme": { + "description": "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.", + "enum": ["per_unit", "tiered"], + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "Specifies billing frequency. Either `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "meter": { + "description": "The meter tracking the usage of a metered price", + "maxLength": 5000, + "type": "string" + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "anyOf": [ + { + "description": "The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a [service product](https://stripe.com/docs/api#product_object-type).", + "properties": { + "active": { + "type": "boolean" + }, + "id": { + "deprecated": true, + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + }, + "unit_label": { + "maxLength": 12, + "type": "string" + } + }, + "required": ["name"], + "title": "inline_product_params", + "type": "object" + }, + { + "description": "The ID of the product whose pricing the created plan will represent.", + "maxLength": 5000, + "type": "string" + } + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": ["inf"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": ["up_to"], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "tiers_mode": { + "description": "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 successively change as the quantity grows.", + "enum": ["graduated", "volume"], + "type": "string" + }, + "transform_usage": { + "description": "Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.", + "properties": { + "divide_by": { + "type": "integer" + }, + "round": { + "enum": ["down", "up"], + "type": "string" + } + }, + "required": ["divide_by", "round"], + "title": "transform_usage_param", + "type": "object" + }, + "trial_period_days": { + "description": "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).", + "type": "integer" + }, + "usage_type": { + "description": "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`.", + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "required": ["currency", "interval"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a plan" + } + }, + "/v1/plans/{plan}": { + "delete": { + "description": "

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

", + "operationId": "DeletePlansPlan", + "parameters": [ + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a plan" + }, + "get": { + "description": "

Retrieves the plan with the given ID.

", + "operationId": "GetPlansPlan", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a plan" + }, + "post": { + "description": "

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.

", + "operationId": "PostPlansPlan", + "parameters": [ + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the plan is currently available for new subscriptions.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "description": "The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.", + "maxLength": 5000, + "type": "string" + }, + "trial_period_days": { + "description": "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).", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a plan" + } + }, + "/v1/prices": { + "get": { + "description": "

Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active to false.

", + "operationId": "GetPrices", + "parameters": [ + { + "description": "Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return prices for the given currency.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "format": "currency", + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.", + "explode": true, + "in": "query", + "name": "lookup_keys", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return prices for the given product.", + "in": "query", + "name": "product", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return prices with these recurring fields.", + "explode": true, + "in": "query", + "name": "recurring", + "required": false, + "schema": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "meter": { + "maxLength": 5000, + "type": "string" + }, + "usage_type": { + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "title": "all_prices_recurring_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return prices of type `recurring` or `one_time`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": ["one_time", "recurring"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/price" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/prices", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PriceList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all prices" + }, + "post": { + "description": "

Creates a new price for an existing product. The price can be recurring or one-time.

", + "operationId": "PostPrices", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "custom_unit_amount": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "product_data": { + "explode": true, + "style": "deepObject" + }, + "recurring": { + "explode": true, + "style": "deepObject" + }, + "tiers": { + "explode": true, + "style": "deepObject" + }, + "transform_quantity": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the price can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "billing_scheme": { + "description": "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.", + "enum": ["per_unit", "tiered"], + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": ["inf"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": ["up_to"], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "description": "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).", + "type": "object" + }, + "custom_unit_amount": { + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "custom_unit_amount", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "description": "The ID of the product that this price will belong to.", + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "description": "These fields can be used to create a new product that this price will belong to.", + "properties": { + "active": { + "type": "boolean" + }, + "id": { + "deprecated": true, + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + }, + "unit_label": { + "maxLength": 12, + "type": "string" + } + }, + "required": ["name"], + "title": "inline_product_params", + "type": "object" + }, + "recurring": { + "description": "The recurring components of a price such as `interval` and `usage_type`.", + "properties": { + "aggregate_usage": { + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "type": "string" + }, + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "meter": { + "maxLength": 5000, + "type": "string" + }, + "usage_type": { + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "required": ["interval"], + "title": "recurring", + "type": "object" + }, + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": ["inf"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": ["up_to"], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "tiers_mode": { + "description": "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 successively change as the quantity grows.", + "enum": ["graduated", "volume"], + "type": "string" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.", + "type": "boolean" + }, + "transform_quantity": { + "description": "Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.", + "properties": { + "divide_by": { + "type": "integer" + }, + "round": { + "enum": ["down", "up"], + "type": "string" + } + }, + "required": ["divide_by", "round"], + "title": "transform_usage_param", + "type": "object" + }, + "unit_amount": { + "description": "A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "required": ["currency"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a price" + } + }, + "/v1/prices/search": { + "get": { + "description": "

Search for prices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetPricesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/price" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search prices" + } + }, + "/v1/prices/{price}": { + "get": { + "description": "

Retrieves the price with the given ID.

", + "operationId": "GetPricesPrice", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "price", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a price" + }, + "post": { + "description": "

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

", + "operationId": "PostPricesPrice", + "parameters": [ + { + "in": "path", + "name": "price", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the price can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "currency_options": { + "anyOf": [ + { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": ["inf"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": ["up_to"], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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)." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "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.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a price" + } + }, + "/v1/products": { + "get": { + "description": "

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

", + "operationId": "GetProducts", + "parameters": [ + { + "description": "Only return products that are active or inactive (e.g., pass `false` to list all inactive products).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return products that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).", + "explode": true, + "in": "query", + "name": "ids", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return products that can be shipped (i.e., physical, not digital products).", + "in": "query", + "name": "shippable", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return products with the given url.", + "in": "query", + "name": "url", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/product" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/products", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ProductList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all products" + }, + "post": { + "description": "

Creates a new product object.

", + "operationId": "PostProducts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_price_data": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "images": { + "explode": true, + "style": "deepObject" + }, + "marketing_features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "package_dimensions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the product is currently available for purchase. Defaults to `true`.", + "type": "boolean" + }, + "default_price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": ["inf"], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": ["up_to"], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": ["enabled"], + "title": "custom_unit_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency"], + "title": "price_data_without_product_with_metadata", + "type": "object" + }, + "description": { + "description": "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.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "type": "string" + }, + "type": "array" + }, + "marketing_features": { + "description": "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).", + "items": { + "properties": { + "name": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "title": "features", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "package_dimensions": { + "description": "The dimensions of this product for shipping purposes.", + "properties": { + "height": { + "type": "number" + }, + "length": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": ["height", "length", "weight", "width"], + "title": "package_dimensions_specs", + "type": "object" + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": "boolean" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.\n\nThis may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `\"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.\n It must contain at least one letter. Only used for subscription payments.", + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "type": "string" + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 12, + "type": "string" + }, + "url": { + "description": "A URL of a publicly-accessible webpage for this product.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a product" + } + }, + "/v1/products/search": { + "get": { + "description": "

Search for products you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetProductsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/product" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search products" + } + }, + "/v1/products/{id}": { + "delete": { + "description": "

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.

", + "operationId": "DeleteProductsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a product" + }, + "get": { + "description": "

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.

", + "operationId": "GetProductsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a product" + }, + "post": { + "description": "

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostProductsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "description": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "images": { + "explode": true, + "style": "deepObject" + }, + "marketing_features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "package_dimensions": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "unit_label": { + "explode": true, + "style": "deepObject" + }, + "url": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the product is available for purchase.", + "type": "boolean" + }, + "default_price": { + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "anyOf": [ + { + "maxLength": 40000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "images": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer." + }, + "marketing_features": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name"], + "title": "features", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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)." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "properties": { + "height": { + "type": "number" + }, + "length": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": ["height", "length", "weight", "width"], + "title": "package_dimensions_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": "boolean" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.\n\nThis may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `\"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.\n It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.", + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "unit_label": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`." + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A URL of a publicly-accessible webpage for this product." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a product" + } + }, + "/v1/products/{product}/features": { + "get": { + "description": "

Retrieve a list of features for a product

", + "operationId": "GetProductsProductFeatures", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "product", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/product_feature" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "EntitlementsResourceProductFeatureList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all features attached to a product" + }, + "post": { + "description": "

Creates a product_feature, which represents a feature attachment to a product

", + "operationId": "PostProductsProductFeatures", + "parameters": [ + { + "in": "path", + "name": "product", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "entitlement_feature": { + "description": "The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["entitlement_feature"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product_feature" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Attach a feature to a product" + } + }, + "/v1/products/{product}/features/{id}": { + "delete": { + "description": "

Deletes the feature attachment to a product

", + "operationId": "DeleteProductsProductFeaturesId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "product", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_product_feature" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Remove a feature from a product" + }, + "get": { + "description": "

Retrieves a product_feature, which represents a feature attachment to a product

", + "operationId": "GetProductsProductFeaturesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The ID of the product_feature.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "The ID of the product.", + "in": "path", + "name": "product", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product_feature" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a product_feature" + } + }, + "/v1/promotion_codes": { + "get": { + "description": "

Returns a list of your promotion codes.

", + "operationId": "GetPromotionCodes", + "parameters": [ + { + "description": "Filter promotion codes by whether they are active.", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return promotion codes that have this case-insensitive code.", + "in": "query", + "name": "code", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return promotion codes for this coupon.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return promotion codes that are restricted to this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/promotion_code" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/promotion_codes", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PromotionCodesResourcePromotionCodeList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all promotion codes" + }, + "post": { + "description": "

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

", + "operationId": "PostPromotionCodes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the promotion code is currently active.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).\n\nIf left blank, we will generate one automatically.", + "maxLength": 500, + "type": "string" + }, + "coupon": { + "description": "The coupon for this promotion code.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.", + "format": "unix-time", + "type": "integer" + }, + "max_redemptions": { + "description": "A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.", + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "restrictions": { + "description": "Settings that restrict the redemption of the promotion code.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "minimum_amount": { + "type": "integer" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + "first_time_transaction": { + "type": "boolean" + }, + "minimum_amount": { + "type": "integer" + }, + "minimum_amount_currency": { + "format": "currency", + "type": "string" + } + }, + "title": "restrictions_params", + "type": "object" + } + }, + "required": ["coupon"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a promotion code" + } + }, + "/v1/promotion_codes/{promotion_code}": { + "get": { + "description": "

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

", + "operationId": "GetPromotionCodesPromotionCode", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "promotion_code", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a promotion code" + }, + "post": { + "description": "

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

", + "operationId": "PostPromotionCodesPromotionCode", + "parameters": [ + { + "in": "path", + "name": "promotion_code", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "restrictions": { + "description": "Settings that restrict the redemption of the promotion code.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "minimum_amount": { + "type": "integer" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "title": "restrictions_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a promotion code" + } + }, + "/v1/quotes": { + "get": { + "description": "

Returns a list of your quotes.

", + "operationId": "GetQuotes", + "parameters": [ + { + "description": "The ID of the customer whose quotes will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the quote.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["accepted", "canceled", "draft", "open"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/quote" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/quotes", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceQuoteList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all quotes" + }, + "post": { + "description": "

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.

", + "operationId": "PostQuotes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "description": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "footer": { + "explode": true, + "style": "deepObject" + }, + "from_quote": { + "explode": true, + "style": "deepObject" + }, + "header": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. There cannot be any line items with recurring prices when using this field." + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. There must be at least 1 line item with a recurring price to use this field." + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice 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`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "customer": { + "description": "The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set." + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The discounts applied to the quote." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used." + }, + "from_quote": { + "description": "Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.", + "properties": { + "is_revision": { + "type": "boolean" + }, + "quote": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["quote"], + "title": "from_quote_params", + "type": "object" + }, + "header": { + "anyOf": [ + { + "maxLength": 50, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used." + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "quote_param", + "type": "object" + }, + "line_items": { + "description": "A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.", + "items": { + "properties": { + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "line_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The account on behalf of which to charge." + }, + "subscription_data": { + "description": "When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "effective_date": { + "anyOf": [ + { + "enum": ["current_period_end"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_data_create_params", + "type": "object" + }, + "test_clock": { + "description": "ID of the test clock to attach to the quote.", + "maxLength": 5000, + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The data with which to automatically create a Transfer for each of the invoices." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a quote" + } + }, + "/v1/quotes/{quote}": { + "get": { + "description": "

Retrieves the quote with the given ID.

", + "operationId": "GetQuotesQuote", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a quote" + }, + "post": { + "description": "

A quote models prices and services for a customer.

", + "operationId": "PostQuotesQuote", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "description": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "footer": { + "explode": true, + "style": "deepObject" + }, + "header": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. There cannot be any line items with recurring prices when using this field." + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. There must be at least 1 line item with a recurring price to use this field." + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice 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`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "customer": { + "description": "The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set." + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A description that will be displayed on the quote PDF." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The discounts applied to the quote." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A footer that will be displayed on the quote PDF." + }, + "header": { + "anyOf": [ + { + "maxLength": 50, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A header that will be displayed on the quote PDF." + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "quote_param", + "type": "object" + }, + "line_items": { + "description": "A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.", + "items": { + "properties": { + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "line_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The account on behalf of which to charge." + }, + "subscription_data": { + "description": "When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.", + "properties": { + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "effective_date": { + "anyOf": [ + { + "enum": ["current_period_end"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_data_update_params", + "type": "object" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The data with which to automatically create a Transfer for each of the invoices." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a quote" + } + }, + "/v1/quotes/{quote}/accept": { + "post": { + "description": "

Accepts the specified quote.

", + "operationId": "PostQuotesQuoteAccept", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Accept a quote" + } + }, + "/v1/quotes/{quote}/cancel": { + "post": { + "description": "

Cancels the quote.

", + "operationId": "PostQuotesQuoteCancel", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a quote" + } + }, + "/v1/quotes/{quote}/computed_upfront_line_items": { + "get": { + "description": "

When retrieving a quote, there is an includable 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.

", + "operationId": "GetQuotesQuoteComputedUpfrontLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a quote's upfront line items" + } + }, + "/v1/quotes/{quote}/finalize": { + "post": { + "description": "

Finalizes the quote.

", + "operationId": "PostQuotesQuoteFinalize", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Finalize a quote" + } + }, + "/v1/quotes/{quote}/line_items": { + "get": { + "description": "

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.

", + "operationId": "GetQuotesQuoteLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a quote's line items" + } + }, + "/v1/quotes/{quote}/pdf": { + "get": { + "description": "

Download the PDF for a finalized quote. Explanation for special handling can be found here

", + "operationId": "GetQuotesQuotePdf", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/pdf": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "servers": [ + { + "url": "https://files.stripe.com/" + } + ], + "summary": "Download quote PDF" + } + }, + "/v1/radar/early_fraud_warnings": { + "get": { + "description": "

Returns a list of early fraud warnings.

", + "operationId": "GetRadarEarlyFraudWarnings", + "parameters": [ + { + "description": "Only return early fraud warnings for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return early fraud warnings that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.early_fraud_warning" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/early_fraud_warnings", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RadarEarlyFraudWarningList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all early fraud warnings" + } + }, + "/v1/radar/early_fraud_warnings/{early_fraud_warning}": { + "get": { + "description": "

Retrieves the details of an early fraud warning that has previously been created.

\n\n

Please refer to the early fraud warning object reference for more details.

", + "operationId": "GetRadarEarlyFraudWarningsEarlyFraudWarning", + "parameters": [ + { + "in": "path", + "name": "early_fraud_warning", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.early_fraud_warning" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an early fraud warning" + } + }, + "/v1/radar/value_list_items": { + "get": { + "description": "

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetRadarValueListItems", + "parameters": [ + { + "description": "Only return items that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Return items belonging to the parent list whose value matches the specified value (using an \"is like\" match).", + "in": "query", + "name": "value", + "required": false, + "schema": { + "maxLength": 800, + "type": "string" + }, + "style": "form" + }, + { + "description": "Identifier for the parent value list this item belongs to.", + "in": "query", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/value_list_items", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all value list items" + }, + "post": { + "description": "

Creates a new ValueListItem object, which is added to the specified parent value list.

", + "operationId": "PostRadarValueListItems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "value": { + "description": "The value of the item (whose type must match the type of the parent value list).", + "maxLength": 800, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list which the created item will be added to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["value", "value_list"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a value list item" + } + }, + "/v1/radar/value_list_items/{item}": { + "delete": { + "description": "

Deletes a ValueListItem object, removing it from its parent value list.

", + "operationId": "DeleteRadarValueListItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a value list item" + }, + "get": { + "description": "

Retrieves a ValueListItem object.

", + "operationId": "GetRadarValueListItemsItem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a value list item" + } + }, + "/v1/radar/value_lists": { + "get": { + "description": "

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetRadarValueLists", + "parameters": [ + { + "description": "The alias used to reference the value list when writing rules.", + "in": "query", + "name": "alias", + "required": false, + "schema": { + "maxLength": 100, + "type": "string" + }, + "style": "form" + }, + { + "description": "A value contained within a value list - returns all value lists containing this value.", + "in": "query", + "name": "contains", + "required": false, + "schema": { + "maxLength": 800, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return value lists that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.value_list" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/value_lists", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RadarListListList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all value lists" + }, + "post": { + "description": "

Creates a new ValueList object, which can then be referenced in rules.

", + "operationId": "PostRadarValueLists", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "item_type": { + "description": "Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "sepa_debit_fingerprint", + "string", + "us_bank_account_fingerprint" + ], + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The human-readable name of the value list.", + "maxLength": 100, + "type": "string" + } + }, + "required": ["alias", "name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a value list" + } + }, + "/v1/radar/value_lists/{value_list}": { + "delete": { + "description": "

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.

", + "operationId": "DeleteRadarValueListsValueList", + "parameters": [ + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a value list" + }, + "get": { + "description": "

Retrieves a ValueList object.

", + "operationId": "GetRadarValueListsValueList", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a value list" + }, + "post": { + "description": "

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.

", + "operationId": "PostRadarValueListsValueList", + "parameters": [ + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The human-readable name of the value list.", + "maxLength": 100, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a value list" + } + }, + "/v1/refunds": { + "get": { + "description": "

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.

", + "operationId": "GetRefunds", + "parameters": [ + { + "description": "Only return refunds for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return refunds that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return refunds for the PaymentIntent specified by this ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/refunds", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "APIMethodRefundList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all refunds" + }, + "post": { + "description": "

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

\n\n

Creating a new refund will refund a charge that has previously been created but not yet refunded.\nFunds will be refunded to the credit or debit card that was originally charged.

\n\n

You can optionally refund only part of a charge.\nYou can do so multiple times, until the entire charge has been refunded.

\n\n

Once entirely refunded, a charge can’t be refunded again.\nThis method will raise an error when called on an already-refunded charge,\nor when trying to refund more money than is left on a charge.

", + "operationId": "PostRefunds", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "charge": { + "description": "The identifier of the charge to refund.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "Customer whose customer balance to refund from.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "origin": { + "description": "Origin of the refund", + "enum": ["customer_balance"], + "type": "string" + }, + "payment_intent": { + "description": "The identifier of the PaymentIntent to refund.", + "maxLength": 5000, + "type": "string" + }, + "reason": { + "description": "String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "description": "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.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "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.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create customer balance refund" + } + }, + "/v1/refunds/{refund}": { + "get": { + "description": "

Retrieves the details of an existing refund.

", + "operationId": "GetRefundsRefund", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a refund" + }, + "post": { + "description": "

Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.

\n\n

This request only accepts metadata as an argument.

", + "operationId": "PostRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a refund" + } + }, + "/v1/refunds/{refund}/cancel": { + "post": { + "description": "

Cancels a refund with a status of requires_action.

\n\n

You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.

", + "operationId": "PostRefundsRefundCancel", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a refund" + } + }, + "/v1/reporting/report_runs": { + "get": { + "description": "

Returns a list of Report Runs, with the most recent appearing first.

", + "operationId": "GetReportingReportRuns", + "parameters": [ + { + "description": "Only return Report Runs that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/reporting.report_run" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/reporting/report_runs", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FinancialReportingFinanceReportRunList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Report Runs" + }, + "post": { + "description": "

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

", + "operationId": "PostReportingReportRuns", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "parameters": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "parameters": { + "description": "Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.", + "properties": { + "columns": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "interval_end": { + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "format": "unix-time", + "type": "integer" + }, + "payout": { + "type": "string" + }, + "reporting_category": { + "enum": [ + "advance", + "advance_funding", + "anticipation_repayment", + "charge", + "charge_failure", + "climate_order_purchase", + "climate_order_refund", + "connect_collection_transfer", + "connect_reserved_funds", + "contribution", + "dispute", + "dispute_reversal", + "fee", + "financing_paydown", + "financing_paydown_reversal", + "financing_payout", + "financing_payout_reversal", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "network_cost", + "other_adjustment", + "partial_capture_reversal", + "payout", + "payout_reversal", + "platform_earning", + "platform_earning_refund", + "refund", + "refund_failure", + "risk_reserved_funds", + "tax", + "topup", + "topup_reversal", + "transfer", + "transfer_reversal", + "unreconciled_customer_funds" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "timezone": { + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Ciudad_Juarez", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Factory", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Pacific-New", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "run_parameter_specs", + "type": "object" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `\"balance.summary.1\"`.", + "type": "string" + } + }, + "required": ["report_type"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Report Run" + } + }, + "/v1/reporting/report_runs/{report_run}": { + "get": { + "description": "

Retrieves the details of an existing Report Run.

", + "operationId": "GetReportingReportRunsReportRun", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report_run", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Report Run" + } + }, + "/v1/reporting/report_types": { + "get": { + "description": "

Returns a full list of Report Types.

", + "operationId": "GetReportingReportTypes", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/reporting.report_type" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FinancialReportingFinanceReportTypeList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Report Types" + } + }, + "/v1/reporting/report_types/{report_type}": { + "get": { + "description": "

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

", + "operationId": "GetReportingReportTypesReportType", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report_type", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_type" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Report Type" + } + }, + "/v1/reviews": { + "get": { + "description": "

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.

", + "operationId": "GetReviews", + "parameters": [ + { + "description": "Only return reviews that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/review" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RadarReviewList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all open reviews" + } + }, + "/v1/reviews/{review}": { + "get": { + "description": "

Retrieves a Review object.

", + "operationId": "GetReviewsReview", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "review", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/review" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a review" + } + }, + "/v1/reviews/{review}/approve": { + "post": { + "description": "

Approves a Review object, closing it and removing it from the list of reviews.

", + "operationId": "PostReviewsReviewApprove", + "parameters": [ + { + "in": "path", + "name": "review", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/review" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Approve a review" + } + }, + "/v1/setup_attempts": { + "get": { + "description": "

Returns a list of SetupAttempts that associate with a provided SetupIntent.

", + "operationId": "GetSetupAttempts", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value\ncan be a string with an integer Unix timestamp or a\ndictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return SetupAttempts created by the SetupIntent specified by\nthis ID.", + "in": "query", + "name": "setup_intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/setup_attempt" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/setup_attempts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentFlowsSetupIntentSetupAttemptList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all SetupAttempts" + } + }, + "/v1/setup_intents": { + "get": { + "description": "

Returns a list of SetupIntents.

", + "operationId": "GetSetupIntents", + "parameters": [ + { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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.", + "in": "query", + "name": "attach_to_self", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return SetupIntents for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return SetupIntents that associate with the specified payment method.", + "in": "query", + "name": "payment_method", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/setup_intent" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/setup_intents", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentFlowsSetupIntentList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all SetupIntents" + }, + "post": { + "description": "

Creates a SetupIntent object.

\n\n

After you create the SetupIntent, attach a payment method and confirm\nit to collect any required permissions to charge the payment method later.

", + "operationId": "PostSetupIntents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "automatic_payment_methods": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_directions": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "single_use": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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.", + "type": "boolean" + }, + "automatic_payment_methods": { + "description": "When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.", + "properties": { + "allow_redirects": { + "enum": ["always", "never"], + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "automatic_payment_methods_param", + "type": "object" + }, + "confirm": { + "description": "Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.", + "type": "boolean" + }, + "confirmation_token": { + "description": "ID of the ConfirmationToken used to confirm this SetupIntent.\n\nIf the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf 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.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `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.", + "items": { + "enum": ["inbound", "outbound"], + "type": "string" + }, + "type": "array" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["ip_address", "user_agent"], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": ["offline", "online"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": ["customer_acceptance"], + "title": "secret_key_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm)." + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "description": "The Stripe account ID created for this SetupIntent.", + "type": "string" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_configuration": { + "description": "The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.", + "maxLength": 100, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": ["cad", "usd"], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": ["combined", "interval", "sporadic"], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": ["india"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "three_d_secure": { + "properties": { + "ares_trans_status": { + "enum": ["A", "C", "I", "N", "R", "U", "Y"], + "type": "string" + }, + "cryptogram": { + "maxLength": 5000, + "type": "string" + }, + "electronic_commerce_indicator": { + "enum": ["01", "02", "05", "06", "07"], + "type": "string", + "x-stripeBypassValidation": true + }, + "network_options": { + "properties": { + "cartes_bancaires": { + "properties": { + "cb_avalgo": { + "enum": ["0", "1", "2", "3", "4", "A"], + "type": "string" + }, + "cb_exemption": { + "maxLength": 4, + "type": "string" + }, + "cb_score": { + "type": "integer" + } + }, + "required": ["cb_avalgo"], + "title": "cartes_bancaires_network_options_param", + "type": "object" + } + }, + "title": "network_options_param", + "type": "object" + }, + "requestor_challenge_indicator": { + "maxLength": 2, + "type": "string" + }, + "transaction_id": { + "maxLength": 5000, + "type": "string" + }, + "version": { + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "card_present": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "paypal": { + "properties": { + "billing_agreement_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "collection_method": { + "enum": ["", "paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).", + "type": "string" + }, + "single_use": { + "description": "If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "setup_intent_single_use_params", + "type": "object" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.", + "enum": ["off_session", "on_session"], + "type": "string" + }, + "use_stripe_sdk": { + "description": "Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a SetupIntent" + } + }, + "/v1/setup_intents/{intent}": { + "get": { + "description": "

Retrieves the details of a SetupIntent that has previously been created.

\n\n

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

\n\n

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

", + "operationId": "GetSetupIntentsIntent", + "parameters": [ + { + "description": "The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a SetupIntent" + }, + "post": { + "description": "

Updates a SetupIntent object.

", + "operationId": "PostSetupIntentsIntent", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_directions": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt 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.", + "type": "boolean" + }, + "customer": { + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf 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.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `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.", + "items": { + "enum": ["inbound", "outbound"], + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_configuration": { + "description": "The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.", + "maxLength": 100, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": ["cad", "usd"], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": ["combined", "interval", "sporadic"], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": ["india"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "three_d_secure": { + "properties": { + "ares_trans_status": { + "enum": ["A", "C", "I", "N", "R", "U", "Y"], + "type": "string" + }, + "cryptogram": { + "maxLength": 5000, + "type": "string" + }, + "electronic_commerce_indicator": { + "enum": ["01", "02", "05", "06", "07"], + "type": "string", + "x-stripeBypassValidation": true + }, + "network_options": { + "properties": { + "cartes_bancaires": { + "properties": { + "cb_avalgo": { + "enum": ["0", "1", "2", "3", "4", "A"], + "type": "string" + }, + "cb_exemption": { + "maxLength": 4, + "type": "string" + }, + "cb_score": { + "type": "integer" + } + }, + "required": ["cb_avalgo"], + "title": "cartes_bancaires_network_options_param", + "type": "object" + } + }, + "title": "network_options_param", + "type": "object" + }, + "requestor_challenge_indicator": { + "maxLength": 2, + "type": "string" + }, + "transaction_id": { + "maxLength": 5000, + "type": "string" + }, + "version": { + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "card_present": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "paypal": { + "properties": { + "billing_agreement_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "collection_method": { + "enum": ["", "paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a SetupIntent" + } + }, + "/v1/setup_intents/{intent}/cancel": { + "post": { + "description": "

You can cancel a SetupIntent object when it’s in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

\n\n

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 instead.

", + "operationId": "PostSetupIntentsIntentCancel", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate`", + "enum": ["abandoned", "duplicate", "requested_by_customer"], + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a SetupIntent" + } + }, + "/v1/setup_intents/{intent}/confirm": { + "post": { + "description": "

Confirm that your customer intends to set up the current or\nprovided payment method. For example, you would confirm a SetupIntent\nwhen a customer hits the “Save” button on a payment method management\npage on your website.

\n\n

If the selected payment method does not require any additional\nsteps from the customer, the SetupIntent will transition to the\nsucceeded status.

\n\n

Otherwise, it will transition to the requires_action status and\nsuggest additional actions via next_action. If setup fails,\nthe SetupIntent will transition to the\nrequires_payment_method status or the canceled status if the\nconfirmation limit is reached.

", + "operationId": "PostSetupIntentsIntentConfirm", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "client_secret": { + "description": "The client secret of the SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "confirmation_token": { + "description": "ID of the ConfirmationToken used to confirm this SetupIntent.\n\nIf the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["ip_address", "user_agent"], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": ["offline", "online"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": ["customer_acceptance"], + "title": "secret_key_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + }, + { + "description": "This hash contains details about the Mandate to create", + "properties": { + "customer_acceptance": { + "properties": { + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "online_param", + "type": "object" + }, + "type": { + "enum": ["online"], + "maxLength": 5000, + "type": "string" + } + }, + "required": ["online", "type"], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": ["customer_acceptance"], + "title": "client_key_param", + "type": "object" + } + ] + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": ["cad", "usd"], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": ["combined", "interval", "sporadic"], + "type": "string" + }, + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": ["india"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string", + "x-stripeBypassValidation": true + }, + "three_d_secure": { + "properties": { + "ares_trans_status": { + "enum": ["A", "C", "I", "N", "R", "U", "Y"], + "type": "string" + }, + "cryptogram": { + "maxLength": 5000, + "type": "string" + }, + "electronic_commerce_indicator": { + "enum": ["01", "02", "05", "06", "07"], + "type": "string", + "x-stripeBypassValidation": true + }, + "network_options": { + "properties": { + "cartes_bancaires": { + "properties": { + "cb_avalgo": { + "enum": ["0", "1", "2", "3", "4", "A"], + "type": "string" + }, + "cb_exemption": { + "maxLength": 4, + "type": "string" + }, + "cb_score": { + "type": "integer" + } + }, + "required": ["cb_avalgo"], + "title": "cartes_bancaires_network_options_param", + "type": "object" + } + }, + "title": "network_options_param", + "type": "object" + }, + "requestor_challenge_indicator": { + "maxLength": 2, + "type": "string" + }, + "transaction_id": { + "maxLength": 5000, + "type": "string" + }, + "version": { + "enum": ["1.0.2", "2.1.0", "2.2.0"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "card_present": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "paypal": { + "properties": { + "billing_agreement_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": { + "reference_prefix": { + "anyOf": [ + { + "maxLength": 12, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "collection_method": { + "enum": ["", "paper"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate on the payment method's app or site.\nIf you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.\nThis parameter is only used for cards and other redirect-based payment methods.", + "type": "string" + }, + "use_stripe_sdk": { + "description": "Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Confirm a SetupIntent" + } + }, + "/v1/setup_intents/{intent}/verify_microdeposits": { + "post": { + "description": "

Verifies microdeposits on a SetupIntent object.

", + "operationId": "PostSetupIntentsIntentVerifyMicrodeposits", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret of the SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "descriptor_code": { + "description": "A six-character code starting with SM present in the microdeposit sent to the bank account.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Verify microdeposits on a SetupIntent" + } + }, + "/v1/shipping_rates": { + "get": { + "description": "

Returns a list of your shipping rates.

", + "operationId": "GetShippingRates", + "parameters": [ + { + "description": "Only return shipping rates that are active or inactive.", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return shipping rates for the given currency.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "format": "currency", + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/shipping_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/shipping_rates", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ShippingResourcesShippingRateList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all shipping rates" + }, + "post": { + "description": "

Creates a new shipping rate object.

", + "operationId": "PostShippingRates", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "delivery_estimate": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fixed_amount": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "delivery_estimate": { + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fixed_amount": { + "description": "Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + } + }, + "required": ["amount"], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": ["amount", "currency"], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "type": "string" + }, + "type": { + "description": "The type of calculation to use on the shipping rate.", + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": ["display_name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a shipping rate" + } + }, + "/v1/shipping_rates/{shipping_rate_token}": { + "get": { + "description": "

Returns the shipping rate object with the given ID.

", + "operationId": "GetShippingRatesShippingRateToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "shipping_rate_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a shipping rate" + }, + "post": { + "description": "

Updates an existing shipping rate object.

", + "operationId": "PostShippingRatesShippingRateToken", + "parameters": [ + { + "in": "path", + "name": "shipping_rate_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fixed_amount": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fixed_amount": { + "description": "Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + } + }, + "title": "currency_option_update", + "type": "object" + }, + "type": "object" + } + }, + "title": "fixed_amount_update", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a shipping rate" + } + }, + "/v1/sigma/scheduled_query_runs": { + "get": { + "description": "

Returns a list of scheduled query runs.

", + "operationId": "GetSigmaScheduledQueryRuns", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/scheduled_query_run" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/sigma/scheduled_query_runs", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SigmaScheduledQueryRunList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all scheduled query runs" + } + }, + "/v1/sigma/scheduled_query_runs/{scheduled_query_run}": { + "get": { + "description": "

Retrieves the details of an scheduled query run.

", + "operationId": "GetSigmaScheduledQueryRunsScheduledQueryRun", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "scheduled_query_run", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scheduled_query_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a scheduled query run" + } + }, + "/v1/sources": { + "post": { + "description": "

Creates a new source object.

", + "operationId": "PostSources", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + }, + "receiver": { + "explode": true, + "style": "deepObject" + }, + "redirect": { + "explode": true, + "style": "deepObject" + }, + "source_order": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.", + "type": "integer" + }, + "currency": { + "description": "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.", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow": { + "description": "The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.", + "enum": [ + "code_verification", + "none", + "receiver", + "redirect" + ], + "maxLength": 5000, + "type": "string" + }, + "mandate": { + "description": "Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.", + "properties": { + "acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "offline": { + "properties": { + "contact_email": { + "type": "string" + } + }, + "required": ["contact_email"], + "title": "mandate_offline_acceptance_params", + "type": "object" + }, + "online": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_online_acceptance_params", + "type": "object" + }, + "status": { + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["offline", "online"], + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["status"], + "title": "mandate_acceptance_params", + "type": "object" + }, + "amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "currency": { + "format": "currency", + "type": "string" + }, + "interval": { + "enum": ["one_time", "scheduled", "variable"], + "maxLength": 5000, + "type": "string" + }, + "notification_method": { + "enum": [ + "deprecated_none", + "email", + "manual", + "none", + "stripe_email" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_params", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "original_source": { + "description": "The source to share.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + }, + "receiver": { + "description": "Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).", + "properties": { + "refund_attributes_method": { + "enum": ["email", "manual", "none"], + "maxLength": 5000, + "type": "string" + } + }, + "title": "receiver_params", + "type": "object" + }, + "redirect": { + "description": "Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).", + "properties": { + "return_url": { + "type": "string" + } + }, + "required": ["return_url"], + "title": "redirect_params", + "type": "object" + }, + "source_order": { + "description": "Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.", + "properties": { + "items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "parent": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "enum": ["discount", "shipping", "sku", "tax"], + "maxLength": 5000, + "type": "string" + } + }, + "title": "order_item_specs", + "type": "object" + }, + "type": "array" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["line1"], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address"], + "title": "order_shipping", + "type": "object" + } + }, + "title": "shallow_order_specs", + "type": "object" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.", + "maxLength": 5000, + "type": "string" + }, + "token": { + "description": "An optional token used to create the source. When passed, token properties will override source parameters.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "enum": ["reusable", "single_use"], + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Shares a source" + } + }, + "/v1/sources/{source}": { + "get": { + "description": "

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.

", + "operationId": "GetSourcesSource", + "parameters": [ + { + "description": "The client secret of the source. Required if a publishable key is used to retrieve the source.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a source" + }, + "post": { + "description": "

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

\n\n

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 for more detail.

", + "operationId": "PostSourcesSource", + "parameters": [ + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + }, + "source_order": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount associated with the source.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.", + "properties": { + "acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "offline": { + "properties": { + "contact_email": { + "type": "string" + } + }, + "required": ["contact_email"], + "title": "mandate_offline_acceptance_params", + "type": "object" + }, + "online": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_online_acceptance_params", + "type": "object" + }, + "status": { + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["offline", "online"], + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["status"], + "title": "mandate_acceptance_params", + "type": "object" + }, + "amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "currency": { + "format": "currency", + "type": "string" + }, + "interval": { + "enum": ["one_time", "scheduled", "variable"], + "maxLength": 5000, + "type": "string" + }, + "notification_method": { + "enum": [ + "deprecated_none", + "email", + "manual", + "none", + "stripe_email" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_params", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "owner": { + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + }, + "source_order": { + "description": "Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.", + "properties": { + "items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "parent": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "enum": ["discount", "shipping", "sku", "tax"], + "maxLength": 5000, + "type": "string" + } + }, + "title": "order_item_specs", + "type": "object" + }, + "type": "array" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["line1"], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["address"], + "title": "order_shipping", + "type": "object" + } + }, + "title": "order_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a source" + } + }, + "/v1/sources/{source}/mandate_notifications/{mandate_notification}": { + "get": { + "description": "

Retrieves a new Source MandateNotification.

", + "operationId": "GetSourcesSourceMandateNotificationsMandateNotification", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "mandate_notification", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source_mandate_notification" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Source MandateNotification" + } + }, + "/v1/sources/{source}/source_transactions": { + "get": { + "description": "

List source transactions for a given source.

", + "operationId": "GetSourcesSourceSourceTransactions", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/source_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ApmsSourcesSourceTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/source_transactions/{source_transaction}": { + "get": { + "description": "

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.

", + "operationId": "GetSourcesSourceSourceTransactionsSourceTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "source_transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a source transaction" + } + }, + "/v1/sources/{source}/verify": { + "post": { + "description": "

Verify a given source.

", + "operationId": "PostSourcesSourceVerify", + "parameters": [ + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "values": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "values": { + "description": "The values needed to verify the source.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["values"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items": { + "get": { + "description": "

Returns a list of your subscription items for a given subscription.

", + "operationId": "GetSubscriptionItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The ID of the subscription whose items will be retrieved.", + "in": "query", + "name": "subscription", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscription_items", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionsItemsSubscriptionItemList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all subscription items" + }, + "post": { + "description": "

Adds a new item to an existing subscription. No existing items will be changed or replaced.

", + "operationId": "PostSubscriptionItems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the subscription item." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + }, + "quantity": { + "description": "The quantity you'd like to apply to the subscription item you're creating.", + "type": "integer" + }, + "subscription": { + "description": "The identifier of the subscription to modify.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates." + } + }, + "required": ["subscription"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a subscription item" + } + }, + "/v1/subscription_items/{item}": { + "delete": { + "description": "

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

", + "operationId": "DeleteSubscriptionItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": { + "clear_usage": { + "description": "Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.", + "type": "boolean" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a subscription item" + }, + "get": { + "description": "

Retrieves the subscription item with the given ID.

", + "operationId": "GetSubscriptionItemsItem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a subscription item" + }, + "post": { + "description": "

Updates the plan or quantity of an item on a current subscription.

", + "operationId": "PostSubscriptionItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the subscription item." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).", + "type": "boolean" + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "price": { + "description": "The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + }, + "quantity": { + "description": "The quantity you'd like to apply to the subscription item you're creating.", + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a subscription item" + } + }, + "/v1/subscription_items/{subscription_item}/usage_record_summaries": { + "get": { + "description": "

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

\n\n

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

", + "operationId": "GetSubscriptionItemsSubscriptionItemUsageRecordSummaries", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "in": "path", + "name": "subscription_item", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/usage_record_summary" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "UsageEventsResourceUsageRecordSummaryList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all subscription item period summaries" + } + }, + "/v1/subscription_items/{subscription_item}/usage_records": { + "post": { + "description": "

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

\n\n

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

\n\n

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

\n\n

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

", + "operationId": "PostSubscriptionItemsSubscriptionItemUsageRecords", + "parameters": [ + { + "in": "path", + "name": "subscription_item", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "timestamp": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "action": { + "description": "Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value.", + "enum": ["increment", "set"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "quantity": { + "description": "The usage quantity for the specified timestamp.", + "type": "integer" + }, + "timestamp": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `\"now\"`, Stripe records usage for the current time. Default is `\"now\"` if a value is not provided." + } + }, + "required": ["quantity"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/usage_record" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a usage record" + } + }, + "/v1/subscription_schedules": { + "get": { + "description": "

Retrieves the list of your subscription schedules.

", + "operationId": "GetSubscriptionSchedules", + "parameters": [ + { + "description": "Only return subscription schedules that were created canceled the given date interval.", + "explode": true, + "in": "query", + "name": "canceled_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that completed during the given date interval.", + "explode": true, + "in": "query", + "name": "completed_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules for the given customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return subscription schedules that were released during the given date interval.", + "explode": true, + "in": "query", + "name": "released_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that have not started yet.", + "in": "query", + "name": "scheduled", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription_schedule" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscription_schedules", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionSchedulesResourceScheduleList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all schedules" + }, + "post": { + "description": "

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

", + "operationId": "PostSubscriptionSchedules", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_settings": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "phases": { + "explode": true, + "style": "deepObject" + }, + "start_date": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The identifier of the customer to create the subscription schedule for.", + "maxLength": 5000, + "type": "string" + }, + "default_settings": { + "description": "Object representing the subscription schedule's default settings.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "subscription_schedule_default_settings_param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "default_settings_params", + "type": "object" + }, + "end_behavior": { + "description": "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.", + "enum": ["cancel", "none", "release", "renew"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "from_subscription": { + "description": "Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "phases": { + "description": "List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.", + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["items"], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "start_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ], + "description": "When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a schedule" + } + }, + "/v1/subscription_schedules/{schedule}": { + "get": { + "description": "

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.

", + "operationId": "GetSubscriptionSchedulesSchedule", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a schedule" + }, + "post": { + "description": "

Updates an existing subscription schedule.

", + "operationId": "PostSubscriptionSchedulesSchedule", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_settings": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "phases": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "default_settings": { + "description": "Object representing the subscription schedule's default settings.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "subscription_schedule_default_settings_param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "default_settings_params", + "type": "object" + }, + "end_behavior": { + "description": "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.", + "enum": ["cancel", "none", "release", "renew"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "phases": { + "description": "List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.", + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "collection_method": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "end_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "days_until_due": { + "type": "integer" + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + } + ] + } + }, + "required": ["items"], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "description": "If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a schedule" + } + }, + "/v1/subscription_schedules/{schedule}/cancel": { + "post": { + "description": "

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.

", + "operationId": "PostSubscriptionSchedulesScheduleCancel", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "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. Defaults to `true`.", + "type": "boolean" + }, + "prorate": { + "description": "If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a schedule" + } + }, + "/v1/subscription_schedules/{schedule}/release": { + "post": { + "description": "

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.

", + "operationId": "PostSubscriptionSchedulesScheduleRelease", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preserve_cancel_date": { + "description": "Keep any cancellation on the subscription that the schedule has set", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Release a schedule" + } + }, + "/v1/subscriptions": { + "get": { + "description": "

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

", + "operationId": "GetSubscriptions", + "parameters": [ + { + "description": "Filter subscriptions by their automatic tax settings.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "automatic_tax_filter_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.", + "in": "query", + "name": "collection_method", + "required": false, + "schema": { + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return subscriptions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscriptions whose current_period_end falls within the given date interval.", + "explode": true, + "in": "query", + "name": "current_period_end", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscriptions whose current_period_start falls within the given date interval.", + "explode": true, + "in": "query", + "name": "current_period_start", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The ID of the customer whose subscriptions will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter for subscriptions that contain this recurring price ID.", + "in": "query", + "name": "price", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "all", + "canceled", + "ended", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscriptions", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionsSubscriptionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List subscriptions" + }, + "post": { + "description": "

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

\n\n

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.\nThe payment_behavior parameter determines the exact behavior of the initial payment.

\n\n

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead.\nSchedules provide the flexibility to model more complex billing configurations that change over time.

", + "operationId": "PostSubscriptions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_cycle_anchor_config": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions)." + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "backdate_start_date": { + "description": "For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor": { + "description": "A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future 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.", + "format": "unix-time", + "type": "integer", + "x-stripeBypassValidation": true + }, + "billing_cycle_anchor_config": { + "description": "Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.", + "properties": { + "day_of_month": { + "type": "integer" + }, + "hour": { + "type": "integer" + }, + "minute": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "second": { + "type": "integer" + } + }, + "required": ["day_of_month"], + "title": "billing_cycle_anchor_config_param", + "type": "object" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.", + "format": "unix-time", + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.", + "type": "boolean" + }, + "collection_method": { + "description": "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`. Defaults to `charge_automatically`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "The identifier of the customer to subscribe.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "description": { + "description": "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.", + "maxLength": 500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings_param", + "type": "object" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).", + "type": "boolean" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The account on behalf of which to charge, for each of the subscription's invoices." + }, + "payment_behavior": { + "description": "Only applies to subscriptions with `collection_method=charge_automatically`.\n\nUse `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.\n\n`pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.\n\nSubscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": ["off", "on_subscription"], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.", + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." + }, + "trial_from_plan": { + "description": "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.", + "type": "boolean" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "integer" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + } + }, + "required": ["customer"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a subscription" + } + }, + "/v1/subscriptions/search": { + "get": { + "description": "

Search for subscriptions you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetSubscriptionsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["search_result"], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SearchResult", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Search subscriptions" + } + }, + "/v1/subscriptions/{subscription_exposed_id}": { + "delete": { + "description": "

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.

\n\n

Any pending invoice items that you’ve created are still charged at the end of the period, unless manually deleted. 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.

\n\n

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.

", + "operationId": "DeleteSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "cancellation_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_details": { + "description": "Details about why this subscription was cancelled", + "properties": { + "comment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "feedback": { + "enum": [ + "", + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + } + }, + "title": "cancellation_details_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.", + "type": "boolean" + }, + "prorate": { + "description": "Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a subscription" + }, + "get": { + "description": "

Retrieves the subscription with the given ID.

", + "operationId": "GetSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a subscription" + }, + "post": { + "description": "

Updates an existing subscription to match the specified parameters.\nWhen changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.\nTo preview how the proration is calculated, use the create preview endpoint.

\n\n

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.

\n\n

Switching prices does not normally change the billing date or generate an immediate charge unless:

\n\n
    \n
  • The billing interval is changed (for example, from monthly to yearly).
  • \n
  • The subscription moves from free to paid.
  • \n
  • A trial starts or ends.
  • \n
\n\n

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.

\n\n

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.

\n\n

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.

\n\n

Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.

", + "operationId": "PostSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "cancel_at": { + "explode": true, + "style": "deepObject" + }, + "cancellation_details": { + "explode": true, + "style": "deepObject" + }, + "default_source": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "description": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "pause_collection": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "discounts": { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product"], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions)." + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + }, + "liability": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "required": ["enabled"], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": ["now", "unchanged"], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." + }, + "cancel_at_period_end": { + "description": "Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.", + "type": "boolean" + }, + "cancellation_details": { + "description": "Details about why this subscription was cancelled", + "properties": { + "comment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "feedback": { + "enum": [ + "", + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + } + }, + "title": "cancellation_details_param", + "type": "object" + }, + "collection_method": { + "description": "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`. Defaults to `charge_automatically`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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. Pass an empty string to remove previously-defined tax rates." + }, + "description": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "issuer": { + "properties": { + "account": { + "type": "string" + }, + "type": { + "enum": ["account", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "param", + "type": "object" + } + }, + "title": "invoice_settings_param", + "type": "object" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": ["currency", "product", "recurring"], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).", + "type": "boolean" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The account on behalf of which to charge, for each of the subscription's invoices." + }, + "pause_collection": { + "anyOf": [ + { + "properties": { + "behavior": { + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "format": "unix-time", + "type": "integer" + } + }, + "required": ["behavior"], + "title": "pause_collection_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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)." + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": ["business", "personal"], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": ["any", "automatic", "challenge"], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "filters": { + "properties": { + "account_subcategories": { + "items": { + "enum": ["checking", "savings"], + "type": "string" + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_filters_param", + "type": "object" + }, + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "prefetch": { + "items": { + "enum": [ + "balances", + "ownership", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "p24", + "payco", + "paynow", + "paypal", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": ["off", "on_subscription"], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": ["interval"], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "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." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": ["destination"], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value." + }, + "trial_end": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`." + }, + "trial_from_plan": { + "description": "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.", + "type": "boolean" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "end_behavior", + "type": "object" + } + }, + "required": ["end_behavior"], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a subscription" + } + }, + "/v1/subscriptions/{subscription_exposed_id}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a subscription.

", + "operationId": "DeleteSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a subscription discount" + } + }, + "/v1/subscriptions/{subscription}/resume": { + "post": { + "description": "

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.

", + "operationId": "PostSubscriptionsSubscriptionResume", + "parameters": [ + { + "in": "path", + "name": "subscription", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_cycle_anchor": { + "description": "The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": ["now", "unchanged"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Resume a subscription" + } + }, + "/v1/tax/calculations": { + "post": { + "description": "

Calculates tax based on the input and returns a Tax Calculation object.

", + "operationId": "PostTaxCalculations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "customer_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "ship_from_details": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.", + "maxLength": 5000, + "type": "string" + }, + "customer_details": { + "description": "Details about the customer, including address and tax IDs.", + "properties": { + "address": { + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line2": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "postal_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "state": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["country"], + "title": "postal_address", + "type": "object" + }, + "address_source": { + "enum": ["billing", "shipping"], + "type": "string" + }, + "ip_address": { + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": ["type", "value"], + "title": "data_params", + "type": "object" + }, + "type": "array" + }, + "taxability_override": { + "enum": ["customer_exempt", "none", "reverse_charge"], + "type": "string" + } + }, + "title": "customer_details", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "line_items": { + "description": "A list of items the customer is purchasing.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "reference": { + "maxLength": 500, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_code": { + "type": "string" + } + }, + "required": ["amount"], + "title": "calculation_line_item", + "type": "object" + }, + "type": "array" + }, + "ship_from_details": { + "description": "Details about the address from which the goods are being shipped.", + "properties": { + "address": { + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "line2": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "postal_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "state": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["country"], + "title": "merchant_postal_address", + "type": "object" + } + }, + "required": ["address"], + "title": "ship_from_details", + "type": "object" + }, + "shipping_cost": { + "description": "Shipping cost details to be used for the calculation.", + "properties": { + "amount": { + "type": "integer" + }, + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_code": { + "type": "string" + } + }, + "title": "shipping_cost", + "type": "object" + }, + "tax_date": { + "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.", + "type": "integer" + } + }, + "required": ["currency", "line_items"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.calculation" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Tax Calculation" + } + }, + "/v1/tax/calculations/{calculation}": { + "get": { + "description": "

Retrieves a Tax Calculation object, if the calculation hasn’t expired.

", + "operationId": "GetTaxCalculationsCalculation", + "parameters": [ + { + "in": "path", + "name": "calculation", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.calculation" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Tax Calculation" + } + }, + "/v1/tax/calculations/{calculation}/line_items": { + "get": { + "description": "

Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.

", + "operationId": "GetTaxCalculationsCalculationLineItems", + "parameters": [ + { + "in": "path", + "name": "calculation", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.calculation_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/calculations/[^/]+/line_items", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxProductResourceTaxCalculationLineItemList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a calculation's line items" + } + }, + "/v1/tax/registrations": { + "get": { + "description": "

Returns a list of Tax Registration objects.

", + "operationId": "GetTaxRegistrations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the Tax Registration.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["active", "all", "expired", "scheduled"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax.registration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/registrations", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxProductRegistrationsResourceTaxRegistrationList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List registrations" + }, + "post": { + "description": "

Creates a new Tax Registration object.

", + "operationId": "PostTaxRegistrations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "active_from": { + "explode": true, + "style": "deepObject" + }, + "country_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active_from": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch." + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "country_options": { + "description": "Specific options for a registration in the specified `country`.", + "properties": { + "ae": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "al": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "am": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "ao": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "at": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "au": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "ba": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "bb": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "be": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "bg": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "bh": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "bs": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "by": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "ca": { + "properties": { + "province_standard": { + "properties": { + "province": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["province"], + "title": "province_standard", + "type": "object" + }, + "type": { + "enum": [ + "province_standard", + "simplified", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "canada", + "type": "object" + }, + "cd": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "ch": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "cl": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "co": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "cr": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "cy": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "cz": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "de": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "dk": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "ec": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "ee": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "eg": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "es": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "fi": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "fr": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "gb": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "ge": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "gn": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "gr": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "hr": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "hu": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "id": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "ie": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "is": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "it": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "jp": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "ke": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "kh": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "kr": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "kz": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "lt": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "lu": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "lv": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "ma": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "md": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "me": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "mk": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "mr": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "mt": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "mx": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "my": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "ng": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "nl": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "no": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "np": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "nz": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "om": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "pe": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "pl": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "pt": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "ro": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "rs": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "ru": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "sa": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "se": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "sg": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "si": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "sk": { + "properties": { + "standard": { + "properties": { + "place_of_supply_scheme": { + "enum": ["small_seller", "standard"], + "type": "string" + } + }, + "required": ["place_of_supply_scheme"], + "title": "standard", + "type": "object" + }, + "type": { + "enum": [ + "ioss", + "oss_non_union", + "oss_union", + "standard" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "europe", + "type": "object" + }, + "sn": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "sr": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "th": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "tj": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "tr": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "tz": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "ug": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "us": { + "properties": { + "local_amusement_tax": { + "properties": { + "jurisdiction": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["jurisdiction"], + "title": "local_amusement_tax", + "type": "object" + }, + "local_lease_tax": { + "properties": { + "jurisdiction": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["jurisdiction"], + "title": "local_lease_tax", + "type": "object" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "state_sales_tax": { + "properties": { + "elections": { + "items": { + "properties": { + "jurisdiction": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "state_sales_tax_election", + "type": "object" + }, + "type": "array" + } + }, + "required": ["elections"], + "title": "state_sales_tax", + "type": "object" + }, + "type": { + "enum": [ + "local_amusement_tax", + "local_lease_tax", + "state_communications_tax", + "state_retail_delivery_fee", + "state_sales_tax" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["state", "type"], + "title": "united_states", + "type": "object" + }, + "uy": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "uz": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "vn": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "za": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + }, + "zm": { + "properties": { + "type": { + "enum": ["simplified"], + "type": "string" + } + }, + "required": ["type"], + "title": "simplified", + "type": "object" + }, + "zw": { + "properties": { + "type": { + "enum": ["standard"], + "type": "string" + } + }, + "required": ["type"], + "title": "default", + "type": "object" + } + }, + "title": "country_options", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["active_from", "country", "country_options"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.registration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a registration" + } + }, + "/v1/tax/registrations/{id}": { + "get": { + "description": "

Returns a Tax Registration object.

", + "operationId": "GetTaxRegistrationsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.registration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a registration" + }, + "post": { + "description": "

Updates an existing Tax Registration object.

\n\n

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.

", + "operationId": "PostTaxRegistrationsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "active_from": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "expires_at": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active_from": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "anyOf": [ + { + "enum": ["now"], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.registration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a registration" + } + }, + "/v1/tax/settings": { + "get": { + "description": "

Retrieves Tax Settings for a merchant.

", + "operationId": "GetTaxSettings", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.settings" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve settings" + }, + "post": { + "description": "

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

", + "operationId": "PostTaxSettings", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "defaults": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "head_office": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "defaults": { + "description": "Default configuration to be used on Stripe Tax calculations.", + "properties": { + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "inferred_by_currency" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + } + }, + "title": "defaults_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "head_office": { + "description": "The place where your business is located.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "validated_country_address", + "type": "object" + } + }, + "required": ["address"], + "title": "head_office_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.settings" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update settings" + } + }, + "/v1/tax/transactions/create_from_calculation": { + "post": { + "description": "

Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.

", + "operationId": "PostTaxTransactionsCreateFromCalculation", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "calculation": { + "description": "Tax Calculation ID to be used as input when creating the transaction.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "posted_at": { + "description": "The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.", + "format": "unix-time", + "type": "integer" + }, + "reference": { + "description": "A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.", + "maxLength": 500, + "type": "string" + } + }, + "required": ["calculation", "reference"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a transaction from a calculation" + } + }, + "/v1/tax/transactions/create_reversal": { + "post": { + "description": "

Partially or fully reverses a previously created Transaction.

", + "operationId": "PostTaxTransactionsCreateReversal", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flat_amount": { + "description": "A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.", + "type": "integer" + }, + "line_items": { + "description": "The line item amounts to reverse.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_tax": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "original_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "reference": { + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "original_line_item", + "reference" + ], + "title": "transaction_line_item_reversal", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "mode": { + "description": "If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.", + "enum": ["full", "partial"], + "type": "string" + }, + "original_transaction": { + "description": "The ID of the Transaction to partially or fully reverse.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports).", + "maxLength": 500, + "type": "string" + }, + "shipping_cost": { + "description": "The shipping cost to reverse.", + "properties": { + "amount": { + "type": "integer" + }, + "amount_tax": { + "type": "integer" + } + }, + "required": ["amount", "amount_tax"], + "title": "transaction_shipping_cost_reversal", + "type": "object" + } + }, + "required": ["mode", "original_transaction", "reference"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a reversal transaction" + } + }, + "/v1/tax/transactions/{transaction}": { + "get": { + "description": "

Retrieves a Tax Transaction object.

", + "operationId": "GetTaxTransactionsTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a transaction" + } + }, + "/v1/tax/transactions/{transaction}/line_items": { + "get": { + "description": "

Retrieves the line items of a committed standalone transaction as a collection.

", + "operationId": "GetTaxTransactionsTransactionLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.transaction_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/transactions/[^/]+/line_items", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxProductResourceTaxTransactionLineItemList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a transaction's line items" + } + }, + "/v1/tax_codes": { + "get": { + "description": "

A list of all tax codes available to add to Products in order to allow specific tax calculations.

", + "operationId": "GetTaxCodes", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax_code" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxProductResourceTaxCodeList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all tax codes" + } + }, + "/v1/tax_codes/{id}": { + "get": { + "description": "

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

", + "operationId": "GetTaxCodesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a tax code" + } + }, + "/v1/tax_ids": { + "get": { + "description": "

Returns a list of tax IDs.

", + "operationId": "GetTaxIds", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.", + "explode": true, + "in": "query", + "name": "owner", + "required": false, + "schema": { + "properties": { + "account": { + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["account", "application", "customer", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "owner_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all tax IDs" + }, + "post": { + "description": "

Creates a new account or customer tax_id object.

", + "operationId": "PostTaxIds", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "owner": { + "description": "The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.", + "properties": { + "account": { + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["account", "application", "customer", "self"], + "type": "string" + } + }, + "required": ["type"], + "title": "owner_params", + "type": "object" + }, + "type": { + "description": "Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `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`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `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`, `kh_tin`, `kr_brn`, `kz_bin`, `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`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "ba_tin", + "bb_tin", + "bg_uic", + "bh_vat", + "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", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "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", + "kh_tin", + "kr_brn", + "kz_bin", + "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", + "zw_tin" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "description": "Value of the tax ID.", + "type": "string" + } + }, + "required": ["type", "value"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a tax ID" + } + }, + "/v1/tax_ids/{id}": { + "delete": { + "description": "

Deletes an existing account or customer tax_id object.

", + "operationId": "DeleteTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a tax ID" + }, + "get": { + "description": "

Retrieves an account or customer tax_id object.

", + "operationId": "GetTaxIdsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a tax ID" + } + }, + "/v1/tax_rates": { + "get": { + "description": "

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

", + "operationId": "GetTaxRates", + "parameters": [ + { + "description": "Optional flag to filter by tax rates that are either active or inactive (archived).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Optional range for filtering created date.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).", + "in": "query", + "name": "inclusive", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax_rates", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxRatesList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all tax rates" + }, + "post": { + "description": "

Creates a new tax rate.

", + "operationId": "PostTaxRates", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rate, which will be shown to users.", + "maxLength": 50, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "inclusive": { + "description": "This specifies if the tax rate is inclusive or exclusive.", + "type": "boolean" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 50, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["display_name", "inclusive", "percentage"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a tax rate" + } + }, + "/v1/tax_rates/{tax_rate}": { + "get": { + "description": "

Retrieves a tax rate with the given ID

", + "operationId": "GetTaxRatesTaxRate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "tax_rate", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a tax rate" + }, + "post": { + "description": "

Updates an existing tax rate.

", + "operationId": "PostTaxRatesTaxRate", + "parameters": [ + { + "in": "path", + "name": "tax_rate", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rate, which will be shown to users.", + "maxLength": 50, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 50, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a tax rate" + } + }, + "/v1/terminal/configurations": { + "get": { + "description": "

Returns a list of Configuration objects.

", + "operationId": "GetTerminalConfigurations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "if present, only return the account default or non-default configurations.", + "in": "query", + "name": "is_account_default", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/terminal.configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/terminal/configurations", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TerminalConfigurationConfigurationList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Configurations" + }, + "post": { + "description": "

Creates a new Configuration object.

", + "operationId": "PostTerminalConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bbpos_wisepos_e": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "offline": { + "explode": true, + "style": "deepObject" + }, + "reboot_window": { + "explode": true, + "style": "deepObject" + }, + "stripe_s700": { + "explode": true, + "style": "deepObject" + }, + "tipping": { + "explode": true, + "style": "deepObject" + }, + "verifone_p400": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bbpos_wisepos_e": { + "description": "An object containing device type specific settings for BBPOS WisePOS E readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "bbpos_wise_pose", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Name of the configuration", + "maxLength": 100, + "type": "string" + }, + "offline": { + "anyOf": [ + { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "offline", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Configurations for collecting transactions offline." + }, + "reboot_window": { + "description": "Reboot time settings for readers that support customized reboot time configuration.", + "properties": { + "end_hour": { + "type": "integer" + }, + "start_hour": { + "type": "integer" + } + }, + "required": ["end_hour", "start_hour"], + "title": "reboot_window", + "type": "object" + }, + "stripe_s700": { + "description": "An object containing device type specific settings for Stripe S700 readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "stripe_s700", + "type": "object" + }, + "tipping": { + "anyOf": [ + { + "properties": { + "aud": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "cad": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "chf": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "czk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "dkk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "eur": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "gbp": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "hkd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "jpy": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "myr": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nok": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nzd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "pln": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sek": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sgd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "usd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + } + }, + "title": "tipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Tipping configurations for readers supporting on-reader tips" + }, + "verifone_p400": { + "description": "An object containing device type specific settings for Verifone P400 readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "verifone_p400", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Configuration" + } + }, + "/v1/terminal/configurations/{configuration}": { + "delete": { + "description": "

Deletes a Configuration object.

", + "operationId": "DeleteTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a Configuration" + }, + "get": { + "description": "

Retrieves a Configuration object.

", + "operationId": "GetTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.configuration" + }, + { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Configuration" + }, + "post": { + "description": "

Updates a new Configuration object.

", + "operationId": "PostTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bbpos_wisepos_e": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "offline": { + "explode": true, + "style": "deepObject" + }, + "reboot_window": { + "explode": true, + "style": "deepObject" + }, + "stripe_s700": { + "explode": true, + "style": "deepObject" + }, + "tipping": { + "explode": true, + "style": "deepObject" + }, + "verifone_p400": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bbpos_wisepos_e": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "bbpos_wise_pose", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "An object containing device type specific settings for BBPOS WisePOS E readers" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Name of the configuration", + "maxLength": 100, + "type": "string" + }, + "offline": { + "anyOf": [ + { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "offline", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Configurations for collecting transactions offline." + }, + "reboot_window": { + "anyOf": [ + { + "properties": { + "end_hour": { + "type": "integer" + }, + "start_hour": { + "type": "integer" + } + }, + "required": ["end_hour", "start_hour"], + "title": "reboot_window", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Reboot time settings for readers that support customized reboot time configuration." + }, + "stripe_s700": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "stripe_s700", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "An object containing device type specific settings for Stripe S700 readers" + }, + "tipping": { + "anyOf": [ + { + "properties": { + "aud": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "cad": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "chf": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "czk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "dkk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "eur": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "gbp": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "hkd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "jpy": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "myr": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nok": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nzd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "pln": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sek": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sgd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "usd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + } + }, + "title": "tipping", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Tipping configurations for readers supporting on-reader tips" + }, + "verifone_p400": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "verifone_p400", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "An object containing device type specific settings for Verifone P400 readers" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.configuration" + }, + { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a Configuration" + } + }, + "/v1/terminal/connection_tokens": { + "post": { + "description": "

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.

", + "operationId": "PostTerminalConnectionTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "location": { + "description": "The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. 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).", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.connection_token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Connection Token" + } + }, + "/v1/terminal/locations": { + "get": { + "description": "

Returns a list of Location objects.

", + "operationId": "GetTerminalLocations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/terminal.location" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/terminal/locations", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TerminalLocationLocationList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Locations" + }, + "post": { + "description": "

Creates a new Location object.\nFor further details, including which address fields are required in each country, see the Manage locations guide.

", + "operationId": "PostTerminalLocations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The full address of the location.", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country"], + "title": "create_location_address_param", + "type": "object" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 500, + "type": "string" + }, + "display_name": { + "description": "A name for the location. Maximum length is 1000 characters.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": ["address", "display_name"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.location" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Location" + } + }, + "/v1/terminal/locations/{location}": { + "delete": { + "description": "

Deletes a Location object.

", + "operationId": "DeleteTerminalLocationsLocation", + "parameters": [ + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.location" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a Location" + }, + "get": { + "description": "

Retrieves a Location object.

", + "operationId": "GetTerminalLocationsLocation", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "$ref": "#/components/schemas/deleted_terminal.location" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Location" + }, + "post": { + "description": "

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostTerminalLocationsLocation", + "parameters": [ + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "configuration_overrides": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location.", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "configuration_overrides": { + "anyOf": [ + { + "maxLength": 1000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The ID of a configuration that will be used to customize all readers in this location." + }, + "display_name": { + "description": "A name for the location.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "$ref": "#/components/schemas/deleted_terminal.location" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a Location" + } + }, + "/v1/terminal/readers": { + "get": { + "description": "

Returns a list of Reader objects.

", + "operationId": "GetTerminalReaders", + "parameters": [ + { + "description": "Filters readers by device type", + "in": "query", + "name": "device_type", + "required": false, + "schema": { + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "mobile_phone_reader", + "simulated_wisepos_e", + "stripe_m2", + "stripe_s700", + "verifone_P400" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A location ID to filter the response list to only readers at the specific location", + "in": "query", + "name": "location", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filters readers by serial number", + "in": "query", + "name": "serial_number", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A status filter to filter readers to only offline or online readers", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["offline", "online"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "A list of readers", + "items": { + "$ref": "#/components/schemas/terminal.reader" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TerminalReaderRetrieveReader", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Readers" + }, + "post": { + "description": "

Creates a new Reader object.

", + "operationId": "PostTerminalReaders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.", + "maxLength": 5000, + "type": "string" + }, + "location": { + "description": "The location to assign the reader to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "registration_code": { + "description": "A code generated by the reader used for registering to an account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["registration_code"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a Reader" + } + }, + "/v1/terminal/readers/{reader}": { + "delete": { + "description": "

Deletes a Reader object.

", + "operationId": "DeleteTerminalReadersReader", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a Reader" + }, + "get": { + "description": "

Retrieves a Reader object.

", + "operationId": "GetTerminalReadersReader", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.reader" + }, + { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Reader" + }, + "post": { + "description": "

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostTerminalReadersReader", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "label": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "label": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The new label of the reader." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.reader" + }, + { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a Reader" + } + }, + "/v1/terminal/readers/{reader}/cancel_action": { + "post": { + "description": "

Cancels the current reader action.

", + "operationId": "PostTerminalReadersReaderCancelAction", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel the current reader action" + } + }, + "/v1/terminal/readers/{reader}/process_payment_intent": { + "post": { + "description": "

Initiates a payment flow on a Reader.

", + "operationId": "PostTerminalReadersReaderProcessPaymentIntent", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "process_config": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_intent": { + "description": "PaymentIntent ID", + "maxLength": 5000, + "type": "string" + }, + "process_config": { + "description": "Configuration overrides", + "properties": { + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "enable_customer_cancellation": { + "type": "boolean" + }, + "skip_tipping": { + "type": "boolean" + }, + "tipping": { + "properties": { + "amount_eligible": { + "type": "integer" + } + }, + "title": "tipping_config", + "type": "object" + } + }, + "title": "process_config", + "type": "object" + } + }, + "required": ["payment_intent"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Hand-off a PaymentIntent to a Reader" + } + }, + "/v1/terminal/readers/{reader}/process_setup_intent": { + "post": { + "description": "

Initiates a setup intent flow on a Reader.

", + "operationId": "PostTerminalReadersReaderProcessSetupIntent", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "process_config": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "allow_redisplay": { + "description": "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.", + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "process_config": { + "description": "Configuration overrides", + "properties": { + "enable_customer_cancellation": { + "type": "boolean" + } + }, + "title": "process_setup_config", + "type": "object" + }, + "setup_intent": { + "description": "SetupIntent ID", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["allow_redisplay", "setup_intent"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Hand-off a SetupIntent to a Reader" + } + }, + "/v1/terminal/readers/{reader}/refund_payment": { + "post": { + "description": "

Initiates a refund on a Reader

", + "operationId": "PostTerminalReadersReaderRefundPayment", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "refund_payment_config": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in __cents__ representing how much of this charge to refund.", + "type": "integer" + }, + "charge": { + "description": "ID of the Charge to refund.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_intent": { + "description": "ID of the PaymentIntent to refund.", + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "description": "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.", + "type": "boolean" + }, + "refund_payment_config": { + "description": "Configuration overrides", + "properties": { + "enable_customer_cancellation": { + "type": "boolean" + } + }, + "title": "refund_payment_config", + "type": "object" + }, + "reverse_transfer": { + "description": "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.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Refund a Charge or a PaymentIntent in-person" + } + }, + "/v1/terminal/readers/{reader}/set_reader_display": { + "post": { + "description": "

Sets reader display to show cart details.

", + "operationId": "PostTerminalReadersReaderSetReaderDisplay", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "cart": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cart": { + "description": "Cart", + "properties": { + "currency": { + "format": "currency", + "type": "string" + }, + "line_items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": ["amount", "description", "quantity"], + "title": "line_item", + "type": "object" + }, + "type": "array" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "required": ["currency", "line_items", "total"], + "title": "cart", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type", + "enum": ["cart"], + "type": "string" + } + }, + "required": ["type"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Set reader display" + } + }, + "/v1/test_helpers/confirmation_tokens": { + "post": { + "description": "

Creates a test mode Confirmation Token server side for your integration tests.

", + "operationId": "PostTestHelpersConfirmationTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_method": { + "description": "ID of an existing PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "allow_redisplay": { + "enum": ["always", "limited", "unspecified"], + "type": "string" + }, + "alma": { + "properties": {}, + "title": "param", + "type": "object" + }, + "amazon_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "bsb_number"], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "param", + "type": "object" + }, + "cashapp": { + "properties": {}, + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["bank"], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kakao_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "kr_card": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mobilepay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "multibanco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "naver_pay": { + "properties": { + "funding": { + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "pay_by_bank": { + "properties": {}, + "title": "param", + "type": "object" + }, + "payco": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "paypal": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options_with_hidden_options", + "type": "object" + }, + "revolut_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "samsung_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["iban"], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": ["AT", "BE", "DE", "ES", "IT", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "param", + "type": "object" + }, + "swish": { + "properties": {}, + "title": "param", + "type": "object" + }, + "twint": { + "properties": {}, + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mobilepay", + "multibanco", + "naver_pay", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "sepa_debit", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "zip": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data_params", + "type": "object" + }, + "return_url": { + "description": "Return URL used to confirm the Intent.", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this ConfirmationToken's payment method.\n\nThe 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.", + "enum": ["off_session", "on_session"], + "type": "string" + }, + "shipping": { + "description": "Shipping information for this ConfirmationToken.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "required": ["address", "name"], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/confirmation_token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a test Confirmation Token" + } + }, + "/v1/test_helpers/customers/{customer}/fund_cash_balance": { + "post": { + "description": "

Create an incoming testmode bank transfer

", + "operationId": "PostTestHelpersCustomersCustomerFundCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reference": { + "description": "A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Fund a test mode cash balance" + } + }, + "/v1/test_helpers/issuing/authorizations": { + "post": { + "description": "

Create a test-mode authorization.

", + "operationId": "PostTestHelpersIssuingAuthorizations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amount_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fleet": { + "explode": true, + "style": "deepObject" + }, + "fuel": { + "explode": true, + "style": "deepObject" + }, + "merchant_data": { + "explode": true, + "style": "deepObject" + }, + "network_data": { + "explode": true, + "style": "deepObject" + }, + "verification_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "properties": { + "atm_fee": { + "type": "integer" + }, + "cashback_amount": { + "type": "integer" + } + }, + "title": "amount_details_specs", + "type": "object" + }, + "authorization_method": { + "description": "How the card details were provided. Defaults to online.", + "enum": [ + "chip", + "contactless", + "keyed_in", + "online", + "swipe" + ], + "type": "string" + }, + "card": { + "description": "Card associated with this authorization.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency of the authorization. If not provided, defaults to the currency of the card. 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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fleet": { + "description": "Fleet-specific information for authorizations using Fleet cards.", + "properties": { + "cardholder_prompt_data": { + "properties": { + "driver_id": { + "maxLength": 5000, + "type": "string" + }, + "odometer": { + "type": "integer" + }, + "unspecified_id": { + "maxLength": 5000, + "type": "string" + }, + "user_id": { + "maxLength": 5000, + "type": "string" + }, + "vehicle_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_cardholder_prompt_data_specs", + "type": "object" + }, + "purchase_type": { + "enum": [ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase" + ], + "maxLength": 5000, + "type": "string" + }, + "reported_breakdown": { + "properties": { + "fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_fuel_specs", + "type": "object" + }, + "non_fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_non_fuel_specs", + "type": "object" + }, + "tax": { + "properties": { + "local_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "national_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_tax_specs", + "type": "object" + } + }, + "title": "fleet_reported_breakdown_specs", + "type": "object" + }, + "service_type": { + "enum": [ + "full_service", + "non_fuel_transaction", + "self_service" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_testmode_authorization_specs", + "type": "object" + }, + "fuel": { + "description": "Information about fuel that was purchased with this transaction.", + "properties": { + "industry_product_code": { + "maxLength": 5000, + "type": "string" + }, + "quantity_decimal": { + "format": "decimal", + "type": "string" + }, + "type": { + "enum": [ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super" + ], + "maxLength": 5000, + "type": "string" + }, + "unit": { + "enum": [ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon" + ], + "maxLength": 5000, + "type": "string" + }, + "unit_cost_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fuel_specs", + "type": "object" + }, + "is_amount_controllable": { + "description": "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.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency of the authorization. If not provided, defaults to the currency of the card. 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).", + "format": "currency", + "type": "string" + }, + "merchant_data": { + "description": "Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.", + "properties": { + "category": { + "enum": [ + "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_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" + ], + "maxLength": 5000, + "type": "string" + }, + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "network_id": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "terminal_id": { + "maxLength": 5000, + "type": "string" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "merchant_data_specs", + "type": "object" + }, + "network_data": { + "description": "Details about the authorization, such as identifiers, set by the card network.", + "properties": { + "acquiring_institution_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "network_data_specs", + "type": "object" + }, + "verification_data": { + "description": "Verifications that Stripe performed on information that the cardholder provided to the merchant.", + "properties": { + "address_line1_check": { + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "address_postal_code_check": { + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "authentication_exemption": { + "properties": { + "claimed_by": { + "enum": ["acquirer", "issuer"], + "type": "string" + }, + "type": { + "enum": [ + "low_value_transaction", + "transaction_risk_analysis", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["claimed_by", "type"], + "title": "authentication_exemption_specs", + "type": "object" + }, + "cvc_check": { + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "expiry_check": { + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "three_d_secure": { + "properties": { + "result": { + "enum": [ + "attempt_acknowledged", + "authenticated", + "failed", + "required" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["result"], + "title": "three_d_secure_specs", + "type": "object" + } + }, + "title": "verification_data_specs", + "type": "object" + }, + "wallet": { + "description": "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.", + "enum": ["apple_pay", "google_pay", "samsung_pay"], + "type": "string" + } + }, + "required": ["card"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a test-mode authorization" + } + }, + "/v1/test_helpers/issuing/authorizations/{authorization}/capture": { + "post": { + "description": "

Capture a test-mode authorization.

", + "operationId": "PostTestHelpersIssuingAuthorizationsAuthorizationCapture", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "purchase_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "capture_amount": { + "description": "The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "close_authorization": { + "description": "Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "purchase_details": { + "description": "Additional purchase information that is optionally provided by the merchant.", + "properties": { + "fleet": { + "properties": { + "cardholder_prompt_data": { + "properties": { + "driver_id": { + "maxLength": 5000, + "type": "string" + }, + "odometer": { + "type": "integer" + }, + "unspecified_id": { + "maxLength": 5000, + "type": "string" + }, + "user_id": { + "maxLength": 5000, + "type": "string" + }, + "vehicle_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_cardholder_prompt_data_specs", + "type": "object" + }, + "purchase_type": { + "enum": [ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase" + ], + "maxLength": 5000, + "type": "string" + }, + "reported_breakdown": { + "properties": { + "fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_fuel_specs", + "type": "object" + }, + "non_fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_non_fuel_specs", + "type": "object" + }, + "tax": { + "properties": { + "local_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "national_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_tax_specs", + "type": "object" + } + }, + "title": "fleet_reported_breakdown_specs", + "type": "object" + }, + "service_type": { + "enum": [ + "full_service", + "non_fuel_transaction", + "self_service" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_specs", + "type": "object" + }, + "flight": { + "properties": { + "departure_at": { + "format": "unix-time", + "type": "integer" + }, + "passenger_name": { + "maxLength": 5000, + "type": "string" + }, + "refundable": { + "type": "boolean" + }, + "segments": { + "items": { + "properties": { + "arrival_airport_code": { + "maxLength": 3, + "type": "string" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "departure_airport_code": { + "maxLength": 3, + "type": "string" + }, + "flight_number": { + "maxLength": 5000, + "type": "string" + }, + "service_class": { + "maxLength": 5000, + "type": "string" + }, + "stopover_allowed": { + "type": "boolean" + } + }, + "title": "flight_segment_specs", + "type": "object" + }, + "type": "array" + }, + "travel_agency": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "flight_specs", + "type": "object" + }, + "fuel": { + "properties": { + "industry_product_code": { + "maxLength": 5000, + "type": "string" + }, + "quantity_decimal": { + "format": "decimal", + "type": "string" + }, + "type": { + "enum": [ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super" + ], + "maxLength": 5000, + "type": "string" + }, + "unit": { + "enum": [ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon" + ], + "maxLength": 5000, + "type": "string" + }, + "unit_cost_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fuel_specs", + "type": "object" + }, + "lodging": { + "properties": { + "check_in_at": { + "format": "unix-time", + "type": "integer" + }, + "nights": { + "type": "integer" + } + }, + "title": "lodging_specs", + "type": "object" + }, + "receipt": { + "items": { + "properties": { + "description": { + "maxLength": 26, + "type": "string" + }, + "quantity": { + "format": "decimal", + "type": "string" + }, + "total": { + "type": "integer" + }, + "unit_cost": { + "type": "integer" + } + }, + "title": "receipt_specs", + "type": "object" + }, + "type": "array" + }, + "reference": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "purchase_details_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Capture a test-mode authorization" + } + }, + "/v1/test_helpers/issuing/authorizations/{authorization}/expire": { + "post": { + "description": "

Expire a test-mode Authorization.

", + "operationId": "PostTestHelpersIssuingAuthorizationsAuthorizationExpire", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Expire a test-mode authorization" + } + }, + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount": { + "post": { + "description": "

Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.

", + "operationId": "PostTestHelpersIssuingAuthorizationsAuthorizationFinalizeAmount", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fleet": { + "explode": true, + "style": "deepObject" + }, + "fuel": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "final_amount": { + "description": "The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "fleet": { + "description": "Fleet-specific information for authorizations using Fleet cards.", + "properties": { + "cardholder_prompt_data": { + "properties": { + "driver_id": { + "maxLength": 5000, + "type": "string" + }, + "odometer": { + "type": "integer" + }, + "unspecified_id": { + "maxLength": 5000, + "type": "string" + }, + "user_id": { + "maxLength": 5000, + "type": "string" + }, + "vehicle_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_cardholder_prompt_data_specs", + "type": "object" + }, + "purchase_type": { + "enum": [ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase" + ], + "maxLength": 5000, + "type": "string" + }, + "reported_breakdown": { + "properties": { + "fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_fuel_specs", + "type": "object" + }, + "non_fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_non_fuel_specs", + "type": "object" + }, + "tax": { + "properties": { + "local_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "national_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_tax_specs", + "type": "object" + } + }, + "title": "fleet_reported_breakdown_specs", + "type": "object" + }, + "service_type": { + "enum": [ + "full_service", + "non_fuel_transaction", + "self_service" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_specs", + "type": "object" + }, + "fuel": { + "description": "Information about fuel that was purchased with this transaction.", + "properties": { + "industry_product_code": { + "maxLength": 5000, + "type": "string" + }, + "quantity_decimal": { + "format": "decimal", + "type": "string" + }, + "type": { + "enum": [ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super" + ], + "maxLength": 5000, + "type": "string" + }, + "unit": { + "enum": [ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon" + ], + "maxLength": 5000, + "type": "string" + }, + "unit_cost_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fuel_specs", + "type": "object" + } + }, + "required": ["final_amount"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Finalize a test-mode authorization's amount" + } + }, + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond": { + "post": { + "description": "

Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.

", + "operationId": "PostTestHelpersIssuingAuthorizationsAuthorizationFraudChallengesRespond", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "confirmed": { + "description": "Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["confirmed"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Respond to fraud challenge" + } + }, + "/v1/test_helpers/issuing/authorizations/{authorization}/increment": { + "post": { + "description": "

Increment a test-mode Authorization.

", + "operationId": "PostTestHelpersIssuingAuthorizationsAuthorizationIncrement", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "increment_amount": { + "description": "The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "is_amount_controllable": { + "description": "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.", + "type": "boolean" + } + }, + "required": ["increment_amount"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Increment a test-mode authorization" + } + }, + "/v1/test_helpers/issuing/authorizations/{authorization}/reverse": { + "post": { + "description": "

Reverse a test-mode Authorization.

", + "operationId": "PostTestHelpersIssuingAuthorizationsAuthorizationReverse", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reverse_amount": { + "description": "The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Reverse a test-mode authorization" + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/deliver": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to delivered.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingDeliver", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Deliver a testmode card" + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/fail": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to failure.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingFail", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Fail a testmode card" + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/return": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to returned.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingReturn", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Return a testmode card" + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/ship": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to shipped.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingShip", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Ship a testmode card" + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/submit": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingSubmit", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Submit a testmode card" + } + }, + "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate": { + "post": { + "description": "

Updates the status of the specified testmode personalization design object to active.

", + "operationId": "PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate", + "parameters": [ + { + "in": "path", + "name": "personalization_design", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.personalization_design" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Activate a testmode personalization design" + } + }, + "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate": { + "post": { + "description": "

Updates the status of the specified testmode personalization design object to inactive.

", + "operationId": "PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate", + "parameters": [ + { + "in": "path", + "name": "personalization_design", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.personalization_design" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Deactivate a testmode personalization design" + } + }, + "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject": { + "post": { + "description": "

Updates the status of the specified testmode personalization design object to rejected.

", + "operationId": "PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject", + "parameters": [ + { + "in": "path", + "name": "personalization_design", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "rejection_reasons": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "rejection_reasons": { + "description": "The reason(s) the personalization design was rejected.", + "properties": { + "card_logo": { + "items": { + "enum": [ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material" + ], + "type": "string" + }, + "type": "array" + }, + "carrier_text": { + "items": { + "enum": [ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "rejection_reasons_param", + "type": "object" + } + }, + "required": ["rejection_reasons"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.personalization_design" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Reject a testmode personalization design" + } + }, + "/v1/test_helpers/issuing/settlements": { + "post": { + "description": "

Allows the user to create an Issuing settlement.

", + "operationId": "PostTestHelpersIssuingSettlements", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bin": { + "description": "The Bank Identification Number reflecting this settlement record.", + "maxLength": 5000, + "type": "string" + }, + "clearing_date": { + "description": "The date that the transactions are cleared and posted to user's accounts.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interchange_fees": { + "description": "The total interchange received as reimbursement for the transactions.", + "type": "integer" + }, + "net_total": { + "description": "The total net amount required to settle with the network.", + "type": "integer" + }, + "network_settlement_identifier": { + "description": "The Settlement Identification Number assigned by the network.", + "maxLength": 5000, + "type": "string" + }, + "transaction_count": { + "description": "The total number of transactions reflected in this settlement.", + "type": "integer" + }, + "transaction_volume": { + "description": "The total transaction amount reflected in this settlement.", + "type": "integer" + } + }, + "required": ["bin", "clearing_date", "currency", "net_total"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a test-mode settleemnt" + } + }, + "/v1/test_helpers/issuing/settlements/{settlement}/complete": { + "post": { + "description": "

Allows the user to mark an Issuing settlement as complete.

", + "operationId": "PostTestHelpersIssuingSettlementsSettlementComplete", + "parameters": [ + { + "description": "The settlement token to mark as complete.", + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Complete a test-mode settlement" + } + }, + "/v1/test_helpers/issuing/transactions/create_force_capture": { + "post": { + "description": "

Allows the user to capture an arbitrary amount, also known as a forced capture.

", + "operationId": "PostTestHelpersIssuingTransactionsCreateForceCapture", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "merchant_data": { + "explode": true, + "style": "deepObject" + }, + "purchase_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "card": { + "description": "Card associated with this transaction.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency of the capture. If not provided, defaults to the currency of the card. 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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "merchant_data": { + "description": "Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.", + "properties": { + "category": { + "enum": [ + "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_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" + ], + "maxLength": 5000, + "type": "string" + }, + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "network_id": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "terminal_id": { + "maxLength": 5000, + "type": "string" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "merchant_data_specs", + "type": "object" + }, + "purchase_details": { + "description": "Additional purchase information that is optionally provided by the merchant.", + "properties": { + "fleet": { + "properties": { + "cardholder_prompt_data": { + "properties": { + "driver_id": { + "maxLength": 5000, + "type": "string" + }, + "odometer": { + "type": "integer" + }, + "unspecified_id": { + "maxLength": 5000, + "type": "string" + }, + "user_id": { + "maxLength": 5000, + "type": "string" + }, + "vehicle_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_cardholder_prompt_data_specs", + "type": "object" + }, + "purchase_type": { + "enum": [ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase" + ], + "maxLength": 5000, + "type": "string" + }, + "reported_breakdown": { + "properties": { + "fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_fuel_specs", + "type": "object" + }, + "non_fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_non_fuel_specs", + "type": "object" + }, + "tax": { + "properties": { + "local_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "national_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_tax_specs", + "type": "object" + } + }, + "title": "fleet_reported_breakdown_specs", + "type": "object" + }, + "service_type": { + "enum": [ + "full_service", + "non_fuel_transaction", + "self_service" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_specs", + "type": "object" + }, + "flight": { + "properties": { + "departure_at": { + "format": "unix-time", + "type": "integer" + }, + "passenger_name": { + "maxLength": 5000, + "type": "string" + }, + "refundable": { + "type": "boolean" + }, + "segments": { + "items": { + "properties": { + "arrival_airport_code": { + "maxLength": 3, + "type": "string" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "departure_airport_code": { + "maxLength": 3, + "type": "string" + }, + "flight_number": { + "maxLength": 5000, + "type": "string" + }, + "service_class": { + "maxLength": 5000, + "type": "string" + }, + "stopover_allowed": { + "type": "boolean" + } + }, + "title": "flight_segment_specs", + "type": "object" + }, + "type": "array" + }, + "travel_agency": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "flight_specs", + "type": "object" + }, + "fuel": { + "properties": { + "industry_product_code": { + "maxLength": 5000, + "type": "string" + }, + "quantity_decimal": { + "format": "decimal", + "type": "string" + }, + "type": { + "enum": [ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super" + ], + "maxLength": 5000, + "type": "string" + }, + "unit": { + "enum": [ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon" + ], + "maxLength": 5000, + "type": "string" + }, + "unit_cost_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fuel_specs", + "type": "object" + }, + "lodging": { + "properties": { + "check_in_at": { + "format": "unix-time", + "type": "integer" + }, + "nights": { + "type": "integer" + } + }, + "title": "lodging_specs", + "type": "object" + }, + "receipt": { + "items": { + "properties": { + "description": { + "maxLength": 26, + "type": "string" + }, + "quantity": { + "format": "decimal", + "type": "string" + }, + "total": { + "type": "integer" + }, + "unit_cost": { + "type": "integer" + } + }, + "title": "receipt_specs", + "type": "object" + }, + "type": "array" + }, + "reference": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "purchase_details_specs", + "type": "object" + } + }, + "required": ["amount", "card"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a test-mode force capture" + } + }, + "/v1/test_helpers/issuing/transactions/create_unlinked_refund": { + "post": { + "description": "

Allows the user to refund an arbitrary amount, also known as a unlinked refund.

", + "operationId": "PostTestHelpersIssuingTransactionsCreateUnlinkedRefund", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "merchant_data": { + "explode": true, + "style": "deepObject" + }, + "purchase_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "card": { + "description": "Card associated with this unlinked refund transaction.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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).", + "format": "currency", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "merchant_data": { + "description": "Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.", + "properties": { + "category": { + "enum": [ + "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_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" + ], + "maxLength": 5000, + "type": "string" + }, + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "network_id": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "terminal_id": { + "maxLength": 5000, + "type": "string" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "merchant_data_specs", + "type": "object" + }, + "purchase_details": { + "description": "Additional purchase information that is optionally provided by the merchant.", + "properties": { + "fleet": { + "properties": { + "cardholder_prompt_data": { + "properties": { + "driver_id": { + "maxLength": 5000, + "type": "string" + }, + "odometer": { + "type": "integer" + }, + "unspecified_id": { + "maxLength": 5000, + "type": "string" + }, + "user_id": { + "maxLength": 5000, + "type": "string" + }, + "vehicle_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_cardholder_prompt_data_specs", + "type": "object" + }, + "purchase_type": { + "enum": [ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase" + ], + "maxLength": 5000, + "type": "string" + }, + "reported_breakdown": { + "properties": { + "fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_fuel_specs", + "type": "object" + }, + "non_fuel": { + "properties": { + "gross_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_non_fuel_specs", + "type": "object" + }, + "tax": { + "properties": { + "local_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "national_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fleet_reported_breakdown_tax_specs", + "type": "object" + } + }, + "title": "fleet_reported_breakdown_specs", + "type": "object" + }, + "service_type": { + "enum": [ + "full_service", + "non_fuel_transaction", + "self_service" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "fleet_specs", + "type": "object" + }, + "flight": { + "properties": { + "departure_at": { + "format": "unix-time", + "type": "integer" + }, + "passenger_name": { + "maxLength": 5000, + "type": "string" + }, + "refundable": { + "type": "boolean" + }, + "segments": { + "items": { + "properties": { + "arrival_airport_code": { + "maxLength": 3, + "type": "string" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "departure_airport_code": { + "maxLength": 3, + "type": "string" + }, + "flight_number": { + "maxLength": 5000, + "type": "string" + }, + "service_class": { + "maxLength": 5000, + "type": "string" + }, + "stopover_allowed": { + "type": "boolean" + } + }, + "title": "flight_segment_specs", + "type": "object" + }, + "type": "array" + }, + "travel_agency": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "flight_specs", + "type": "object" + }, + "fuel": { + "properties": { + "industry_product_code": { + "maxLength": 5000, + "type": "string" + }, + "quantity_decimal": { + "format": "decimal", + "type": "string" + }, + "type": { + "enum": [ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super" + ], + "maxLength": 5000, + "type": "string" + }, + "unit": { + "enum": [ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon" + ], + "maxLength": 5000, + "type": "string" + }, + "unit_cost_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "fuel_specs", + "type": "object" + }, + "lodging": { + "properties": { + "check_in_at": { + "format": "unix-time", + "type": "integer" + }, + "nights": { + "type": "integer" + } + }, + "title": "lodging_specs", + "type": "object" + }, + "receipt": { + "items": { + "properties": { + "description": { + "maxLength": 26, + "type": "string" + }, + "quantity": { + "format": "decimal", + "type": "string" + }, + "total": { + "type": "integer" + }, + "unit_cost": { + "type": "integer" + } + }, + "title": "receipt_specs", + "type": "object" + }, + "type": "array" + }, + "reference": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "purchase_details_specs", + "type": "object" + } + }, + "required": ["amount", "card"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a test-mode unlinked refund" + } + }, + "/v1/test_helpers/issuing/transactions/{transaction}/refund": { + "post": { + "description": "

Refund a test-mode Transaction.

", + "operationId": "PostTestHelpersIssuingTransactionsTransactionRefund", + "parameters": [ + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "refund_amount": { + "description": "The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Refund a test-mode transaction" + } + }, + "/v1/test_helpers/refunds/{refund}/expire": { + "post": { + "description": "

Expire a refund with a status of requires_action.

", + "operationId": "PostTestHelpersRefundsRefundExpire", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Expire a pending refund." + } + }, + "/v1/test_helpers/terminal/readers/{reader}/present_payment_method": { + "post": { + "description": "

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

", + "operationId": "PostTestHelpersTerminalReadersReaderPresentPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_present": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "interac_present": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_tip": { + "description": "Simulated on-reader tip amount.", + "type": "integer" + }, + "card_present": { + "description": "Simulated data for the card_present payment method.", + "properties": { + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "card_present", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interac_present": { + "description": "Simulated data for the interac_present payment method.", + "properties": { + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "interac_present", + "type": "object" + }, + "type": { + "description": "Simulated payment type.", + "enum": ["card_present", "interac_present"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Simulate presenting a payment method" + } + }, + "/v1/test_helpers/test_clocks": { + "get": { + "description": "

Returns a list of your test clocks.

", + "operationId": "GetTestHelpersTestClocks", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/test_helpers/test_clocks", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BillingClocksResourceBillingClockList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all test clocks" + }, + "post": { + "description": "

Creates a new test clock that can be attached to new customers and quotes.

", + "operationId": "PostTestHelpersTestClocks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "frozen_time": { + "description": "The initial frozen time for this test clock.", + "format": "unix-time", + "type": "integer" + }, + "name": { + "description": "The name for this test clock.", + "maxLength": 300, + "type": "string" + } + }, + "required": ["frozen_time"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a test clock" + } + }, + "/v1/test_helpers/test_clocks/{test_clock}": { + "delete": { + "description": "

Deletes a test clock.

", + "operationId": "DeleteTestHelpersTestClocksTestClock", + "parameters": [ + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a test clock" + }, + "get": { + "description": "

Retrieves a test clock.

", + "operationId": "GetTestHelpersTestClocksTestClock", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a test clock" + } + }, + "/v1/test_helpers/test_clocks/{test_clock}/advance": { + "post": { + "description": "

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

", + "operationId": "PostTestHelpersTestClocksTestClockAdvance", + "parameters": [ + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "frozen_time": { + "description": "The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["frozen_time"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Advance a test clock" + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/fail": { + "post": { + "description": "

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdFail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "failure_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "failure_details": { + "description": "Details about a failed InboundTransfer.", + "properties": { + "code": { + "enum": [ + "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" + ], + "type": "string" + } + }, + "title": "failure_details_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Fail an InboundTransfer" + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/return": { + "post": { + "description": "

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdReturn", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Return an InboundTransfer" + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed": { + "post": { + "description": "

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdSucceed", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Succeed an InboundTransfer" + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}": { + "post": { + "description": "

Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "tracking_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "tracking_details": { + "description": "Details about network-specific tracking information.", + "properties": { + "ach": { + "properties": { + "trace_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["trace_id"], + "title": "ach_tracking_details_params", + "type": "object" + }, + "type": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "us_domestic_wire": { + "properties": { + "chips": { + "maxLength": 5000, + "type": "string" + }, + "imad": { + "maxLength": 5000, + "type": "string" + }, + "omad": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_domestic_wire_tracking_details_params", + "type": "object" + } + }, + "required": ["type"], + "title": "tracking_details_params", + "type": "object" + } + }, + "required": ["tracking_details"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Update an OutboundPayment" + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/fail": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdFail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Fail an OutboundPayment" + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/post": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdPost", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Post an OutboundPayment" + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/return": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdReturn", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "returned_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "returned_details": { + "description": "Optional hash to set the return code.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "returned_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Return an OutboundPayment" + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}": { + "post": { + "description": "

Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransfer", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "tracking_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "tracking_details": { + "description": "Details about network-specific tracking information.", + "properties": { + "ach": { + "properties": { + "trace_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["trace_id"], + "title": "ach_tracking_details_params", + "type": "object" + }, + "type": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "us_domestic_wire": { + "properties": { + "chips": { + "maxLength": 5000, + "type": "string" + }, + "imad": { + "maxLength": 5000, + "type": "string" + }, + "omad": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_domestic_wire_tracking_details_params", + "type": "object" + } + }, + "required": ["type"], + "title": "tracking_details_params", + "type": "object" + } + }, + "required": ["tracking_details"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Update an OutboundTransfer" + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Fail an OutboundTransfer" + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Post an OutboundTransfer" + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "returned_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "returned_details": { + "description": "Details about a returned OutboundTransfer.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "returned_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Return an OutboundTransfer" + } + }, + "/v1/test_helpers/treasury/received_credits": { + "post": { + "description": "

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.

", + "operationId": "PostTestHelpersTreasuryReceivedCredits", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "initiating_payment_method_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to send funds to.", + "type": "string" + }, + "initiating_payment_method_details": { + "description": "Initiating payment method details for the object.", + "properties": { + "type": { + "enum": ["us_bank_account"], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_bank_account_source_params", + "type": "object" + } + }, + "required": ["type"], + "title": "source_params", + "type": "object" + }, + "network": { + "description": "Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "network" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_credit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Create a ReceivedCredit" + } + }, + "/v1/test_helpers/treasury/received_debits": { + "post": { + "description": "

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.

", + "operationId": "PostTestHelpersTreasuryReceivedDebits", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "initiating_payment_method_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "initiating_payment_method_details": { + "description": "Initiating payment method details for the object.", + "properties": { + "type": { + "enum": ["us_bank_account"], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_bank_account_source_params", + "type": "object" + } + }, + "required": ["type"], + "title": "source_params", + "type": "object" + }, + "network": { + "description": "Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.", + "enum": ["ach"], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "network" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_debit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Test mode: Create a ReceivedDebit" + } + }, + "/v1/tokens": { + "post": { + "description": "

Creates a single-use token that represents a bank account’s details.\nYou 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 where controller.requirement_collection is application, which includes Custom accounts.

", + "operationId": "PostTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account": { + "explode": true, + "style": "deepObject" + }, + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cvc_update": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "person": { + "explode": true, + "style": "deepObject" + }, + "pii": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "Information for the account this token represents.", + "properties": { + "business_type": { + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "company": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "directorship_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_directorship_declaration", + "type": "object" + }, + "executives_provided": { + "type": "boolean" + }, + "export_license_id": { + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "ownership_declaration_shown_and_signed": { + "type": "boolean" + }, + "ownership_exemption_reason": { + "enum": [ + "", + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution" + ], + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "connect_js_account_token_company_specs", + "type": "object" + }, + "individual": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "individual_relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "connect_js_account_token_specs", + "type": "object" + }, + "bank_account": { + "description": "The bank account this token will represent.", + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": ["company", "individual"], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "futsu", "savings", "toza"], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "format": "currency", + "type": "string" + }, + "payment_method": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_number", "country"], + "title": "token_create_bank_account", + "type": "object", + "x-stripeBypassValidation": true + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "networks": { + "properties": { + "preferred": { + "enum": [ + "cartes_bancaires", + "mastercard", + "visa" + ], + "type": "string" + } + }, + "title": "networks_param_specs", + "type": "object" + }, + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["exp_month", "exp_year", "number"], + "title": "credit_card_specs", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.", + "x-stripeBypassValidation": true + }, + "customer": { + "description": "Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).", + "maxLength": 5000, + "type": "string" + }, + "cvc_update": { + "description": "The updated CVC value this token represents.", + "properties": { + "cvc": { + "maxLength": 5000, + "type": "string" + } + }, + "required": ["cvc"], + "title": "cvc_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "person": { + "description": "Information for the person this token represents.", + "properties": { + "additional_tos_acceptances": { + "properties": { + "account": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "person_additional_tos_acceptances_specs", + "type": "object" + }, + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "legal_entity_and_kyc_address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "documents": { + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "anyOf": [ + { + "maxLength": 500, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "nationality": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": ["existing", "none"], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "properties": { + "authorizer": { + "type": "boolean" + }, + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "legal_guardian": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "person_token_specs", + "type": "object" + }, + "pii": { + "description": "The PII this token represents.", + "properties": { + "id_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "pii_token_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a CVC update token" + } + }, + "/v1/tokens/{token}": { + "get": { + "description": "

Retrieves the token with the given ID.

", + "operationId": "GetTokensToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a token" + } + }, + "/v1/topups": { + "get": { + "description": "

Returns a list of top-ups.

", + "operationId": "GetTopups", + "parameters": [ + { + "description": "A positive integer representing how much to transfer.", + "explode": true, + "in": "query", + "name": "amount", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["canceled", "failed", "pending", "succeeded"], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/topup" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/topups", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TopupList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all top-ups" + }, + "post": { + "description": "

Top up the balance of an account

", + "operationId": "PostTopups", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to transfer.", + "type": "integer" + }, + "currency": { + "description": "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).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "source": { + "description": "The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.", + "maxLength": 15, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this top-up as part of a group.", + "type": "string" + } + }, + "required": ["amount", "currency"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a top-up" + } + }, + "/v1/topups/{topup}": { + "get": { + "description": "

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.

", + "operationId": "GetTopupsTopup", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a top-up" + }, + "post": { + "description": "

Updates the metadata of a top-up. Other top-up details are not editable by design.

", + "operationId": "PostTopupsTopup", + "parameters": [ + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a top-up" + } + }, + "/v1/topups/{topup}/cancel": { + "post": { + "description": "

Cancels a top-up. Only pending top-ups can be canceled.

", + "operationId": "PostTopupsTopupCancel", + "parameters": [ + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel a top-up" + } + }, + "/v1/transfers": { + "get": { + "description": "

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.

", + "operationId": "GetTransfers", + "parameters": [ + { + "description": "Only return transfers that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transfers for the destination specified by this account ID.", + "in": "query", + "name": "destination", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transfers with the specified transfer group.", + "in": "query", + "name": "transfer_group", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/transfers", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TransferList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all transfers" + }, + "post": { + "description": "

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

", + "operationId": "PostTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents (or local equivalent) representing how much to transfer.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination": { + "description": "The ID of a connected Stripe account. See the Connect documentation for details.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source_transaction": { + "description": "You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.", + "type": "string" + }, + "source_type": { + "description": "The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.", + "enum": ["bank_account", "card", "fpx"], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "transfer_group": { + "description": "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.", + "type": "string" + } + }, + "required": ["currency", "destination"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a transfer" + } + }, + "/v1/transfers/{id}/reversals": { + "get": { + "description": "

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.

", + "operationId": "GetTransfersIdReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all reversals" + }, + "post": { + "description": "

When you create a new reversal, you must specify a transfer to create it on.

\n\n

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.

\n\n

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.

", + "operationId": "PostTransfersIdReversals", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a transfer reversal" + } + }, + "/v1/transfers/{transfer}": { + "get": { + "description": "

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.

", + "operationId": "GetTransfersTransfer", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a transfer" + }, + "post": { + "description": "

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

\n\n

This request accepts only metadata as an argument.

", + "operationId": "PostTransfersTransfer", + "parameters": [ + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a transfer" + } + }, + "/v1/transfers/{transfer}/reversals/{id}": { + "get": { + "description": "

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.

", + "operationId": "GetTransfersTransferReversalsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a reversal" + }, + "post": { + "description": "

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

\n\n

This request only accepts metadata and description as arguments.

", + "operationId": "PostTransfersTransferReversalsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a reversal" + } + }, + "/v1/treasury/credit_reversals": { + "get": { + "description": "

Returns a list of CreditReversals.

", + "operationId": "GetTreasuryCreditReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return CreditReversals for the ReceivedCredit ID.", + "in": "query", + "name": "received_credit", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return CreditReversals for a given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["canceled", "posted", "processing"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryReceivedCreditsResourceCreditReversalList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all CreditReversals" + }, + "post": { + "description": "

Reverses a ReceivedCredit and creates a CreditReversal object.

", + "operationId": "PostTreasuryCreditReversals", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "received_credit": { + "description": "The ReceivedCredit to reverse.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["received_credit"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.credit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a CreditReversal" + } + }, + "/v1/treasury/credit_reversals/{credit_reversal}": { + "get": { + "description": "

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

", + "operationId": "GetTreasuryCreditReversalsCreditReversal", + "parameters": [ + { + "in": "path", + "name": "credit_reversal", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.credit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a CreditReversal" + } + }, + "/v1/treasury/debit_reversals": { + "get": { + "description": "

Returns a list of DebitReversals.

", + "operationId": "GetTreasuryDebitReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for the ReceivedDebit ID.", + "in": "query", + "name": "received_debit", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for a given resolution.", + "in": "query", + "name": "resolution", + "required": false, + "schema": { + "enum": ["lost", "won"], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for a given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["canceled", "completed", "processing"], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.debit_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryReceivedDebitsResourceDebitReversalList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all DebitReversals" + }, + "post": { + "description": "

Reverses a ReceivedDebit and creates a DebitReversal object.

", + "operationId": "PostTreasuryDebitReversals", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "received_debit": { + "description": "The ReceivedDebit to reverse.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["received_debit"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.debit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a DebitReversal" + } + }, + "/v1/treasury/debit_reversals/{debit_reversal}": { + "get": { + "description": "

Retrieves a DebitReversal object.

", + "operationId": "GetTreasuryDebitReversalsDebitReversal", + "parameters": [ + { + "in": "path", + "name": "debit_reversal", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.debit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a DebitReversal" + } + }, + "/v1/treasury/financial_accounts": { + "get": { + "description": "

Returns a list of FinancialAccounts.

", + "operationId": "GetTreasuryFinancialAccounts", + "parameters": [ + { + "description": "Only return FinancialAccounts that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "An object ID cursor for use in pagination.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit ranging from 1 to 100 (defaults to 10).", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "An object ID cursor for use in pagination.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/treasury.financial_account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/financial_accounts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryFinancialAccountsResourceFinancialAccountList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all FinancialAccounts" + }, + "post": { + "description": "

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccounts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "nickname": { + "explode": true, + "style": "deepObject" + }, + "platform_restrictions": { + "explode": true, + "style": "deepObject" + }, + "supported_currencies": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.", + "properties": { + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "financial_addresses": { + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "aba_access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "title": "feature_access", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "nickname": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The nickname for the FinancialAccount." + }, + "platform_restrictions": { + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "properties": { + "inbound_flows": { + "enum": ["restricted", "unrestricted"], + "type": "string" + }, + "outbound_flows": { + "enum": ["restricted", "unrestricted"], + "type": "string" + } + }, + "title": "platform_restrictions", + "type": "object" + }, + "supported_currencies": { + "description": "The currencies the FinancialAccount can hold a balance in.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["supported_currencies"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a FinancialAccount" + } + }, + "/v1/treasury/financial_accounts/{financial_account}": { + "get": { + "description": "

Retrieves the details of a FinancialAccount.

", + "operationId": "GetTreasuryFinancialAccountsFinancialAccount", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a FinancialAccount" + }, + "post": { + "description": "

Updates the details of a FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccount", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "forwarding_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "nickname": { + "explode": true, + "style": "deepObject" + }, + "platform_restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.", + "properties": { + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "financial_addresses": { + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "aba_access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "title": "feature_access", + "type": "object" + }, + "forwarding_settings": { + "description": "A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0", + "properties": { + "financial_account": { + "type": "string" + }, + "payment_method": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["financial_account", "payment_method"], + "type": "string" + } + }, + "required": ["type"], + "title": "forwarding_settings", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "nickname": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "The nickname for the FinancialAccount." + }, + "platform_restrictions": { + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "properties": { + "inbound_flows": { + "enum": ["restricted", "unrestricted"], + "type": "string" + }, + "outbound_flows": { + "enum": ["restricted", "unrestricted"], + "type": "string" + } + }, + "title": "platform_restrictions", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a FinancialAccount" + } + }, + "/v1/treasury/financial_accounts/{financial_account}/close": { + "post": { + "description": "

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.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccountClose", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "forwarding_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "forwarding_settings": { + "description": "A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0", + "properties": { + "financial_account": { + "type": "string" + }, + "payment_method": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": ["financial_account", "payment_method"], + "type": "string" + } + }, + "required": ["type"], + "title": "forwarding_settings", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Close a FinancialAccount" + } + }, + "/v1/treasury/financial_accounts/{financial_account}/features": { + "get": { + "description": "

Retrieves Features information associated with the FinancialAccount.

", + "operationId": "GetTreasuryFinancialAccountsFinancialAccountFeatures", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account_features" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve FinancialAccount Features" + }, + "post": { + "description": "

Updates the Features associated with a FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccountFeatures", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_issuing": { + "explode": true, + "style": "deepObject" + }, + "deposit_insurance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "financial_addresses": { + "explode": true, + "style": "deepObject" + }, + "inbound_transfers": { + "explode": true, + "style": "deepObject" + }, + "intra_stripe_flows": { + "explode": true, + "style": "deepObject" + }, + "outbound_payments": { + "explode": true, + "style": "deepObject" + }, + "outbound_transfers": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_issuing": { + "description": "Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "description": "Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_addresses": { + "description": "Contains Features that add FinancialAddresses to the FinancialAccount.", + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "aba_access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "description": "Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "description": "Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "description": "Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "description": "Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": ["requested"], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account_features" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update FinancialAccount Features" + } + }, + "/v1/treasury/inbound_transfers": { + "get": { + "description": "

Returns a list of InboundTransfers sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryInboundTransfers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["canceled", "failed", "processing", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryInboundTransfersResourceInboundTransferList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all InboundTransfers" + }, + "post": { + "description": "

Creates an InboundTransfer.

", + "operationId": "PostTreasuryInboundTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to send funds to.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for the InboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "The complete description that appears on your customers' statements. Maximum 10 characters.", + "maxLength": 10, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "origin_payment_method" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an InboundTransfer" + } + }, + "/v1/treasury/inbound_transfers/{id}": { + "get": { + "description": "

Retrieves the details of an existing InboundTransfer.

", + "operationId": "GetTreasuryInboundTransfersId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an InboundTransfer" + } + }, + "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel": { + "post": { + "description": "

Cancels an InboundTransfer.

", + "operationId": "PostTreasuryInboundTransfersInboundTransferCancel", + "parameters": [ + { + "in": "path", + "name": "inbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel an InboundTransfer" + } + }, + "/v1/treasury/outbound_payments": { + "get": { + "description": "

Returns a list of OutboundPayments sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryOutboundPayments", + "parameters": [ + { + "description": "Only return OutboundPayments that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return OutboundPayments sent to this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/outbound_payments", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all OutboundPayments" + }, + "post": { + "description": "

Creates an OutboundPayment.

", + "operationId": "PostTreasuryOutboundPayments", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "destination_payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "destination_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "end_user_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "customer": { + "description": "ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method_data": { + "description": "Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.", + "properties": { + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + }, + "phone": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "financial_account": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": { + "enum": ["financial_account", "us_bank_account"], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": ["company", "individual"], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": ["checking", "savings"], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + } + }, + "required": ["type"], + "title": "payment_method_data", + "type": "object" + }, + "destination_payment_method_options": { + "description": "Payment method-specific configuration for this OutboundPayment.", + "properties": { + "us_bank_account": { + "anyOf": [ + { + "properties": { + "network": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "end_user_details": { + "description": "End user details.", + "properties": { + "ip_address": { + "type": "string" + }, + "present": { + "type": "boolean" + } + }, + "required": ["present"], + "title": "end_user_details_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is \"payment\".", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency", "financial_account"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an OutboundPayment" + } + }, + "/v1/treasury/outbound_payments/{id}": { + "get": { + "description": "

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

", + "operationId": "GetTreasuryOutboundPaymentsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an OutboundPayment" + } + }, + "/v1/treasury/outbound_payments/{id}/cancel": { + "post": { + "description": "

Cancel an OutboundPayment.

", + "operationId": "PostTreasuryOutboundPaymentsIdCancel", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel an OutboundPayment" + } + }, + "/v1/treasury/outbound_transfers": { + "get": { + "description": "

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryOutboundTransfers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryOutboundTransfersResourceOutboundTransferList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all OutboundTransfers" + }, + "post": { + "description": "

Creates an OutboundTransfer.

", + "operationId": "PostTreasuryOutboundTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "destination_payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "destination_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "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).", + "format": "currency", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod to use as the payment instrument for the OutboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method_data": { + "description": "Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.", + "properties": { + "financial_account": { + "type": "string" + }, + "type": { + "enum": ["financial_account"], + "type": "string" + } + }, + "required": ["type"], + "title": "payment_method_data", + "type": "object" + }, + "destination_payment_method_options": { + "description": "Hash describing payment method configuration details.", + "properties": { + "us_bank_account": { + "anyOf": [ + { + "properties": { + "network": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is \"transfer\".", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency", "financial_account"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create an OutboundTransfer" + } + }, + "/v1/treasury/outbound_transfers/{outbound_transfer}": { + "get": { + "description": "

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

", + "operationId": "GetTreasuryOutboundTransfersOutboundTransfer", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve an OutboundTransfer" + } + }, + "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel": { + "post": { + "description": "

An OutboundTransfer can be canceled if the funds have not yet been paid out.

", + "operationId": "PostTreasuryOutboundTransfersOutboundTransferCancel", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Cancel an OutboundTransfer" + } + }, + "/v1/treasury/received_credits": { + "get": { + "description": "

Returns a list of ReceivedCredits.

", + "operationId": "GetTreasuryReceivedCredits", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The FinancialAccount that received the funds.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return ReceivedCredits described by the flow.", + "explode": true, + "in": "query", + "name": "linked_flows", + "required": false, + "schema": { + "properties": { + "source_flow_type": { + "enum": [ + "credit_reversal", + "other", + "outbound_payment", + "outbound_transfer", + "payout" + ], + "type": "string" + } + }, + "required": ["source_flow_type"], + "title": "linked_flows_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return ReceivedCredits that have the given status: `succeeded` or `failed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["failed", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.received_credit" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryReceivedCreditsResourceReceivedCreditList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all ReceivedCredits" + } + }, + "/v1/treasury/received_credits/{id}": { + "get": { + "description": "

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

", + "operationId": "GetTreasuryReceivedCreditsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_credit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a ReceivedCredit" + } + }, + "/v1/treasury/received_debits": { + "get": { + "description": "

Returns a list of ReceivedDebits.

", + "operationId": "GetTreasuryReceivedDebits", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The FinancialAccount that funds were pulled from.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return ReceivedDebits that have the given status: `succeeded` or `failed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["failed", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.received_debit" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryReceivedDebitsResourceReceivedDebitList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all ReceivedDebits" + } + }, + "/v1/treasury/received_debits/{id}": { + "get": { + "description": "

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

", + "operationId": "GetTreasuryReceivedDebitsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_debit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a ReceivedDebit" + } + }, + "/v1/treasury/transaction_entries": { + "get": { + "description": "

Retrieves a list of TransactionEntry objects.

", + "operationId": "GetTreasuryTransactionEntries", + "parameters": [ + { + "description": "Only return TransactionEntries that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "effective_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.", + "in": "query", + "name": "order_by", + "required": false, + "schema": { + "enum": ["created", "effective_at"], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return TransactionEntries associated with this Transaction.", + "in": "query", + "name": "transaction", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all TransactionEntries" + } + }, + "/v1/treasury/transaction_entries/{id}": { + "get": { + "description": "

Retrieves a TransactionEntry object.

", + "operationId": "GetTreasuryTransactionEntriesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.transaction_entry" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a TransactionEntry" + } + }, + "/v1/treasury/transactions": { + "get": { + "description": "

Retrieves a list of Transaction objects.

", + "operationId": "GetTreasuryTransactions", + "parameters": [ + { + "description": "Only return Transactions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.", + "in": "query", + "name": "order_by", + "required": false, + "schema": { + "enum": ["created", "posted_at"], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return Transactions that have the given status: `open`, `posted`, or `void`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": ["open", "posted", "void"], + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.", + "explode": true, + "in": "query", + "name": "status_transitions", + "required": false, + "schema": { + "properties": { + "posted_at": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + } + }, + "title": "status_transition_timestamp_specs", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryTransactionsResourceTransactionList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all Transactions" + } + }, + "/v1/treasury/transactions/{id}": { + "get": { + "description": "

Retrieves the details of an existing Transaction.

", + "operationId": "GetTreasuryTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a Transaction" + } + }, + "/v1/webhook_endpoints": { + "get": { + "description": "

Returns a list of your webhook endpoints.

", + "operationId": "GetWebhookEndpoints", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/webhook_endpoint" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/webhook_endpoints", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "NotificationWebhookEndpointList", + "type": "object", + "x-expandableFields": ["data"] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "List all webhook endpoints" + }, + "post": { + "description": "

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 section of the Dashboard.

", + "operationId": "PostWebhookEndpoints", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "description": { + "explode": true, + "style": "deepObject" + }, + "enabled_events": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "api_version": { + "description": "Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.", + "enum": [ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15", + "2023-08-16", + "2023-10-16", + "2024-04-10", + "2024-06-20", + "2024-09-30.acacia", + "2024-10-28.acacia", + "2024-11-20.acacia", + "2024-12-18.acacia", + "2025-01-27.acacia", + "2025-02-24.acacia" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "connect": { + "description": "Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.", + "type": "boolean" + }, + "description": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "An optional description of what the webhook is used for." + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "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", + "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.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", + "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.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "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", + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "required": ["enabled_events", "url"], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Create a webhook endpoint" + } + }, + "/v1/webhook_endpoints/{webhook_endpoint}": { + "delete": { + "description": "

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

", + "operationId": "DeleteWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Delete a webhook endpoint" + }, + "get": { + "description": "

Retrieves the webhook endpoint with the given ID.

", + "operationId": "GetWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Retrieve a webhook endpoint" + }, + "post": { + "description": "

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

", + "operationId": "PostWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "description": { + "explode": true, + "style": "deepObject" + }, + "enabled_events": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "An optional description of what the webhook is used for." + }, + "disabled": { + "description": "Disable the webhook endpoint if set to true.", + "type": "boolean" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "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", + "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.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", + "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.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "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", + "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" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "summary": "Update a webhook endpoint" + } + } + }, + "security": [ + { + "basicAuth": [] + }, + { + "bearerAuth": [] + } + ], + "servers": [ + { + "url": "https://api.stripe.com/" + } + ] +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.0/tic-tac-toe.json b/packages/openapi-to-ts/fixtures/openapi/3.0/tic-tac-toe.json new file mode 100644 index 0000000..79f34cb --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.0/tic-tac-toe.json @@ -0,0 +1,261 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Tic Tac Toe", + "description": "This API allows writing down marks on a Tic Tac Toe board\nand requesting the state of the board or of individual squares.\n", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Gameplay" + } + ], + "paths": { + "/board": { + "get": { + "summary": "Get the whole board", + "description": "Retrieves the current state of the board and the winner.", + "tags": ["Gameplay"], + "operationId": "get-board", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + } + }, + "security": [ + { + "defaultApiKey": [] + }, + { + "app2AppOauth": ["board:read"] + } + ] + } + }, + "/board/{row}/{column}": { + "parameters": [ + { + "$ref": "#/components/parameters/rowParam" + }, + { + "$ref": "#/components/parameters/columnParam" + } + ], + "get": { + "summary": "Get a single board square", + "description": "Retrieves the requested square.", + "tags": ["Gameplay"], + "operationId": "get-square", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mark" + } + } + } + }, + "400": { + "description": "The provided parameters are incorrect", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/errorMessage" + }, + "example": "Illegal coordinates" + } + } + } + }, + "security": [ + { + "bearerHttpAuthentication": [] + }, + { + "user2AppOauth": ["board:read"] + } + ] + }, + "put": { + "summary": "Set a single board square", + "description": "Places a mark on the board and retrieves the whole board and the winner (if any).", + "tags": ["Gameplay"], + "operationId": "put-square", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mark" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + }, + "400": { + "description": "The provided parameters are incorrect", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/errorMessage" + }, + "examples": { + "illegalCoordinates": { + "value": "Illegal coordinates." + }, + "notEmpty": { + "value": "Square is not empty." + }, + "invalidMark": { + "value": "Invalid Mark (X or O)." + } + } + } + } + } + }, + "security": [ + { + "bearerHttpAuthentication": [] + }, + { + "user2AppOauth": ["board:write"] + } + ] + } + } + }, + "components": { + "parameters": { + "rowParam": { + "description": "Board row (vertical coordinate)", + "name": "row", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/coordinate" + } + }, + "columnParam": { + "description": "Board column (horizontal coordinate)", + "name": "column", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/coordinate" + } + } + }, + "schemas": { + "errorMessage": { + "type": "string", + "maxLength": 256, + "description": "A text message describing an error" + }, + "coordinate": { + "type": "integer", + "minimum": 1, + "maximum": 3, + "example": 1 + }, + "mark": { + "type": "string", + "enum": [".", "X", "O"], + "description": "Possible values for a board square. `.` means empty square.", + "example": "." + }, + "board": { + "type": "array", + "maxItems": 3, + "minItems": 3, + "items": { + "type": "array", + "maxItems": 3, + "minItems": 3, + "items": { + "$ref": "#/components/schemas/mark" + } + } + }, + "winner": { + "type": "string", + "enum": [".", "X", "O"], + "description": "Winner of the game. `.` means nobody has won yet.", + "example": "." + }, + "status": { + "type": "object", + "properties": { + "winner": { + "$ref": "#/components/schemas/winner" + }, + "board": { + "$ref": "#/components/schemas/board" + } + } + } + }, + "securitySchemes": { + "defaultApiKey": { + "description": "API key provided in console", + "type": "apiKey", + "name": "api-key", + "in": "header" + }, + "basicHttpAuthentication": { + "description": "Basic HTTP Authentication", + "type": "http", + "scheme": "Basic" + }, + "bearerHttpAuthentication": { + "description": "Bearer token using a JWT", + "type": "http", + "scheme": "Bearer", + "bearerFormat": "JWT" + }, + "app2AppOauth": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://learn.openapis.org/oauth/2.0/token", + "scopes": { + "board:read": "Read the board" + } + } + } + }, + "user2AppOauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://learn.openapis.org/oauth/2.0/auth", + "tokenUrl": "https://learn.openapis.org/oauth/2.0/token", + "scopes": { + "board:read": "Read the board", + "board:write": "Write to the board" + } + } + } + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.1/pet-store.json b/packages/openapi-to-ts/fixtures/openapi/3.1/pet-store.json new file mode 100644 index 0000000..6c24125 --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.1/pet-store.json @@ -0,0 +1,988 @@ +{ + "openapi": "3.1.0", + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version": "1.0.0", + "title": "Swagger Petstore", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "http://petstore.swagger.io/v2" + } + ], + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "tags": [ + { + "name": "pet", + "description": "Everything about your Pets", + "externalDocs": { + "description": "Find out more", + "url": "http://swagger.io" + } + }, + { + "name": "store", + "description": "Access to Petstore orders" + }, + { + "name": "user", + "description": "Operations about user", + "externalDocs": { + "description": "Find out more about our store", + "url": "http://swagger.io" + } + } + ], + "paths": { + "/pet": { + "post": { + "tags": ["pet"], + "summary": "Add a new pet to the store", + "description": "", + "operationId": "addPet", + "parameters": [], + "responses": { + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Pet" + } + }, + "put": { + "tags": ["pet"], + "summary": "Update an existing pet", + "description": "", + "operationId": "updatePet", + "parameters": [], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + }, + "405": { + "description": "Validation exception" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Pet" + } + } + }, + "/pet/findByStatus": { + "get": { + "tags": ["pet"], + "summary": "Finds Pets by status", + "description": "Multiple status values can be provided with comma separated strings", + "operationId": "findPetsByStatus", + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Status values that need to be considered for filter", + "required": true, + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": ["available", "pending", "sold"], + "default": "available" + } + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ] + } + }, + "/pet/findByTags": { + "get": { + "tags": ["pet"], + "summary": "Finds Pets by tags", + "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId": "findPetsByTags", + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "Tags to filter by", + "required": true, + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "400": { + "description": "Invalid tag value" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "deprecated": true + } + }, + "/pet/{petId}": { + "get": { + "tags": ["pet"], + "summary": "Find pet by ID", + "description": "Returns a single pet", + "operationId": "getPetById", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet to return", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + }, + "default": { + "description": "successful response" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["pet"], + "summary": "Updates a pet in the store with form data", + "description": "", + "operationId": "updatePetWithForm", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be updated", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the pet", + "type": "string" + }, + "status": { + "description": "Updated status of the pet", + "type": "string" + } + } + } + } + } + } + }, + "delete": { + "tags": ["pet"], + "summary": "Deletes a pet", + "description": "", + "operationId": "deletePet", + "parameters": [ + { + "name": "api_key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "petId", + "in": "path", + "description": "Pet id to delete", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ] + } + }, + "/pet/{petId}/uploadImage": { + "post": { + "tags": ["pet"], + "summary": "uploads an image", + "description": "", + "operationId": "uploadFile", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet to update", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + } + } + }, + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "/store/inventory": { + "get": { + "tags": ["store"], + "summary": "Returns pet inventories by status", + "description": "Returns a map of status codes to quantities", + "operationId": "getInventory", + "parameters": [], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/store/order": { + "post": { + "tags": ["store"], + "summary": "Place an order for a pet", + "description": "", + "operationId": "placeOrder", + "parameters": [], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Invalid Order" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + }, + "description": "order placed for purchasing the pet", + "required": true + } + } + }, + "/store/order/{orderId}": { + "get": { + "tags": ["store"], + "summary": "Find purchase order by ID", + "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", + "operationId": "getOrderById", + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "ID of pet that needs to be fetched", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 10 + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Order not found" + } + } + }, + "delete": { + "tags": ["store"], + "summary": "Delete purchase order by ID", + "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors", + "operationId": "deleteOrder", + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "ID of the order that needs to be deleted", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1 + } + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Order not found" + } + } + } + }, + "/user": { + "post": { + "tags": ["user"], + "summary": "Create user", + "description": "This can only be done by the logged in user.", + "operationId": "createUser", + "parameters": [], + "responses": { + "default": { + "description": "successful operation" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "Created user object", + "required": true + } + } + }, + "/user/createWithArray": { + "post": { + "tags": ["user"], + "summary": "Creates list of users with given input array", + "description": "", + "operationId": "createUsersWithArrayInput", + "parameters": [], + "responses": { + "default": { + "description": "successful operation" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/UserArray" + } + } + }, + "/user/createWithList": { + "post": { + "tags": ["user"], + "summary": "Creates list of users with given input array", + "description": "", + "operationId": "createUsersWithListInput", + "parameters": [], + "responses": { + "default": { + "description": "successful operation" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/UserArray" + } + } + }, + "/user/login": { + "get": { + "tags": ["user"], + "summary": "Logs user into the system", + "description": "", + "operationId": "loginUser", + "parameters": [ + { + "name": "username", + "in": "query", + "description": "The user name for login", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "The password for login in clear text", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Rate-Limit": { + "description": "calls per hour allowed by the user", + "schema": { + "type": "integer", + "format": "int32" + } + }, + "X-Expires-After": { + "description": "date in UTC when token expires", + "schema": { + "type": "string", + "format": "date-time" + } + } + }, + "content": { + "application/xml": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Invalid username/password supplied" + } + } + } + }, + "/user/logout": { + "get": { + "tags": ["user"], + "summary": "Logs out current logged in user session", + "description": "", + "operationId": "logoutUser", + "parameters": [], + "responses": { + "default": { + "description": "successful operation" + } + } + } + }, + "/user/{username}": { + "get": { + "tags": ["user"], + "summary": "Get user by user name", + "description": "", + "operationId": "getUserByName", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "The name that needs to be fetched. Use user1 for testing. ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Invalid username supplied" + }, + "404": { + "description": "User not found" + } + } + }, + "put": { + "tags": ["user"], + "summary": "Updated user", + "description": "This can only be done by the logged in user.", + "operationId": "updateUser", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "name that need to be updated", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Invalid user supplied" + }, + "404": { + "description": "User not found" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "Updated user object", + "required": true + } + }, + "delete": { + "tags": ["user"], + "summary": "Delete user", + "description": "This can only be done by the logged in user.", + "operationId": "deleteUser", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "The name that needs to be deleted", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Invalid username supplied" + }, + "404": { + "description": "User not found" + } + } + } + } + }, + "components": { + "schemas": { + "Order": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "petId": { + "type": "integer", + "format": "int64" + }, + "quantity": { + "type": "integer", + "format": "int32" + }, + "shipDate": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "description": "Order Status", + "enum": ["placed", "approved", "delivered"] + }, + "complete": { + "type": "boolean", + "default": false + } + }, + "xml": { + "name": "Order" + } + }, + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Category" + } + }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "password": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "userStatus": { + "type": "integer", + "format": "int32", + "description": "User Status" + } + }, + "xml": { + "name": "User" + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Tag" + } + }, + "Pet": { + "type": "object", + "required": ["name", "photoUrls"], + "properties": { + "id": { + "type": "integer", + "format": "int64", + "readOnly": true + }, + "category": { + "$ref": "#/components/schemas/Category" + }, + "name": { + "type": "string", + "example": "doggie" + }, + "photoUrls": { + "type": "array", + "xml": { + "name": "photoUrl", + "wrapped": true + }, + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "xml": { + "name": "tag", + "wrapped": true + }, + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "status": { + "type": "string", + "description": "pet status in the store", + "enum": ["available", "pending", "sold"] + } + }, + "xml": { + "name": "Pet" + } + }, + "ApiResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + }, + "requestBodies": { + "Pet": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "description": "Pet object that needs to be added to the store", + "required": true + }, + "UserArray": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "description": "List of user object", + "required": true + } + }, + "securitySchemes": { + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://petstore.swagger.io/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + }, + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + } + } + } +} diff --git a/packages/openapi-to-ts/fixtures/openapi/3.1/security.json b/packages/openapi-to-ts/fixtures/openapi/3.1/security.json new file mode 100644 index 0000000..e5fc59c --- /dev/null +++ b/packages/openapi-to-ts/fixtures/openapi/3.1/security.json @@ -0,0 +1,397 @@ +{ + "openapi": "3.1.0", + "info": { + "version": "1.0.0", + "title": "Support for different security types", + "description": "https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#securitySchemeObject" + }, + "servers": [ + { + "url": "https://httpbin.org" + } + ], + "tags": [ + { + "name": "API Key" + }, + { + "name": "HTTP" + }, + { + "name": "Mutual TLS" + }, + { + "name": "OAuth 2" + }, + { + "name": "OpenID Connect" + }, + { + "name": "Other" + } + ], + "paths": { + "/anything/apiKey": { + "get": { + "summary": "Query parameter", + "description": "`apiKey` auth will be supplied within an `apiKey` query parameter.", + "tags": ["API Key"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_query": [] + } + ] + }, + "post": { + "summary": "Cookie", + "description": "`apiKey` auth will be supplied within an `api_key` cookie.", + "tags": ["API Key"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_cookie": [] + } + ] + }, + "put": { + "summary": "Header", + "description": "`apiKey` auth will be supplied within an `X-API-KEY` header.", + "tags": ["API Key"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "apiKey_header": [] + } + ] + } + }, + "/anything/basic": { + "post": { + "summary": "Basic", + "description": "Authentication credentials will be supplied within a `Basic` `Authorization` header.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#basic-authentication-sample", + "tags": ["HTTP"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "basic": [] + } + ] + } + }, + "/anything/bearer": { + "post": { + "summary": "Bearer", + "description": "Authentication credentials will be supplied within a `Bearer` `Authorization` header.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#basic-authentication-sample", + "tags": ["HTTP"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "summary": "Bearer (`jwt` format)", + "description": "Authentication credentials will be supplied within a `Bearer` `Authorization` header, but its data should be controlled as a JWT.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#basic-authentication-sample\n\n> ℹ️We currently do not support any special handling for this so they're handled as a standard `Bearer` authentication token.", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "bearer_jwt": [] + } + ] + } + }, + "/anything/mutualTLS": { + "post": { + "summary": "`mutualTLS` auth", + "description": "🚧 This is not supported.", + "tags": ["Mutual TLS"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "mutualTLS": [] + } + ] + } + }, + "/anything/oauth2": { + "post": { + "summary": "General support (all flow types)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2": ["write:things"] + } + ] + }, + "get": { + "summary": "General support (authorizationCode flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_authorizationCode": ["write:things"] + } + ] + }, + "put": { + "summary": "General support (clientCredentials flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_clientCredentials": ["write:things"] + } + ] + }, + "patch": { + "summary": "General support (implicit flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_implicit": ["write:things"] + } + ] + }, + "delete": { + "summary": "General support (password flow type)", + "description": "> ℹ️\n> We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that.\n\nhttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23", + "tags": ["OAuth 2"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "oauth2_password": ["write:things"] + } + ] + } + }, + "/anything/openIdConnect": { + "post": { + "summary": "General support", + "description": "🚧 This is not supported.", + "tags": ["OpenID Connect"], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "openIdConnect": [] + } + ] + } + }, + "/anything/no-auth": { + "post": { + "summary": "No auth requirements", + "description": "This operation does not have any authentication requirements.", + "tags": ["Other"], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/status/401": { + "post": { + "summary": "Forced invalid authentication", + "description": "This endpoint requires an authentication header but making any request to it will forcefully return a 401 status code for invalid auth.", + "tags": ["Other"], + "responses": { + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "apiKey_header": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "apiKey_cookie": { + "type": "apiKey", + "in": "cookie", + "name": "api_key", + "description": "An API key that will be supplied in a named cookie. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object" + }, + "apiKey_header": { + "type": "apiKey", + "in": "header", + "name": "X-API-KEY", + "description": "An API key that will be supplied in a named header. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object" + }, + "apiKey_query": { + "type": "apiKey", + "in": "query", + "name": "apiKey", + "description": "An API key that will be supplied in a named query parameter. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object" + }, + "basic": { + "type": "http", + "scheme": "basic", + "description": "Basic auth that takes a base64'd combination of `user:password`. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#basic-authentication-sample" + }, + "bearer": { + "type": "http", + "scheme": "bearer", + "description": "A bearer token that will be supplied within an `Authentication` header as `bearer `. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#basic-authentication-sample" + }, + "bearer_jwt": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "A bearer token that will be supplied within an `Authentication` header as `bearer `. In this case, the format of the token is specified as JWT. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#jwt-bearer-sample" + }, + "mutualTLS": { + "type": "mutualTLS", + "description": "Requires a specific mutual TLS certificate to use when making a HTTP request. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23" + }, + "oauth2": { + "type": "oauth2", + "description": "An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23", + "flows": { + "authorizationCode": { + "authorizationUrl": "http://example.com/oauth/dialog", + "tokenUrl": "http://example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + }, + "clientCredentials": { + "tokenUrl": "http://example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + }, + "implicit": { + "authorizationUrl": "http://example.com/oauth/dialog", + "scopes": { + "write:things": "Add things to your account" + } + }, + "password": { + "tokenUrl": "http://example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_authorizationCode": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `authorizationCode` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauth-flows-object", + "flows": { + "authorizationCode": { + "authorizationUrl": "http://alt.example.com/oauth/dialog", + "tokenUrl": "http://alt.example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_clientCredentials": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `clientCredentials` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauth-flows-object", + "flows": { + "clientCredentials": { + "tokenUrl": "http://alt.example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_implicit": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `implicit` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauth-flows-object", + "flows": { + "implicit": { + "authorizationUrl": "http://alt.example.com/oauth/dialog", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "oauth2_password": { + "type": "oauth2", + "description": "An OAuth 2 security flow that only supports the `password` flow type. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauth-flows-object", + "flows": { + "password": { + "tokenUrl": "http://alt.example.com/oauth/token", + "scopes": { + "write:things": "Add things to your account" + } + } + } + }, + "openIdConnect": { + "type": "openIdConnect", + "openIdConnectUrl": "https://example.com/.well-known/openid-configuration", + "description": "OpenAPI authentication. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23" + } + } + } +} diff --git a/packages/openapi-to-ts/package.json b/packages/openapi-to-ts/package.json new file mode 100644 index 0000000..16607cb --- /dev/null +++ b/packages/openapi-to-ts/package.json @@ -0,0 +1,47 @@ +{ + "name": "@agentic/openapi-to-ts", + "version": "0.1.0", + "description": "Generate an Agentic TypeScript client from an OpenAPI spec.", + "author": "Travis Fischer ", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/transitive-bullshit/agentic.git" + }, + "type": "module", + "source": "./src/index.ts", + "types": "./dist/index.d.ts", + "sideEffects": false, + "bin": { + "openapi-to-ts": "./dist/openapi-to-ts.js" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "clean": "del dist", + "test": "run-s test:*", + "test:lint": "eslint .", + "test:typecheck": "tsc --noEmit" + }, + "dependencies": { + "@agentic/core": "workspace:*", + "@apidevtools/swagger-parser": "^10.1.1", + "camelcase": "^8.0.0", + "cleye": "catalog:", + "decamelize": "^6.0.0", + "execa": "^9.5.2", + "exit-hook": "catalog:", + "json-schema-to-zod": "^2.6.0", + "openapi-types": "^12.1.3", + "zod": "catalog:" + }, + "devDependencies": { + "@agentic/tsconfig": "workspace:*" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/openapi-to-ts/readme.md b/packages/openapi-to-ts/readme.md new file mode 100644 index 0000000..1371248 --- /dev/null +++ b/packages/openapi-to-ts/readme.md @@ -0,0 +1,55 @@ +

+ + Agentic + +

+ +

+ Generate an Agentic TypeScript client from an OpenAPI spec. +

+ +

+ Build Status + NPM + MIT License + Prettier Code Formatting +

+ +# Agentic + +**See the [github repo](https://github.com/transitive-bullshit/agentic) or [docs](https://agentic.so) for more info.** + +## Example Usage + +```sh +# local development +tsx bin/openapi-to-ts.ts fixtures/openapi/3.0/notion.json -o fixtures/generated + +# published version +npx @agentic/openapi-to-ts fixtures/openapi/3.0/notion.json -o fixtures/generated + +# npm install -g version +npm install -g @agentic/openapi-to-ts +openapi-to-ts fixtures/openapi/3.0/notion.json -o fixtures/generated +``` + +Most OpenAPI specs should be supported, but I've made no attempt to maximize robustness. This tool is meant to generate Agentic TS clients which are 99% of the way there, but some tweaking may be necessary post-generation. + +Some things you may want to tweak: + +- simplifying the zod parameters accepted by `@aiFunction` input schemas since LLMs tend to do better with a few, key parameters +- removing unused API endpoints & associated types that you don't want to expose to LLMs + +## TODO + +- convert openapi parsing & utils to https://github.com/readmeio/oas +- support filters + - // match only the schema named `foo` and `GET` operation for the `/api/v1/foo` path + - include: '^(#/components/schemas/foo|#/paths/api/v1/foo/get)$', +- [ ] Convert HTML in descriptions to markdown +- [ ] Properly format multiline function comments +- [ ] Debug stripe schema issue + +## License + +MIT © [Travis Fischer](https://x.com/transitive_bs) diff --git a/packages/openapi-to-ts/src/generate-ts-from-openapi.ts b/packages/openapi-to-ts/src/generate-ts-from-openapi.ts new file mode 100644 index 0000000..695738c --- /dev/null +++ b/packages/openapi-to-ts/src/generate-ts-from-openapi.ts @@ -0,0 +1,682 @@ +/* eslint-disable no-template-curly-in-string */ +import * as fs from 'node:fs/promises' +import path from 'node:path' + +import type { IJsonSchema, OpenAPIV3 } from 'openapi-types' +import { assert } from '@agentic/core' +import SwaggerParser from '@apidevtools/swagger-parser' +import decamelize from 'decamelize' +import { execa } from 'execa' + +import { convertParametersToJSONSchema } from './openapi-parameters-to-json-schema' +import { + camelCase, + dereference, + dereferenceFull, + getAndResolve, + getComponentDisplayName, + getDescription, + getOperationParamsName, + getOperationResponseName, + jsonSchemaToZod, + naiveMergeJSONSchemas, + pascalCase, + prettify +} from './utils' + +const jsonContentType = 'application/json' +const multipartFormData = 'multipart/form-data' + +const httpMethods = [ + 'get', + 'post', + 'put', + 'delete', + 'options', + 'head', + 'patch', + 'trace' +] as const + +export type GenerateTSFromOpenAPIOptions = { + openapiFilePath: string + outputDir: string + dryRun?: boolean + prettier?: boolean + eslint?: boolean +} + +export async function generateTSFromOpenAPI({ + openapiFilePath, + outputDir, + dryRun = false, + prettier = true, + eslint = true +}: GenerateTSFromOpenAPIOptions): Promise { + const parser = new SwaggerParser() + const spec = (await parser.bundle(openapiFilePath)) as OpenAPIV3.Document + // | OpenAPIV3_1.Document + + if ( + // TODO: make this less brittle + spec.openapi !== '3.0.0' && + spec.openapi !== '3.1.0' && + spec.openapi !== '3.1.1' && + spec.openapi.split('.')[0] !== '3' + ) { + throw new Error(`Unexpected OpenAPI version "${spec.openapi}"`) + } + + const openapiSpecName = path.basename(openapiFilePath, '.json') + assert( + openapiSpecName.toLowerCase() === openapiSpecName, + `OpenAPI spec name "${openapiSpecName}" must be in kebab case` + ) + const name = pascalCase(openapiSpecName) + const nameLowerCase = name.toLowerCase() + const nameSnakeCase = decamelize(name) + const nameKebabCase = decamelize(name, { separator: '-' }) + const nameUpperCase = nameSnakeCase.toUpperCase() + const clientName = `${name}Client` + const namespaceName = nameLowerCase + + const destFileClient = path.join(outputDir, `${nameKebabCase}-client.ts`) + const apiBaseUrl = spec.servers?.[0]?.url + + const securitySchemes = spec.components?.securitySchemes + const resolvedSecuritySchemes: Record< + string, + OpenAPIV3.SecuritySchemeObject + > = {} + const apiKeyHeaderNames: string[] = [] + + if (securitySchemes) { + for (const [securitySchemaName, maybeSecuritySchema] of Object.entries( + securitySchemes + )) { + const securitySchema = dereferenceFull(maybeSecuritySchema, parser.$refs) + if (!securitySchema) continue + + resolvedSecuritySchemes[securitySchemaName] = securitySchema + + switch (securitySchema.type) { + case 'apiKey': + apiKeyHeaderNames.push(securitySchemaName) + break + + case 'http': + if (securitySchema.scheme === 'bearer') { + apiKeyHeaderNames.push(securitySchemaName) + } + break + + case 'oauth2': + apiKeyHeaderNames.push(securitySchemaName) + break + + default: + console.log( + 'unsupported security schema', + securitySchemaName, + securitySchema + ) + } + } + } + + const hasGlobalApiKeyInHeader = apiKeyHeaderNames.length === 1 + const componentsToProcess = new Set() + + const requestBodyJSONSchemaPaths = [ + 'requestBody', + 'content', + jsonContentType, + 'schema' + ] + + const requestBodyFormDataJSONSchemaPaths = [ + 'requestBody', + 'content', + multipartFormData, + 'schema' + ] + + const operationResponsePaths = [ + ['responses', '200', 'content', jsonContentType, 'schema'], + ['responses', '201', 'content', jsonContentType, 'schema'] + // ['responses', 'default', 'content', jsonContentType, 'schema'] + ] + + const operationRequestPaths = [ + requestBodyJSONSchemaPaths, + requestBodyFormDataJSONSchemaPaths + ] + + const operationNames = new Set() + const operationSchemas: Record = {} + const componentSchemas: Record = {} + const aiClientMethods: string[] = [] + + for (const path in spec.paths) { + const pathItem = spec.paths[path] + assert(pathItem) + // console.log(JSON.stringify(pathItem, null, 2)) + + for (const method of httpMethods) { + const operation = pathItem[method] + if (!operation) { + continue + } + + if (method === 'trace' || method === 'options') { + continue + } + + const operationId = + operation.operationId || `${method}${path.replaceAll(/\W+/g, '_')}` + assert( + operationId, + `Invalid operation id ${operationId} for path "${method} ${path}"` + ) + + const operationName = camelCase(operationId) + assert( + !operationNames.has(operationName), + `Duplicate operation name "${operationName}"` + ) + operationNames.add(operationName) + const operationNameSnakeCase = decamelize(operationName) + + // if (path !== '/comments' || method !== 'post') continue + // if (path !== '/crawl/status/{jobId}') continue + // if (path !== '/pets' || method !== 'post') continue + // console.log(method, path, operationName) + + const operationParamsJSONSchema = { + type: 'object', + properties: {} as Record, + required: [] as string[], + $refs: [] as string[] + } + + const operationResponseJSONSchemas: Record = {} + + const operationParamsSources: Record = {} + let operationParamsUnionSource: string | undefined + + // eslint-disable-next-line unicorn/consistent-function-scoping + function addJSONSchemaParams(schema: IJsonSchema, source: string) { + dereferenceFull(schema, parser.$refs, componentsToProcess) + + if (schema.$ref) { + operationParamsJSONSchema.$refs.push(schema.$ref) + + const derefed = dereference(schema, parser.$refs, componentsToProcess) + if (derefed?.properties) { + for (const key of Object.keys(derefed.properties)) { + assert( + !operationParamsSources[key], + `Duplicate params key ${key} for operation ${operationName} from ${operationParamsSources[key]} and ${source}` + ) + operationParamsSources[key] = source + } + } else if (derefed?.anyOf || derefed?.oneOf) { + const componentName = getComponentDisplayName(schema.$ref) + operationParamsSources[componentName] = source + + // TODO: handle this case + assert( + !operationParamsUnionSource, + `Duplicate union source ${source} for operation ${operationName}` + ) + operationParamsUnionSource = source + } + } else { + assert(schema.type === 'object') + + if (schema.properties) { + operationParamsJSONSchema.properties = { + ...operationParamsJSONSchema.properties, + ...schema.properties + } + + for (const key of Object.keys(schema.properties)) { + assert( + !operationParamsSources[key], + `Duplicate params key ${key} for operation ${operationName} from ${operationParamsSources[key]} and ${source}` + ) + operationParamsSources[key] = source + } + } + + if (schema.required) { + operationParamsJSONSchema.required = [ + ...operationParamsJSONSchema.required, + ...schema.required + ] + } + + if (schema?.anyOf || schema?.oneOf) { + operationParamsSources[schema.title || '__union__'] = source + + // TODO: handle this case + assert( + !operationParamsUnionSource, + `Duplicate union source ${source} for operation ${operationName}` + ) + operationParamsUnionSource = source + } + } + } + + // eslint-disable-next-line unicorn/consistent-function-scoping + function addJSONSchemaResponse(schema: IJsonSchema, status: string) { + dereferenceFull(schema, parser.$refs, componentsToProcess) + operationResponseJSONSchemas[status] = schema + } + + for (const schemaPath of operationRequestPaths) { + const res = getAndResolve( + operation, + schemaPath, + parser.$refs, + componentsToProcess + ) + + if (res) { + addJSONSchemaParams( + res, + schemaPath[2] === jsonContentType ? 'body' : 'formData' + ) + break + } + } + + for (const schemaPath of operationResponsePaths) { + const res = getAndResolve( + operation, + schemaPath, + parser.$refs, + componentsToProcess + ) + + if (res) { + const status = schemaPath[1]! + assert( + status, + `Invalid status ${status} for operation ${operationName}` + ) + + addJSONSchemaResponse(res, status) + break + } + } + + if (operation.parameters) { + const params = convertParametersToJSONSchema(operation.parameters) + + if (params.body) { + addJSONSchemaParams(params.body, 'body') + } + + if (params.formData) { + addJSONSchemaParams(params.formData, 'formData') + } + + if (params.headers) { + addJSONSchemaParams(params.headers, 'formData') + } + + if (params.path) { + addJSONSchemaParams(params.path, 'path') + } + + if (params.query) { + addJSONSchemaParams(params.query, 'query') + } + } + + const operationParamsName = getOperationParamsName( + operationName, + componentSchemas + ) + const operationResponseName = getOperationResponseName(operationName) + let derefedParams: any = dereference( + operationParamsJSONSchema, + parser.$refs + ) + for (const ref of derefedParams.$refs) { + const temp: any = dereference({ $ref: ref }, parser.$refs) + if (temp) { + derefedParams = naiveMergeJSONSchemas(derefedParams, temp) + } + } + // console.log(JSON.stringify(derefedParams, null, 2)) + const hasUnionParams = !!(derefedParams.anyOf || derefedParams.oneOf) + const hasParams = + Object.keys(derefedParams.properties ?? {}).length > 0 || hasUnionParams + + assert( + hasUnionParams === !!operationParamsUnionSource, + 'Unexpected union params' + ) + + // TODO: handle empty params case + + { + // Merge all operations params into one schema declaration + // TODO: Don't generate this if it's only refs. We're currently handling + // this in a hacky way by removing the `z.object({}).merge(...)` down + // below. + let operationsParamsSchema = jsonSchemaToZod( + operationParamsJSONSchema, + { name: `${operationParamsName}Schema`, type: operationParamsName } + ) + + if (operationParamsJSONSchema.$refs.length) { + const refSchemas = operationParamsJSONSchema.$refs.map( + (ref) => `${getComponentDisplayName(ref)!}Schema` + ) + + operationsParamsSchema = operationsParamsSchema.replace( + // eslint-disable-next-line security/detect-non-literal-regexp + new RegExp(`(${operationParamsName}Schema = .*)$`, 'm'), + // eslint-disable-next-line unicorn/no-array-reduce + refSchemas.reduce( + (acc, refSchema) => `${acc}.merge(${refSchema})`, + '$1' + ) + ) + } + + assert( + !componentSchemas[operationParamsName], + `Operation params name "${operationParamsName}" conflicts with component name` + ) + operationSchemas[operationParamsName] = operationsParamsSchema + } + + const operationResponseJSONSchema = operationResponseJSONSchemas['200'] + if (operationResponseJSONSchema) { + let isDuplicateDefinition = false + + if (operationResponseJSONSchema.$ref) { + const componentName = getComponentDisplayName( + operationResponseJSONSchema.$ref + ) + if (componentName === operationResponseName) { + isDuplicateDefinition = true + } + } + + if (!isDuplicateDefinition) { + const operationResponseSchema = jsonSchemaToZod( + operationResponseJSONSchema, + { + name: `${operationResponseName}Schema`, + type: operationResponseName + } + ) + + assert( + !componentSchemas[operationResponseName], + `Operation response name "${operationResponseName}" conflicts with component name` + ) + operationSchemas[operationResponseName] = operationResponseSchema + } + } else { + assert( + !componentSchemas[operationResponseName], + `Operation response name "${operationResponseName}" conflicts with component name` + ) + operationSchemas[operationResponseName] = + `export type ${operationResponseName} = undefined\n` + } + + // console.log( + // JSON.stringify( + // { + // operationName, + // operationParamsSources, + // operationParamsJSONSchema + // }, + // null, + // 2 + // ) + // ) + + const queryParams = Object.keys(operationParamsSources).filter( + (key) => operationParamsSources[key] === 'query' + ) + const hasQueryParams = queryParams.length > 0 + + const bodyParams = Object.keys(operationParamsSources).filter( + (key) => operationParamsSources[key] === 'body' + ) + const hasBodyParams = bodyParams.length > 0 + + const formDataParams = Object.keys(operationParamsSources).filter( + (key) => operationParamsSources[key] === 'formData' + ) + const hasFormDataParams = formDataParams.length > 0 + + const pathParams = Object.keys(operationParamsSources).filter( + (key) => operationParamsSources[key] === 'path' + ) + const hasPathParams = pathParams.length > 0 + + const headersParams = Object.keys(operationParamsSources).filter( + (key) => operationParamsSources[key] === 'headers' + ) + const hasHeadersParams = headersParams.length > 0 + + const onlyHasOneParamsSource = + new Set(Object.values(operationParamsSources)).size === 1 + const onlyHasPathParams = hasPathParams && onlyHasOneParamsSource + + const pathTemplate = hasPathParams + ? '`' + path.replaceAll(/{([^}]+)}/g, '${params["$1"]}') + '`' + : `'${path}'` + + const description = getDescription( + operation.description || operation.summary + ) + const isDescriptionMultiline = description?.includes('\n') + + const aiClientMethod = ` + ${description ? `/**\n * ${description}\n */` : ''} + @aiFunction({ + name: '${operationNameSnakeCase}', + ${description ? `description: ${isDescriptionMultiline ? `\`${description.replaceAll('`', '\\`')}\`` : `'${description}'`},` : ''}${hasUnionParams ? '\n// TODO: Improve handling of union params' : ''} + inputSchema: ${namespaceName}.${operationParamsName}Schema${hasUnionParams ? ' as any' : ''}, + }) + async ${operationName}(${!hasParams ? '_' : ''}params: ${namespaceName}.${operationParamsName}): Promise<${namespaceName}.${operationResponseName}> { + return this.ky.${method}(${pathTemplate}${ + !hasParams || onlyHasPathParams + ? '' + : `, { + ${hasQueryParams ? (onlyHasOneParamsSource || hasUnionParams ? `searchParams: sanitizeSearchParams(params),` : `searchParams: sanitizeSearchParams(pick(params, '${queryParams.join("', '")}')),`) : ''} + ${hasBodyParams ? (onlyHasOneParamsSource || hasUnionParams ? `json: params,` : `json: pick(params, '${bodyParams.join("', '")}'),`) : ''} + ${hasFormDataParams ? (onlyHasOneParamsSource || hasUnionParams ? `form: params,` : `form: pick(params, '${formDataParams.join("', '")}'),`) : ''} + ${hasHeadersParams ? (onlyHasOneParamsSource || hasUnionParams ? `headers: params,` : `headers: pick(params, '${headersParams.join("', '")}'),`) : ''} + }` + }).json<${namespaceName}.${operationResponseName}>() + } + ` + + aiClientMethods.push(aiClientMethod) + } + } + + const processedComponents = new Set() + const componentToRefs: Record< + string, + { dereferenced: any; refs: Set } + > = {} + + for (const ref of componentsToProcess) { + const component = { $ref: ref } + + const resolved = new Set() + const dereferenced = dereference(component, parser.$refs) + dereferenceFull(component, parser.$refs, resolved) + assert(dereferenced) + + for (const ref of resolved) { + assert(componentsToProcess.has(ref)) + } + + componentToRefs[ref] = { dereferenced, refs: resolved } + } + + const sortedComponents = Object.keys(componentToRefs).sort( + (a, b) => componentToRefs[a]!.refs.size - componentToRefs[b]!.refs.size + ) + + for (const ref of sortedComponents) { + const type = getComponentDisplayName(ref) + assert(type, `Invalid ref name ${ref}`) + + const name = `${type}Schema` + + const { dereferenced } = componentToRefs[ref]! + if (processedComponents.has(ref)) { + continue + } + + processedComponents.add(ref) + + const schema = jsonSchemaToZod(dereferenced, { name, type }) + componentSchemas[type] = schema + } + + // console.log( + // '\ncomponents', + // JSON.stringify( + // sortedComponents.map((ref) => getComponentName(ref)), + // null, + // 2 + // ) + // ) + + // console.log( + // '\nmodels', + // Object.fromEntries( + // await Promise.all( + // Object.entries(schemaInput).map(async ([key, value]) => { + // return [key, await prettify(value)] + // }) + // ) + // ) + // ) + + const aiClientMethodsString = aiClientMethods.join('\n\n') + + const header = ` +/* eslint-disable unicorn/no-unreadable-iife */ +/* eslint-disable unicorn/no-array-reduce */ + +/** + * This file was auto-generated from an OpenAPI spec. + */ + +import { + AIFunctionsProvider, + ${aiClientMethods.length > 0 ? 'aiFunction,' : ''} + ${hasGlobalApiKeyInHeader ? 'assert,' : ''} + ${hasGlobalApiKeyInHeader ? 'getEnv,' : ''} + ${aiClientMethodsString.includes('pick(') ? 'pick,' : ''} + ${aiClientMethodsString.includes('sanitizeSearchParams(') ? 'sanitizeSearchParams,' : ''} +} from '@agentic/core' +import defaultKy, { type KyInstance } from 'ky' +import { z } from 'zod'`.trim() + + const commentLine = `// ${'-'.repeat(77)}` + const outputTypes = [ + header, + `export namespace ${namespaceName} {`, + apiBaseUrl ? `export const apiBaseUrl = '${apiBaseUrl}'` : undefined, + Object.values(componentSchemas).length + ? `${commentLine}\n// Component schemas\n${commentLine}` + : undefined, + ...Object.values(componentSchemas), + Object.values(operationSchemas).length + ? `${commentLine}\n// Operation schemas\n${commentLine}` + : undefined, + ...Object.values(operationSchemas), + '}' + ] + .filter(Boolean) + .join('\n\n') + + const description = getDescription(spec.info?.description) + const prettifyImpl = prettier ? prettify : (code: string) => code + + const output = ( + await prettifyImpl( + [ + outputTypes, + ` +/** + * Agentic ${name} client.${description ? `\n *\n * ${description}` : ''} + */ +export class ${clientName} extends AIFunctionsProvider { + protected readonly ky: KyInstance + ${hasGlobalApiKeyInHeader ? 'protected readonly apiKey: string' : ''} + protected readonly apiBaseUrl: string + + constructor({ + ${hasGlobalApiKeyInHeader ? `apiKey = getEnv('${nameUpperCase}_API_KEY'),` : ''} + apiBaseUrl${apiBaseUrl ? ` = ${namespaceName}.apiBaseUrl` : ''}, + ky = defaultKy + }: { + apiKey?: string + apiBaseUrl?: string + ky?: KyInstance + } = {}) { + ${ + hasGlobalApiKeyInHeader + ? `assert( + apiKey, + '${clientName} missing required "apiKey" (defaults to "${nameUpperCase}_API_KEY")' + )` + : '' + } + super() + + ${hasGlobalApiKeyInHeader ? `this.apiKey = apiKey` : ''} + this.apiBaseUrl = apiBaseUrl + + this.ky = ky.extend({ + prefixUrl: apiBaseUrl, + ${ + hasGlobalApiKeyInHeader + ? `headers: { + ${apiKeyHeaderNames.map((name) => `'${(resolvedSecuritySchemes[name] as any).name || 'Authorization'}': ${(resolvedSecuritySchemes[name] as any).schema?.toLowerCase() === 'bearer' || resolvedSecuritySchemes[name]?.type?.toLowerCase() === 'oauth2' ? '`Bearer ${apiKey}`' : 'apiKey'}`).join(',\n')} + },` + : '' + } + }) + } +`, + aiClientMethodsString, + '}' + ].join('\n\n') + ) + ) + .replaceAll(/z\s*\.object\({}\)\s*\.merge\(([^)]*)\)/gm, '$1') + .replaceAll(/\/\*\*(\S.*\S)\*\//g, '/** $1 */') + + if (dryRun) { + return output + } + + await fs.mkdir(outputDir, { recursive: true }) + await fs.writeFile(destFileClient, output) + + if (eslint) { + await execa('npx', ['eslint', '--fix', '--no-ignore', destFileClient]) + } + + return output +} diff --git a/packages/openapi-to-ts/src/index.ts b/packages/openapi-to-ts/src/index.ts new file mode 100644 index 0000000..6ae7d18 --- /dev/null +++ b/packages/openapi-to-ts/src/index.ts @@ -0,0 +1 @@ +export * from './generate-ts-from-openapi' diff --git a/packages/openapi-to-ts/src/openapi-parameters-to-json-schema.ts b/packages/openapi-to-ts/src/openapi-parameters-to-json-schema.ts new file mode 100644 index 0000000..4cc59a0 --- /dev/null +++ b/packages/openapi-to-ts/src/openapi-parameters-to-json-schema.ts @@ -0,0 +1,223 @@ +/** + * This file is forked from: https://github.com/kogosoftwarellc/open-api/tree/main/packages/openapi-jsonschema-parameters + * + * Several fixes have been applied. + * + * The original code is licensed under the MIT license. + */ + +import { type IJsonSchema, type OpenAPI } from 'openapi-types' + +export interface OpenAPIParametersAsJSONSchema { + body?: IJsonSchema + formData?: IJsonSchema + headers?: IJsonSchema + path?: IJsonSchema + query?: IJsonSchema + cookie?: IJsonSchema +} + +const VALIDATION_KEYWORDS = new Set([ + 'additionalItems', + 'default', + 'example', + 'description', + 'enum', + 'examples', + 'exclusiveMaximum', + 'exclusiveMinimum', + 'format', + 'items', + 'maxItems', + 'maxLength', + 'maximum', + 'minItems', + 'minLength', + 'minimum', + 'multipleOf', + 'pattern', + 'title', + 'type', + 'uniqueItems' +]) + +const SUBSCHEMA_KEYWORDS = [ + 'additionalItems', + 'items', + 'contains', + 'additionalProperties', + 'propertyNames', + 'not' +] + +const SUBSCHEMA_ARRAY_KEYWORDS = ['items', 'allOf', 'anyOf', 'oneOf'] + +const SUBSCHEMA_OBJECT_KEYWORDS = [ + 'definitions', + 'properties', + 'patternProperties', + 'dependencies' +] + +export function convertParametersToJSONSchema( + parameters: OpenAPI.Parameters +): OpenAPIParametersAsJSONSchema { + const parametersSchema: OpenAPIParametersAsJSONSchema = {} + const bodySchema = getBodySchema(parameters) + const formDataSchema = getSchema(parameters, 'formData') + const headerSchema = getSchema(parameters, 'header') + const pathSchema = getSchema(parameters, 'path') + const querySchema = getSchema(parameters, 'query') + const cookieSchema = getSchema(parameters, 'cookie') + + if (bodySchema) { + parametersSchema.body = bodySchema + } + + if (formDataSchema) { + parametersSchema.formData = formDataSchema + } + + if (headerSchema) { + parametersSchema.headers = headerSchema + } + + if (pathSchema) { + parametersSchema.path = pathSchema + } + + if (querySchema) { + parametersSchema.query = querySchema + } + + if (cookieSchema) { + parametersSchema.cookie = cookieSchema + } + + return parametersSchema +} + +function copyValidationKeywords(src: any) { + const dst: any = {} + for (let i = 0, keys = Object.keys(src), len = keys.length; i < len; i++) { + const keyword = keys[i] + if (!keyword) continue + + if (VALIDATION_KEYWORDS.has(keyword) || keyword.slice(0, 2) === 'x-') { + dst[keyword] = src[keyword] + } + } + return dst +} + +function handleNullable(schema: IJsonSchema) { + return { anyOf: [schema, { type: 'null' }] } +} + +function handleNullableSchema(schema: any) { + if (typeof schema !== 'object' || schema === null) { + return schema + } + + const newSchema = { ...schema } + + for (const keyword of SUBSCHEMA_KEYWORDS) { + if ( + typeof schema[keyword] === 'object' && + schema[keyword] !== null && + !Array.isArray(schema[keyword]) + ) { + newSchema[keyword] = handleNullableSchema(schema[keyword]) + } + } + + for (const keyword of SUBSCHEMA_ARRAY_KEYWORDS) { + if (Array.isArray(schema[keyword])) { + newSchema[keyword] = schema[keyword].map(handleNullableSchema) + } + } + + for (const keyword of SUBSCHEMA_OBJECT_KEYWORDS) { + if (typeof schema[keyword] === 'object' && schema[keyword] !== null) { + newSchema[keyword] = { ...schema[keyword] } + for (const prop of Object.keys(schema[keyword])) { + newSchema[keyword][prop] = handleNullableSchema(schema[keyword][prop]) + } + } + } + + delete newSchema.$ref + + if (schema.nullable) { + delete newSchema.nullable + return handleNullable(newSchema) + } + return newSchema +} + +function getBodySchema(parameters: any[]) { + let bodySchema = parameters.find((param) => { + return param.in === 'body' && param.schema + }) + + if (bodySchema) { + bodySchema = bodySchema.schema + } + + return bodySchema +} + +function getSchema(parameters: any[], type: string) { + const params = parameters.filter(byIn(type)) + let schema: any + + if (params.length) { + schema = { type: 'object', properties: {} } + + for (const param of params) { + let paramSchema = copyValidationKeywords(param) + + if ('schema' in param) { + paramSchema = { + ...paramSchema, + ...handleNullableSchema(param.schema) + } + if ('examples' in param) { + paramSchema.examples = getExamples(param.examples) + } + schema.properties[param.name] = paramSchema + } else { + if ('examples' in paramSchema) { + paramSchema.examples = getExamples(paramSchema.examples) + } + schema.properties[param.name] = param.nullable + ? handleNullable(paramSchema) + : paramSchema + } + } + + schema.required = getRequiredParams(params) + } + + return schema +} + +function getRequiredParams(parameters: any[]) { + return parameters.filter(byRequired).map(toName) +} + +function getExamples(exampleSchema: any) { + return Object.keys(exampleSchema).map((k) => exampleSchema[k].value) +} + +function byIn(str: string) { + return (param: any) => param.in === str && param.type !== 'file' +} + +function byRequired(param: any) { + return !!param.required +} + +function toName(param: any) { + return param.name +} diff --git a/packages/openapi-to-ts/src/utils.ts b/packages/openapi-to-ts/src/utils.ts new file mode 100644 index 0000000..87c0844 --- /dev/null +++ b/packages/openapi-to-ts/src/utils.ts @@ -0,0 +1,330 @@ +import type SwaggerParser from '@apidevtools/swagger-parser' +import type { IJsonSchema, OpenAPIV3, OpenAPIV3_1 } from 'openapi-types' +import { assert } from '@agentic/core' +import camelCaseImpl from 'camelcase' +import { + type JsonSchema, + jsonSchemaToZod as jsonSchemaToZodImpl, + type ParserOverride +} from 'json-schema-to-zod' +import * as prettier from 'prettier' + +export function prettify(source: string): Promise { + return prettier.format(source, { + parser: 'typescript', + semi: false, + singleQuote: true, + jsxSingleQuote: true, + bracketSpacing: true, + bracketSameLine: false, + arrowParens: 'always', + trailingComma: 'none' + }) +} + +export function pascalCase(identifier: string): string { + return camelCaseImpl(identifier, { pascalCase: true }) +} + +export function camelCase(identifier: string): string { + return camelCaseImpl(identifier) +} + +export function getAndResolve( + obj: any, + keys: string[], + refs: SwaggerParser.$Refs, + resolved?: Set, + depth = 0, + maxDepth = 0 +): T | null { + if (obj === undefined) return null + if (typeof obj !== 'object') return null + + if (!keys.length) { + return dereference(obj, refs, resolved, depth, maxDepth) as T + } + + if (obj.$ref) { + const derefed = refs.get(obj.$ref) + resolved?.add(obj.$ref) + if (!derefed) { + return null + } + obj = derefed + } + + const key = keys[0]! + const value = obj[key] + keys = keys.slice(1) + if (value === undefined) { + return null + } + + return getAndResolve(value, keys, refs, resolved, depth, maxDepth) +} + +export function dereferenceFull( + obj: T, + refs: SwaggerParser.$Refs, + resolved?: Set +): Exclude { + return dereference(obj, refs, resolved, 0, Number.POSITIVE_INFINITY) as any +} + +export function dereference( + obj: T, + refs: SwaggerParser.$Refs, + resolved?: Set, + depth = 0, + maxDepth = 1, + visited = new Set() +): T { + if (!obj) return obj + + if (depth >= maxDepth) { + return obj + } + + if (Array.isArray(obj)) { + return obj.map((item) => + dereference(item, refs, resolved, depth + 1, maxDepth, visited) + ) as T + } else if (typeof obj === 'object') { + if ('$ref' in obj) { + const ref = obj.$ref as string + if (visited?.has(ref)) { + return obj + } + visited?.add(ref) + const derefed = refs.get(ref) + assert(derefed, `Invalid schema: $ref not found for ${ref}`) + resolved?.add(ref) + derefed.title ??= ref.split('/').pop()! + return dereference(derefed, refs, resolved, depth + 1, maxDepth, visited) + } else { + return Object.fromEntries( + Object.entries(obj).map(([key, value]) => [ + key, + dereference(value, refs, resolved, depth + 1, maxDepth, visited) + ]) + ) as T + } + } else { + return obj + } +} + +function createParserOverride({ + type +}: { + type?: string +} = {}): ParserOverride { + const jsonSchemaToZodParserOverride: ParserOverride = (schema, _refs) => { + if ('$ref' in schema) { + const ref = schema.$ref as string + assert(ref, `Invalid schema: $ref not found for ${schema.$ref}`) + + const name = getComponentDisplayName(ref) + if (type === name) { + // TODO: Support recursive types. + return `\n// TODO: Support recursive types for \`${name}Schema\`.\nz.any()` + } + + return `${name}Schema` + } else if (schema.oneOf) { + const { oneOf, ...partialSchema } = schema + + // Replace oneOf with anyOf because `json-schema-to-zod` treats oneOf + // with a complicated `z.any().superRefine(...)` which we'd like messes + // up the resulting types. + const newSchema = { + ...partialSchema, + anyOf: oneOf + } + + const res = jsonSchemaToZodImpl(newSchema, { + parserOverride: jsonSchemaToZodParserOverride + }) + + return res + } + } + + return jsonSchemaToZodParserOverride +} + +export function jsonSchemaToZod( + schema: JsonSchema, + { + name, + type + }: { + name?: string + type?: string + } = {} +): string { + return jsonSchemaToZodImpl(schema, { + name, + module: 'esm', + withJsdocs: true, + type: type ?? true, + noImport: true, + parserOverride: createParserOverride({ type }) + }) +} + +const reservedWords = new Set([ + 'Error', + 'Class', + 'Object', + 'interface', + 'type', + 'default', + 'switch', + 'for', + 'break', + 'case', + 'if', + 'else', + 'while', + 'do', + 'for', + 'return', + 'continue', + 'function', + 'console', + 'window', + 'global', + 'import', + 'export', + 'namespace', + 'using', + 'require', + 'module', + 'process', + 'async', + 'await', + 'const', + 'let', + 'var', + 'void', + 'undefined', + 'abstract', + 'extends', + 'implements', + 'private', + 'protected', + 'public', + 'Infinity', + 'Nan', + 'Math', + 'Date', + 'RegExp', + 'JSON', + 'Buffer', + 'Promise', + 'Symbol', + 'Map', + 'Set', + 'WeakMap', + 'WeakSet', + 'Array', + 'Object', + 'Boolean', + 'Number', + 'String', + 'Function', + 'Symbol' +]) + +export function getComponentName(ref: string) { + const name = ref.split('/').pop()! + assert(name, `Invalid ref name ${ref}`) + + return name +} + +export function getComponentDisplayName(ref: string) { + const name0 = getComponentName(ref) + const name1 = pascalCase(name0) + assert(name1, `Invalid ref name ${ref}`) + + if (reservedWords.has(name1)) { + return `${name1}Type` + } + + return name1 +} + +export function getOperationParamsName( + operationName: string, + schemas?: Record +) { + const name = `${pascalCase(operationName)}Params` + if (!schemas) return name + + let tempName = name + let index = 2 + while (schemas[tempName]) { + tempName = `${name}${index}` + ++index + } + + return tempName +} + +export function getOperationResponseName( + operationName: string, + schemas?: Record +) { + const name = `${pascalCase(operationName)}Response` + if (!schemas) return name + + let tempName = name + let index = 2 + while (schemas[tempName]) { + tempName = `${name}${index}` + ++index + } + + return tempName +} + +export function naiveMergeJSONSchemas(...schemas: IJsonSchema[]): IJsonSchema { + const result: any = {} + + for (const ischema of schemas) { + const schema = ischema as any + const arrayKeys: string[] = [] + const objectKeys: string[] = [] + + for (const [key, value] of Object.entries(schema)) { + if (Array.isArray(value)) { + arrayKeys.push(key) + } else if (typeof value === 'object') { + objectKeys.push(key) + } else { + result[key] = value + } + } + + for (const key of arrayKeys) { + result[key] = [...(result[key] ?? []), ...(schema[key] ?? [])] + } + + for (const key of objectKeys) { + result[key] = { ...result[key], ...schema[key] } + } + } + + return result as IJsonSchema +} + +export function getDescription(description?: string): string | undefined { + if (description && !/[!.?]$/.test(description)) { + description += '.' + } + + return description +} diff --git a/packages/openapi-to-ts/tsconfig.json b/packages/openapi-to-ts/tsconfig.json new file mode 100644 index 0000000..a05348a --- /dev/null +++ b/packages/openapi-to-ts/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@agentic/tsconfig/base.json", + "include": ["src", "bin"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/openapi-to-ts/tsup.config.ts b/packages/openapi-to-ts/tsup.config.ts new file mode 100644 index 0000000..b523b60 --- /dev/null +++ b/packages/openapi-to-ts/tsup.config.ts @@ -0,0 +1,28 @@ +import { defineConfig } from 'tsup' + +export default defineConfig([ + { + entry: ['src/index.ts'], + outDir: 'dist', + target: 'node18', + platform: 'node', + format: ['esm'], + splitting: false, + sourcemap: true, + minify: false, + shims: true, + dts: true + }, + { + entry: ['bin/openapi-to-ts.ts'], + outDir: 'dist', + target: 'node18', + platform: 'node', + format: ['esm'], + splitting: false, + sourcemap: true, + minify: false, + shims: true, + dts: true + } +]) diff --git a/packages/stdlib/package.json b/packages/stdlib/package.json index 62f54d9..2876d69 100644 --- a/packages/stdlib/package.json +++ b/packages/stdlib/package.json @@ -32,12 +32,14 @@ }, "dependencies": { "@agentic/apollo": "workspace:*", + "@agentic/arxiv": "workspace:*", "@agentic/bing": "workspace:*", "@agentic/calculator": "workspace:*", "@agentic/clearbit": "workspace:*", "@agentic/core": "workspace:*", "@agentic/dexa": "workspace:*", "@agentic/diffbot": "workspace:*", + "@agentic/duck-duck-go": "workspace:*", "@agentic/e2b": "workspace:*", "@agentic/exa": "workspace:*", "@agentic/firecrawl": "workspace:*", @@ -48,6 +50,7 @@ "@agentic/jina": "workspace:*", "@agentic/leadmagic": "workspace:*", "@agentic/midjourney": "workspace:*", + "@agentic/mcp": "workspace:*", "@agentic/novu": "workspace:*", "@agentic/people-data-labs": "workspace:*", "@agentic/perigon": "workspace:*", diff --git a/packages/stdlib/src/index.ts b/packages/stdlib/src/index.ts index c099adb..35f8a3a 100644 --- a/packages/stdlib/src/index.ts +++ b/packages/stdlib/src/index.ts @@ -1,9 +1,11 @@ export * from '@agentic/apollo' +export * from '@agentic/arxiv' export * from '@agentic/bing' export * from '@agentic/calculator' export * from '@agentic/clearbit' export * from '@agentic/dexa' export * from '@agentic/diffbot' +export * from '@agentic/duck-duck-go' export * from '@agentic/e2b' export * from '@agentic/exa' export * from '@agentic/firecrawl' @@ -13,6 +15,7 @@ export * from '@agentic/hacker-news' export * from '@agentic/hunter' export * from '@agentic/jina' export * from '@agentic/leadmagic' +export * from '@agentic/mcp' export * from '@agentic/midjourney' export * from '@agentic/novu' export * from '@agentic/people-data-labs' diff --git a/packages/xsai/src/xsai.ts b/packages/xsai/src/xsai.ts index 99934ff..be78b8d 100644 --- a/packages/xsai/src/xsai.ts +++ b/packages/xsai/src/xsai.ts @@ -1,9 +1,9 @@ -import { type AIFunctionLike, AIFunctionSet } from '@agentic/core' +import { type AIFunctionLike, AIFunctionSet, isZodSchema } from '@agentic/core' import { tool, type ToolResult } from '@xsai/tool' /** * Converts a set of Agentic stdlib AI functions to an object compatible with - * [the xsAI SDK's](https://github.com/moeru-ai/xsai) `tools` parameter. + * the [xsAI SDK's](https://github.com/moeru-ai/xsai) `tools` parameter. */ export function createXSAITools( ...aiFunctionLikeTools: AIFunctionLike[] @@ -11,13 +11,19 @@ export function createXSAITools( const fns = new AIFunctionSet(aiFunctionLikeTools) return Promise.all( - fns.map((fn) => - tool({ + fns.map((fn) => { + if (!isZodSchema(fn.inputSchema)) { + throw new Error( + `xsAI tools only support Standard schemas like Zod: ${fn.spec.name} tool uses a custom JSON Schema, which is currently not supported.` + ) + } + + return tool({ name: fn.spec.name, description: fn.spec.description, parameters: fn.inputSchema, - execute: fn.impl + execute: fn.execute }) - ) + }) ) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2fdfa15..9c7fa36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,9 @@ catalogs: '@mastra/core': specifier: ^0.6.1 version: 0.6.1 + '@modelcontextprotocol/sdk': + specifier: ^1.7.0 + version: 1.7.0 '@nangohq/node': specifier: ^0.42.2 version: 0.42.22 @@ -36,12 +39,21 @@ catalogs: ai: specifier: ^4.1.61 version: 4.1.61 + cleye: + specifier: ^1.3.4 + version: 1.3.4 dedent: specifier: ^1.5.3 version: 1.5.3 delay: specifier: ^6.0.0 version: 6.0.0 + exit-hook: + specifier: ^4.0.0 + version: 4.0.0 + fast-xml-parser: + specifier: ^5.0.9 + version: 5.0.9 genkit: specifier: ^1.2.0 version: 1.2.0 @@ -160,7 +172,7 @@ importers: version: 5.8.2 vitest: specifier: 3.0.9 - version: 3.0.9(@types/node@22.13.10)(jiti@2.4.2)(tsx@4.19.3)(yaml@2.7.0) + version: 3.0.9(@types/debug@4.1.12)(@types/node@22.13.10)(jiti@2.4.2)(tsx@4.19.3)(yaml@2.7.0) zod: specifier: 'catalog:' version: 3.24.2 @@ -170,6 +182,9 @@ importers: '@agentic/ai-sdk': specifier: workspace:* version: link:../../packages/ai-sdk + '@agentic/mcp': + specifier: workspace:* + version: link:../../packages/mcp '@agentic/weather': specifier: workspace:* version: link:../../packages/weather @@ -179,6 +194,9 @@ importers: ai: specifier: 'catalog:' version: 4.1.61(react@18.3.1)(zod@3.24.2) + exit-hook: + specifier: 'catalog:' + version: 4.0.0 openai: specifier: 'catalog:' version: 4.87.3(encoding@0.1.13)(ws@8.18.0)(zod@3.24.2) @@ -363,10 +381,10 @@ importers: version: link:../../packages/xsai '@xsai/tool': specifier: 'catalog:' - version: 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + version: 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) xsai: specifier: 'catalog:' - version: 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + version: 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) zod: specifier: 'catalog:' version: 3.24.2 @@ -407,6 +425,25 @@ importers: specifier: workspace:* version: link:../tsconfig + packages/arxiv: + dependencies: + '@agentic/core': + specifier: workspace:* + version: link:../core + fast-xml-parser: + specifier: 'catalog:' + version: 5.0.9 + ky: + specifier: 'catalog:' + version: 1.7.5 + zod: + specifier: 'catalog:' + version: 3.24.2 + devDependencies: + '@agentic/tsconfig': + specifier: workspace:* + version: link:../tsconfig + packages/bing: dependencies: '@agentic/core': @@ -546,6 +583,25 @@ importers: specifier: workspace:* version: link:../tsconfig + packages/duck-duck-go: + dependencies: + '@agentic/core': + specifier: workspace:* + version: link:../core + duck-duck-scrape: + specifier: ^2.2.7 + version: 2.2.7 + string-strip-html: + specifier: ^13.4.12 + version: 13.4.12 + zod: + specifier: 'catalog:' + version: 3.24.2 + devDependencies: + '@agentic/tsconfig': + specifier: workspace:* + version: link:../tsconfig + packages/e2b: dependencies: '@agentic/core': @@ -782,6 +838,22 @@ importers: specifier: 'catalog:' version: 0.6.1(encoding@0.1.13)(react@18.3.1) + packages/mcp: + dependencies: + '@agentic/core': + specifier: workspace:* + version: link:../core + '@modelcontextprotocol/sdk': + specifier: 'catalog:' + version: 1.7.0 + zod: + specifier: 'catalog:' + version: 3.24.2 + devDependencies: + '@agentic/tsconfig': + specifier: workspace:* + version: link:../tsconfig + packages/midjourney: dependencies: '@agentic/core': @@ -814,6 +886,43 @@ importers: specifier: workspace:* version: link:../tsconfig + packages/openapi-to-ts: + dependencies: + '@agentic/core': + specifier: workspace:* + version: link:../core + '@apidevtools/swagger-parser': + specifier: ^10.1.1 + version: 10.1.1(openapi-types@12.1.3) + camelcase: + specifier: ^8.0.0 + version: 8.0.0 + cleye: + specifier: 'catalog:' + version: 1.3.4 + decamelize: + specifier: ^6.0.0 + version: 6.0.0 + execa: + specifier: ^9.5.2 + version: 9.5.2 + exit-hook: + specifier: 'catalog:' + version: 4.0.0 + json-schema-to-zod: + specifier: ^2.6.0 + version: 2.6.0 + openapi-types: + specifier: ^12.1.3 + version: 12.1.3 + zod: + specifier: 'catalog:' + version: 3.24.2 + devDependencies: + '@agentic/tsconfig': + specifier: workspace:* + version: link:../tsconfig + packages/people-data-labs: dependencies: '@agentic/core': @@ -1013,6 +1122,9 @@ importers: '@agentic/apollo': specifier: workspace:* version: link:../apollo + '@agentic/arxiv': + specifier: workspace:* + version: link:../arxiv '@agentic/bing': specifier: workspace:* version: link:../bing @@ -1031,6 +1143,9 @@ importers: '@agentic/diffbot': specifier: workspace:* version: link:../diffbot + '@agentic/duck-duck-go': + specifier: workspace:* + version: link:../duck-duck-go '@agentic/e2b': specifier: workspace:* version: link:../e2b @@ -1058,6 +1173,9 @@ importers: '@agentic/leadmagic': specifier: workspace:* version: link:../leadmagic + '@agentic/mcp': + specifier: workspace:* + version: link:../mcp '@agentic/midjourney': specifier: workspace:* version: link:../midjourney @@ -1281,7 +1399,7 @@ importers: version: link:../tsconfig '@xsai/tool': specifier: 'catalog:' - version: 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + version: 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) packages/zoominfo: dependencies: @@ -1374,6 +1492,22 @@ packages: resolution: {integrity: sha512-IQD9wkVReKAhsEAbDjh/0KrBGTEXelqZLpOBRDaIRvlzZ9sjmUP+gKbpvzyJnei2JHQiE8JAgj7YcNloINbGBw==} engines: {node: '>= 10'} + '@apidevtools/json-schema-ref-parser@11.7.2': + resolution: {integrity: sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA==} + engines: {node: '>= 16'} + + '@apidevtools/openapi-schemas@2.1.0': + resolution: {integrity: sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==} + engines: {node: '>=10'} + + '@apidevtools/swagger-methods@3.0.2': + resolution: {integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==} + + '@apidevtools/swagger-parser@10.1.1': + resolution: {integrity: sha512-u/kozRnsPO/x8QtKYJOqoGtC4kH6yg1lfYkB9Au0WhYB0FNLpyFusttQtvhlwjtG3rOwiRz4D8DnnXa8iEpIKA==} + peerDependencies: + openapi-types: '>=7' + '@aws-crypto/crc32@3.0.0': resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} @@ -1935,6 +2069,9 @@ packages: '@js-sdsl/ordered-map@4.4.2': resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} + '@jsdevtools/ono@7.1.3': + resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} + '@langchain/core@0.3.42': resolution: {integrity: sha512-pT/jC5lqWK3YGDq8dQwgKoa6anqAhMtG1x5JbnrOj9NdaLeBbCKBDQ+/Ykzk3nZ8o+0UMsaXNZo7IVL83VVjHg==} engines: {node: '>=18'} @@ -2044,6 +2181,10 @@ packages: resolution: {integrity: sha512-5J/+Rwi2E809RXlZpgEIBo7i0ruOb8kDCy1Su0eTjqkYvq1hvfJ07YHzAI67bDYmA6G0LZ763KCsUL9rRuxkiw==} engines: {node: '>=20'} + '@modelcontextprotocol/sdk@1.7.0': + resolution: {integrity: sha512-IYPe/FLpvF3IZrd/f5p5ffmWhMc3aEMuM2wGJASDqC2Ge7qatVCdbfPx3n/5xFeb19xN0j/911M2AaFuircsWA==} + engines: {node: '>=18'} + '@nangohq/node@0.42.22': resolution: {integrity: sha512-zFiq6PdtYkaM3oOFLBpKiuu4Gmz2nl8PHSk2JxiRRjx5HBd4oFYf8w7HLY53pRtCHxgLMCJwBDjYF3hjlr8Paw==} engines: {node: '>=18.0'} @@ -2972,6 +3113,9 @@ packages: '@rushstack/eslint-patch@1.10.4': resolution: {integrity: sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA==} + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} @@ -2979,6 +3123,10 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + '@smithy/abort-controller@4.0.1': resolution: {integrity: sha512-fiUIYgIgRjMWznk6iLJz35K2YxSLHzLBA/RC6lBrKfQ8fHbPfvk7Pk9UvpKoHgJjI18MnbPuEju53zcVy6KF1g==} engines: {node: '>=18.0.0'} @@ -3202,6 +3350,9 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/diff-match-patch@1.0.36': resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==} @@ -3221,12 +3372,18 @@ packages: '@types/jsrsasign@10.5.15': resolution: {integrity: sha512-3stUTaSRtN09PPzVWR6aySD9gNnuymz+WviNHoTb85dKu+BjaV4uBbWWGykBBJkfwPtcNZVfTn2lbX00U+yhpQ==} + '@types/lodash-es@4.17.12': + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} + '@types/lodash@4.17.15': resolution: {integrity: sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==} '@types/memcached@2.2.10': resolution: {integrity: sha512-AM9smvZN55Gzs2wRrqeMHVP7KE8KWgCJO/XL5yCly2xF6EKa4YlbpK+cLSAH4NG/Ah64HrlegmGqW8kYws7Vxg==} + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + '@types/mysql@2.15.26': resolution: {integrity: sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==} @@ -3406,6 +3563,10 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -3441,6 +3602,14 @@ packages: zod: optional: true + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + ajv-formats@3.0.1: resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} peerDependencies: @@ -3586,6 +3755,10 @@ packages: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + body-parser@2.1.0: + resolution: {integrity: sha512-/hPxh61E+ll0Ujp24Ilm64cykicul1ypfwjVttduAiEdtnJFvLePSrIPk+HMImtNv5270wOGCb1Tns2rybMkoQ==} + engines: {node: '>=18'} + bottleneck@2.19.5: resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} @@ -3653,6 +3826,9 @@ packages: resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} engines: {node: '>= 0.4'} + call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -3661,6 +3837,10 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} + camelcase@8.0.0: + resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} + engines: {node: '>=16'} + caniuse-lite@1.0.30001678: resolution: {integrity: sha512-RR+4U/05gNtps58PEBDZcPWTgEO2MBeoPZ96aQcjmfkBWRIDfN451fW2qyDA9/+HohLLIL5GqiMwA+IB1pWarw==} @@ -3702,6 +3882,9 @@ packages: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} + cleye@1.3.4: + resolution: {integrity: sha512-Rd6M8ecBDtdYdPR22h6gG37lPqqJ3hSOaplaGwuGYey9xKmEElOvTgupqfyLSlISshroRpVhYjDtW3vwNUNBaQ==} + cli-cursor@5.0.0: resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} engines: {node: '>=18'} @@ -3714,6 +3897,10 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + codsen-utils@1.6.7: + resolution: {integrity: sha512-M+9D3IhFAk4T8iATX62herVuIx1sp5kskWgxEegKD/JwTTSSGjGQs5Q5J4vVJ4mLcn1uhfxDYv6Yzr8zleHF3w==} + engines: {node: '>=14.18.0'} + cohere-ai@7.16.0: resolution: {integrity: sha512-hrG3EtVNSJLxJTaEeGRli+5rX34GiQC/UZ2WuUpaWiRwYbfzz7zKflfU/tg8SFFjkvYHDyS43UvVESepNd8C4w==} @@ -3765,6 +3952,10 @@ packages: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} + content-disposition@1.0.0: + resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} + engines: {node: '>= 0.6'} + content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} @@ -3776,6 +3967,10 @@ packages: cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + cookie@0.7.1: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} @@ -3841,6 +4036,15 @@ packages: supports-color: optional: true + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.4.0: resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} engines: {node: '>=6.0'} @@ -3854,6 +4058,10 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} + decamelize@6.0.0: + resolution: {integrity: sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + decimal.js@10.5.0: resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} @@ -3962,6 +4170,9 @@ packages: dotprompt@1.0.1: resolution: {integrity: sha512-mruM6m+pWe4t41InRDRchNLSl3x+q7iIBukVuUfb7vvN7aEOwP+BuONACAdaEeAqlMDtWHcTsuqqBdAAjGwamg==} + duck-duck-scrape@2.2.7: + resolution: {integrity: sha512-BEcglwnfx5puJl90KQfX+Q2q5vCguqyMpZcSRPBWk8OY55qWwV93+E+7DbIkrGDW4qkqPfUvtOUdi0lXz6lEMQ==} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -4271,18 +4482,40 @@ packages: resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} engines: {node: '>=18.0.0'} + eventsource@3.0.5: + resolution: {integrity: sha512-LT/5J605bx5SNyE+ITBDiM3FxffBiq9un7Vx0EwMDM3vg8sWKx/tO2zC+LMqZ+smAM0F2hblaDZUVZF0te2pSw==} + engines: {node: '>=18.0.0'} + execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} + execa@9.5.2: + resolution: {integrity: sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q==} + engines: {node: ^18.19.0 || >=20.5.0} + + exit-hook@4.0.0: + resolution: {integrity: sha512-Fqs7ChZm72y40wKjOFXBKg7nJZvQJmewP5/7LtePDdnah/+FH9Hp5sgMujSCMPXlxOAW2//1jrW9pnsY7o20vQ==} + engines: {node: '>=18'} + expect-type@1.2.0: resolution: {integrity: sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==} engines: {node: '>=12.0.0'} + express-rate-limit@7.5.0: + resolution: {integrity: sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==} + engines: {node: '>= 16'} + peerDependencies: + express: ^4.11 || 5 || ^5.0.0-beta.1 + express@4.21.2: resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} engines: {node: '>= 0.10.0'} + express@5.0.1: + resolution: {integrity: sha512-ORF7g6qGnD+YtUG9yx4DFoqCShNMmUKiXuT5oWMHiOvt/4WFbHC6yCwQMTSBMno7AqntNCAzzcnnjowRkTL9eQ==} + engines: {node: '>= 18'} + exsolve@1.0.4: resolution: {integrity: sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw==} @@ -4326,6 +4559,10 @@ packages: resolution: {integrity: sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==} hasBin: true + fast-xml-parser@5.0.9: + resolution: {integrity: sha512-2mBwCiuW3ycKQQ6SOesSB8WeF+fIGb6I/GG5vU5/XEptwFFhp9PE8b9O7fbs2dpq9fXn4ULR3UsfydNUCntf5A==} + hasBin: true + fastembed@1.14.1: resolution: {integrity: sha512-Y14v+FWZwjNUpQ7mRGYu4N5yF+hZkF7zqzPWzzLbwdIEtYsHy0DSpiVJ+Fg6Oi1fQjrBKASQt0hdSMSjw1/Wtw==} @@ -4344,6 +4581,10 @@ packages: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -4356,6 +4597,10 @@ packages: resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} + finalhandler@2.1.0: + resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} + engines: {node: '>= 0.8'} + find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -4424,6 +4669,10 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -4490,6 +4739,10 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} @@ -4602,6 +4855,9 @@ packages: hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + html-entities@2.5.2: + resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} + html-to-text@9.0.5: resolution: {integrity: sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==} engines: {node: '>=14'} @@ -4621,6 +4877,10 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} + human-signals@8.0.0: + resolution: {integrity: sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==} + engines: {node: '>=18.18.0'} + humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} @@ -4628,6 +4888,10 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + iconv-lite@0.5.2: + resolution: {integrity: sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==} + engines: {node: '>=0.10.0'} + iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -4785,6 +5049,9 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -4805,6 +5072,10 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -4817,6 +5088,10 @@ packages: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} @@ -5065,6 +5340,9 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} @@ -5116,6 +5394,10 @@ packages: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + media-typer@1.1.0: + resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} + engines: {node: '>= 0.8'} + memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} @@ -5127,6 +5409,10 @@ packages: merge-descriptors@1.0.3: resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -5146,10 +5432,18 @@ packages: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + mime-types@3.0.0: + resolution: {integrity: sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==} + engines: {node: '>= 0.6'} + mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} @@ -5204,6 +5498,9 @@ packages: ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -5227,10 +5524,19 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + needle@3.3.1: + resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} + engines: {node: '>= 4.4.x'} + hasBin: true + negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -5281,6 +5587,10 @@ packages: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} + nypm@0.6.0: resolution: {integrity: sha512-mn8wBFV9G9+UFHIrq+pZ2r2zL4aPau/by3kJb3cM7+5tQHMt6HGQB8FDIeKFYp8o0D2pnH6nVsO88N4AmUxIWg==} engines: {node: ^14.16.0 || >=16.10.0} @@ -5456,6 +5766,10 @@ packages: resolution: {integrity: sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==} engines: {node: '>=18'} + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + parseley@0.12.1: resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} @@ -5492,6 +5806,10 @@ packages: path-to-regexp@0.1.12: resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} + path-to-regexp@8.2.0: + resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} + engines: {node: '>=16'} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -5561,6 +5879,10 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} + pkce-challenge@4.1.0: + resolution: {integrity: sha512-ZBmhE1C9LcPoH9XZSdwiPtbPHZROwAnMy+kIFQVrnMCxY4Cudlz3gBOpzilgc0jOgRaiT3sIWfpMomW2ar2orQ==} + engines: {node: '>=16.20.0'} + pkg-types@2.1.0: resolution: {integrity: sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==} @@ -5622,6 +5944,10 @@ packages: engines: {node: '>=14'} hasBin: true + pretty-ms@9.2.0: + resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==} + engines: {node: '>=18'} + process-warning@4.0.1: resolution: {integrity: sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q==} @@ -5665,6 +5991,10 @@ packages: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} + qs@6.14.0: + resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} + engines: {node: '>=0.6'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -5679,10 +6009,30 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + ranges-apply@7.0.19: + resolution: {integrity: sha512-imA03KuTSuSpQtq9SDhavUz7BtiddCPj+fsYM/XpdypRN/s8vyTayKzni6m5nYs7VMds1kSNK1V3jfwVrPUWBQ==} + engines: {node: '>=14.18.0'} + + ranges-merge@9.0.18: + resolution: {integrity: sha512-2+6Eh4yxi5sudUmvCdvxVOSdXIXV+Brfutw8chhZmqkT0REqlzilpyQps1S5n8c7f0+idblqSAHGahTbf/Ar5g==} + engines: {node: '>=14.18.0'} + + ranges-push@7.0.18: + resolution: {integrity: sha512-wzGHipEklSlY0QloQ88PNt+PkTURIB42PLLcQGY+WyYBlNpnrzps6EYooD3RqNXtdqMQ9kR8IVaF9itRYtuzLA==} + engines: {node: '>=14.18.0'} + + ranges-sort@6.0.13: + resolution: {integrity: sha512-M3P0/dUnU3ihLPX2jq0MT2NJA1ls/q6cUAUVPD28xdFFqm3VFarPjTKKhnsBSvYCpZD8HdiElAGAyoPu6uOQjA==} + engines: {node: '>=14.18.0'} + raw-body@2.5.2: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + raw-body@3.0.0: + resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} + engines: {node: '>= 0.8'} + rc9@2.1.2: resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} @@ -5806,6 +6156,10 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + router@2.1.0: + resolution: {integrity: sha512-/m/NSLxeYEgWNtyC+WtNHCF7jbGxOibVWKnn+1Psff4dJGOfoXP+MuC/f2CwSmyiHdOIzYnYFp4W6GxWfekaLA==} + engines: {node: '>= 18'} + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -5830,6 +6184,9 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + secure-json-parse@2.7.0: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} @@ -5861,10 +6218,18 @@ packages: resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} engines: {node: '>= 0.8.0'} + send@1.1.0: + resolution: {integrity: sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==} + engines: {node: '>= 18'} + serve-static@1.16.2: resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} engines: {node: '>= 0.8.0'} + serve-static@2.1.0: + resolution: {integrity: sha512-A3We5UfEjG8Z7VkDv6uItWw6HY2bBSBJT1KtVESn6EOoOr2jAxNhxWCLY3jDE2WcuHXByWju74ck3ZgLwL8xmA==} + engines: {node: '>= 18'} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -5993,6 +6358,22 @@ packages: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} + string-collapse-leading-whitespace@7.0.9: + resolution: {integrity: sha512-lEuTHlogBT9PWipfk0FOyvoMKX8syiE03QoFk5MDh8oS0AJ2C07IlstR5cGkxz48nKkOIuvkC28w9Rx/cVRNDg==} + engines: {node: '>=14.18.0'} + + string-left-right@6.0.20: + resolution: {integrity: sha512-dz2mUgmsI7m/FMe+BoxZ2+73X1TUoQvjCdnq8vbIAnHlvWfVZleNUR+lw+QgHA2dlJig+hUWC9bFYdNFGGy2bA==} + engines: {node: '>=14.18.0'} + + string-strip-html@13.4.12: + resolution: {integrity: sha512-mr1GM1TFcwDkYwLE7TNkHY+Lf3YFEBa19W9KntZoJJSbrKF07W4xmLkPnqf8cypEGyr+dc1H9hsdTw5VSNVGxg==} + engines: {node: '>=14.18.0'} + + string-trim-spaces-only@5.0.12: + resolution: {integrity: sha512-Un5nIO1av+hzfnKGmY+bWe0AD4WH37TuDW+jeMPm81rUvU2r3VPRj9vEKdZkPmuhYAMuKlzarm7jDSKwJKOcpQ==} + engines: {node: '>=14.18.0'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -6046,6 +6427,10 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -6057,6 +6442,9 @@ packages: strnum@1.1.2: resolution: {integrity: sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==} + strnum@2.0.5: + resolution: {integrity: sha512-YAT3K/sgpCUxhxNMrrdhtod3jckkpYwH6JAuwmUdXZsmzH1wUyzTMrrK2wYCEEqlKwrWDd35NeuUkbBy/1iK+Q==} + sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -6118,6 +6506,9 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} + terminal-columns@1.4.1: + resolution: {integrity: sha512-IKVL/itiMy947XWVv4IHV7a0KQXvKjj4ptbi7Ew9MPMcOLzkiQeyx3Gyvh62hKrfJ0RZc4M1nbhzjNM39Kyujw==} + text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -6141,6 +6532,9 @@ packages: tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -6292,10 +6686,17 @@ packages: resolution: {integrity: sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==} engines: {node: '>=16'} + type-flag@3.0.0: + resolution: {integrity: sha512-3YaYwMseXCAhBB14RXW5cRQfJQlEknS6i4C8fCfeUdS3ihG9EdccdR9kt3vP73ZdeTGmPb4bZtkDn5XMIn1DLA==} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} + type-is@2.0.0: + resolution: {integrity: sha512-gd0sGezQYCbWSbkZr75mln4YBidWUN60+devscpLF5mtRDUpiaTvKpBNrdaCvel1NdR2k6vclXybU5fBd2i+nw==} + engines: {node: '>= 0.6'} + typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} @@ -6342,6 +6743,10 @@ packages: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} + unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + universal-github-app-jwt@2.2.0: resolution: {integrity: sha512-G5o6f95b5BggDGuUfKDApKaCgNYy2x7OdHY0zSMF081O0EJobw+1130VONhrA7ezGSV2FNOGyM+KQpQZAr9bIQ==} @@ -6608,11 +7013,20 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yoctocolors@2.1.1: + resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} + engines: {node: '>=18'} + zod-to-json-schema@3.24.3: resolution: {integrity: sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A==} peerDependencies: zod: ^3.24.1 + zod-to-json-schema@3.24.5: + resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==} + peerDependencies: + zod: ^3.24.1 + zod-validation-error@3.4.0: resolution: {integrity: sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==} engines: {node: '>=18.0.0'} @@ -6679,6 +7093,27 @@ snapshots: '@anush008/tokenizers-linux-x64-gnu': 0.0.0 '@anush008/tokenizers-win32-x64-msvc': 0.0.0 + '@apidevtools/json-schema-ref-parser@11.7.2': + dependencies: + '@jsdevtools/ono': 7.1.3 + '@types/json-schema': 7.0.15 + js-yaml: 4.1.0 + + '@apidevtools/openapi-schemas@2.1.0': {} + + '@apidevtools/swagger-methods@3.0.2': {} + + '@apidevtools/swagger-parser@10.1.1(openapi-types@12.1.3)': + dependencies: + '@apidevtools/json-schema-ref-parser': 11.7.2 + '@apidevtools/openapi-schemas': 2.1.0 + '@apidevtools/swagger-methods': 3.0.2 + '@jsdevtools/ono': 7.1.3 + ajv: 8.17.1 + ajv-draft-04: 1.0.0(ajv@8.17.1) + call-me-maybe: 1.0.2 + openapi-types: 12.1.3 + '@aws-crypto/crc32@3.0.0': dependencies: '@aws-crypto/util': 3.0.0 @@ -7482,6 +7917,8 @@ snapshots: '@js-sdsl/ordered-map@4.4.2': {} + '@jsdevtools/ono@7.1.3': {} + '@langchain/core@0.3.42(openai@4.87.3(encoding@0.1.13)(ws@8.18.0)(zod@3.24.2))': dependencies: '@cfworker/json-schema': 4.1.1 @@ -7658,6 +8095,20 @@ snapshots: - supports-color - utf-8-validate + '@modelcontextprotocol/sdk@1.7.0': + dependencies: + content-type: 1.0.5 + cors: 2.8.5 + eventsource: 3.0.5 + express: 5.0.1 + express-rate-limit: 7.5.0(express@5.0.1) + pkce-challenge: 4.1.0 + raw-body: 3.0.0 + zod: 3.24.2 + zod-to-json-schema: 3.24.3(zod@3.24.2) + transitivePeerDependencies: + - supports-color + '@nangohq/node@0.42.22': dependencies: axios: 1.7.9 @@ -8797,6 +9248,8 @@ snapshots: '@rushstack/eslint-patch@1.10.4': {} + '@sec-ant/readable-stream@0.4.1': {} + '@selderee/plugin-htmlparser2@0.11.0': dependencies: domhandler: 5.0.3 @@ -8804,6 +9257,8 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} + '@sindresorhus/merge-streams@4.0.0': {} + '@smithy/abort-controller@4.0.1': dependencies: '@smithy/types': 4.1.0 @@ -9142,6 +9597,11 @@ snapshots: dependencies: '@types/node': 22.13.10 + '@types/debug@4.1.12': + dependencies: + '@types/ms': 2.1.0 + optional: true + '@types/diff-match-patch@1.0.36': {} '@types/estree@1.0.6': {} @@ -9156,12 +9616,19 @@ snapshots: '@types/jsrsasign@10.5.15': {} + '@types/lodash-es@4.17.12': + dependencies: + '@types/lodash': 4.17.15 + '@types/lodash@4.17.15': {} '@types/memcached@2.2.10': dependencies: '@types/node': 22.13.10 + '@types/ms@2.1.0': + optional: true + '@types/mysql@2.15.26': dependencies: '@types/node': 22.13.10 @@ -9338,10 +9805,10 @@ snapshots: dependencies: '@xsai/shared': 0.1.3 - '@xsai/generate-object@0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2))': + '@xsai/generate-object@0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2))': dependencies: '@xsai/generate-text': 0.1.3 - xsschema: 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + xsschema: 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) transitivePeerDependencies: - '@valibot/to-json-schema' - arktype @@ -9369,10 +9836,10 @@ snapshots: '@xsai/shared@0.1.3': {} - '@xsai/stream-object@0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2))': + '@xsai/stream-object@0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2))': dependencies: '@xsai/stream-text': 0.1.3 - xsschema: 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + xsschema: 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) transitivePeerDependencies: - '@valibot/to-json-schema' - arktype @@ -9382,11 +9849,11 @@ snapshots: dependencies: '@xsai/shared-chat': 0.1.3 - '@xsai/tool@0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2))': + '@xsai/tool@0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2))': dependencies: '@xsai/shared': 0.1.3 '@xsai/shared-chat': 0.1.3 - xsschema: 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + xsschema: 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) transitivePeerDependencies: - '@valibot/to-json-schema' - arktype @@ -9407,6 +9874,11 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + accepts@2.0.0: + dependencies: + mime-types: 3.0.0 + negotiator: 1.0.0 + acorn-import-attributes@1.9.5(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -9436,6 +9908,10 @@ snapshots: react: 18.3.1 zod: 3.24.2 + ajv-draft-04@1.0.0(ajv@8.17.1): + optionalDependencies: + ajv: 8.17.1 + ajv-formats@3.0.1(ajv@8.17.1): optionalDependencies: ajv: 8.17.1 @@ -9608,6 +10084,20 @@ snapshots: transitivePeerDependencies: - supports-color + body-parser@2.1.0: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 4.4.0 + http-errors: 2.0.0 + iconv-lite: 0.5.2 + on-finished: 2.4.1 + qs: 6.14.0 + raw-body: 3.0.0 + type-is: 2.0.0 + transitivePeerDependencies: + - supports-color + bottleneck@2.19.5: {} bowser@2.11.0: {} @@ -9697,10 +10187,14 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.2.7 + call-me-maybe@1.0.2: {} + callsites@3.1.0: {} camelcase@6.3.0: {} + camelcase@8.0.0: {} + caniuse-lite@1.0.30001678: {} chai@5.2.0: @@ -9738,6 +10232,11 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + cleye@1.3.4: + dependencies: + terminal-columns: 1.4.1 + type-flag: 3.0.0 + cli-cursor@5.0.0: dependencies: restore-cursor: 5.1.0 @@ -9753,6 +10252,10 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + codsen-utils@1.6.7: + dependencies: + rfdc: 1.4.1 + cohere-ai@7.16.0(encoding@0.1.13): dependencies: '@aws-sdk/client-sagemaker': 3.760.0 @@ -9808,6 +10311,10 @@ snapshots: dependencies: safe-buffer: 5.2.1 + content-disposition@1.0.0: + dependencies: + safe-buffer: 5.2.1 + content-type@1.0.5: {} convict@6.2.4: @@ -9817,6 +10324,8 @@ snapshots: cookie-signature@1.0.6: {} + cookie-signature@1.2.2: {} + cookie@0.7.1: {} core-js-compat@3.39.0: @@ -9877,12 +10386,18 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.3.6: + dependencies: + ms: 2.1.2 + debug@4.4.0: dependencies: ms: 2.1.3 decamelize@1.2.0: {} + decamelize@6.0.0: {} + decimal.js@10.5.0: {} decircular@0.1.1: {} @@ -9977,6 +10492,11 @@ snapshots: handlebars: 4.7.8 yaml: 2.7.0 + duck-duck-scrape@2.2.7: + dependencies: + html-entities: 2.5.2 + needle: 3.3.1 + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -10460,6 +10980,10 @@ snapshots: eventsource-parser@3.0.0: {} + eventsource@3.0.5: + dependencies: + eventsource-parser: 3.0.0 + execa@8.0.1: dependencies: cross-spawn: 7.0.6 @@ -10472,8 +10996,29 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 + execa@9.5.2: + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + cross-spawn: 7.0.6 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 8.0.0 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 6.0.0 + pretty-ms: 9.2.0 + signal-exit: 4.1.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.1.1 + + exit-hook@4.0.0: {} + expect-type@1.2.0: {} + express-rate-limit@7.5.0(express@5.0.1): + dependencies: + express: 5.0.1 + express@4.21.2: dependencies: accepts: 1.3.8 @@ -10510,6 +11055,43 @@ snapshots: transitivePeerDependencies: - supports-color + express@5.0.1: + dependencies: + accepts: 2.0.0 + body-parser: 2.1.0 + content-disposition: 1.0.0 + content-type: 1.0.5 + cookie: 0.7.1 + cookie-signature: 1.2.2 + debug: 4.3.6 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.0 + fresh: 2.0.0 + http-errors: 2.0.0 + merge-descriptors: 2.0.0 + methods: 1.1.2 + mime-types: 3.0.0 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.7 + qs: 6.13.0 + range-parser: 1.2.1 + router: 2.1.0 + safe-buffer: 5.2.1 + send: 1.1.0 + serve-static: 2.1.0 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: 2.0.0 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + exsolve@1.0.4: {} extend@3.0.2: {} @@ -10550,6 +11132,10 @@ snapshots: dependencies: strnum: 1.1.2 + fast-xml-parser@5.0.9: + dependencies: + strnum: 2.0.5 + fastembed@1.14.1: dependencies: '@anush008/tokenizers': 0.0.0 @@ -10570,6 +11156,10 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 + figures@6.1.0: + dependencies: + is-unicode-supported: 2.1.0 + file-entry-cache@6.0.1: dependencies: flat-cache: 3.2.0 @@ -10590,6 +11180,17 @@ snapshots: transitivePeerDependencies: - supports-color + finalhandler@2.1.0: + dependencies: + debug: 4.4.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -10649,6 +11250,8 @@ snapshots: fresh@0.5.2: {} + fresh@2.0.0: {} + fs-minipass@2.1.0: dependencies: minipass: 3.3.6 @@ -10740,6 +11343,11 @@ snapshots: get-stream@8.0.1: {} + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + get-symbol-description@1.0.2: dependencies: call-bind: 1.0.7 @@ -10870,6 +11478,8 @@ snapshots: hosted-git-info@2.8.9: {} + html-entities@2.5.2: {} + html-to-text@9.0.5: dependencies: '@selderee/plugin-htmlparser2': 0.11.0 @@ -10902,6 +11512,8 @@ snapshots: human-signals@5.0.0: {} + human-signals@8.0.0: {} + humanize-ms@1.2.1: dependencies: ms: 2.1.3 @@ -10910,10 +11522,13 @@ snapshots: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.5.2: + dependencies: + safer-buffer: 2.1.2 + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 - optional: true ieee754@1.2.1: {} @@ -11045,6 +11660,8 @@ snapshots: is-plain-obj@4.1.0: {} + is-promise@4.0.0: {} + is-regex@1.1.4: dependencies: call-bind: 1.0.7 @@ -11060,6 +11677,8 @@ snapshots: is-stream@3.0.0: {} + is-stream@4.0.1: {} + is-string@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -11072,6 +11691,8 @@ snapshots: dependencies: which-typed-array: 1.1.15 + is-unicode-supported@2.1.0: {} + is-weakmap@2.0.2: {} is-weakref@1.0.2: @@ -11301,6 +11922,8 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash-es@4.17.21: {} + lodash.camelcase@4.3.0: {} lodash.clonedeep@4.5.0: {} @@ -11351,12 +11974,16 @@ snapshots: media-typer@0.3.0: {} + media-typer@1.1.0: {} + memorystream@0.3.1: {} meow@13.2.0: {} merge-descriptors@1.0.3: {} + merge-descriptors@2.0.0: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -11370,10 +11997,16 @@ snapshots: mime-db@1.52.0: {} + mime-db@1.54.0: {} + mime-types@2.1.35: dependencies: mime-db: 1.52.0 + mime-types@3.0.0: + dependencies: + mime-db: 1.54.0 + mime@1.6.0: {} mimic-fn@4.0.0: {} @@ -11411,6 +12044,8 @@ snapshots: ms@2.0.0: {} + ms@2.1.2: {} + ms@2.1.3: {} mustache@4.2.0: {} @@ -11427,8 +12062,15 @@ snapshots: natural-compare@1.4.0: {} + needle@3.3.1: + dependencies: + iconv-lite: 0.6.3 + sax: 1.4.1 + negotiator@0.6.3: {} + negotiator@1.0.0: {} + neo-async@2.6.2: {} node-addon-api@8.3.1: {} @@ -11477,6 +12119,11 @@ snapshots: dependencies: path-key: 4.0.0 + npm-run-path@6.0.0: + dependencies: + path-key: 4.0.0 + unicorn-magic: 0.3.0 + nypm@0.6.0: dependencies: citty: 0.1.6 @@ -11667,6 +12314,8 @@ snapshots: index-to-position: 0.1.2 type-fest: 4.35.0 + parse-ms@4.0.0: {} + parseley@0.12.1: dependencies: leac: 0.6.0 @@ -11693,6 +12342,8 @@ snapshots: path-to-regexp@0.1.12: {} + path-to-regexp@8.2.0: {} + path-type@4.0.0: {} path-type@5.0.0: {} @@ -11765,6 +12416,8 @@ snapshots: pirates@4.0.6: {} + pkce-challenge@4.1.0: {} + pkg-types@2.1.0: dependencies: confbox: 0.2.1 @@ -11806,6 +12459,10 @@ snapshots: prettier@3.5.3: {} + pretty-ms@9.2.0: + dependencies: + parse-ms: 4.0.0 + process-warning@4.0.1: {} process@0.11.10: {} @@ -11857,6 +12514,10 @@ snapshots: dependencies: side-channel: 1.1.0 + qs@6.14.0: + dependencies: + side-channel: 1.1.0 + queue-microtask@1.2.3: {} quick-format-unescaped@4.0.4: {} @@ -11865,6 +12526,25 @@ snapshots: range-parser@1.2.1: {} + ranges-apply@7.0.19: + dependencies: + ranges-merge: 9.0.18 + tiny-invariant: 1.3.3 + + ranges-merge@9.0.18: + dependencies: + ranges-push: 7.0.18 + ranges-sort: 6.0.13 + + ranges-push@7.0.18: + dependencies: + codsen-utils: 1.6.7 + ranges-sort: 6.0.13 + string-collapse-leading-whitespace: 7.0.9 + string-trim-spaces-only: 5.0.12 + + ranges-sort@6.0.13: {} + raw-body@2.5.2: dependencies: bytes: 3.1.2 @@ -11872,6 +12552,13 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + raw-body@3.0.0: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.6.3 + unpipe: 1.0.0 + rc9@2.1.2: dependencies: defu: 6.1.4 @@ -12041,6 +12728,12 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.36.0 fsevents: 2.3.3 + router@2.1.0: + dependencies: + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.2.0 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -12068,6 +12761,8 @@ snapshots: safer-buffer@2.1.2: {} + sax@1.4.1: {} + secure-json-parse@2.7.0: {} seedrandom@3.0.5: {} @@ -12102,6 +12797,23 @@ snapshots: transitivePeerDependencies: - supports-color + send@1.1.0: + dependencies: + debug: 4.4.0 + destroy: 1.2.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime-types: 2.1.35 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + serve-static@1.16.2: dependencies: encodeurl: 2.0.0 @@ -12111,6 +12823,15 @@ snapshots: transitivePeerDependencies: - supports-color + serve-static@2.1.0: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.1.0 + transitivePeerDependencies: + - supports-color + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -12238,6 +12959,25 @@ snapshots: string-argv@0.3.2: {} + string-collapse-leading-whitespace@7.0.9: {} + + string-left-right@6.0.20: + dependencies: + codsen-utils: 1.6.7 + rfdc: 1.4.1 + + string-strip-html@13.4.12: + dependencies: + '@types/lodash-es': 4.17.12 + codsen-utils: 1.6.7 + html-entities: 2.5.2 + lodash-es: 4.17.21 + ranges-apply: 7.0.19 + ranges-push: 7.0.18 + string-left-right: 6.0.20 + + string-trim-spaces-only@5.0.12: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -12317,6 +13057,8 @@ snapshots: strip-final-newline@3.0.0: {} + strip-final-newline@4.0.0: {} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 @@ -12325,6 +13067,8 @@ snapshots: strnum@1.1.2: {} + strnum@2.0.5: {} + sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.8 @@ -12388,6 +13132,8 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 + terminal-columns@1.4.1: {} + text-table@0.2.0: {} thenify-all@1.6.0: @@ -12408,6 +13154,8 @@ snapshots: tiny-emitter@2.1.0: {} + tiny-invariant@1.3.3: {} + tinybench@2.9.0: {} tinyexec@0.3.2: {} @@ -12543,11 +13291,19 @@ snapshots: type-fest@4.37.0: {} + type-flag@3.0.0: {} + type-is@1.6.18: dependencies: media-typer: 0.3.0 mime-types: 2.1.35 + type-is@2.0.0: + dependencies: + content-type: 1.0.5 + media-typer: 1.1.0 + mime-types: 3.0.0 + typed-array-buffer@1.0.2: dependencies: call-bind: 1.0.7 @@ -12602,6 +13358,8 @@ snapshots: unicorn-magic@0.1.0: {} + unicorn-magic@0.3.0: {} + universal-github-app-jwt@2.2.0: {} universal-user-agent@7.0.2: {} @@ -12670,7 +13428,7 @@ snapshots: tsx: 4.19.3 yaml: 2.7.0 - vitest@3.0.9(@types/node@22.13.10)(jiti@2.4.2)(tsx@4.19.3)(yaml@2.7.0): + vitest@3.0.9(@types/debug@4.1.12)(@types/node@22.13.10)(jiti@2.4.2)(tsx@4.19.3)(yaml@2.7.0): dependencies: '@vitest/expect': 3.0.9 '@vitest/mocker': 3.0.9(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(tsx@4.19.3)(yaml@2.7.0)) @@ -12693,6 +13451,7 @@ snapshots: vite-node: 3.0.9(@types/node@22.13.10)(jiti@2.4.2)(tsx@4.19.3)(yaml@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: + '@types/debug': 4.1.12 '@types/node': 22.13.10 transitivePeerDependencies: - jiti @@ -12810,19 +13569,19 @@ snapshots: ws@8.18.0: {} - xsai@0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)): + xsai@0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)): dependencies: '@xsai/embed': 0.1.3 - '@xsai/generate-object': 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + '@xsai/generate-object': 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) '@xsai/generate-speech': 0.1.3 '@xsai/generate-text': 0.1.3 '@xsai/generate-transcription': 0.1.3 '@xsai/model': 0.1.3 '@xsai/shared': 0.1.3 '@xsai/shared-chat': 0.1.3 - '@xsai/stream-object': 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + '@xsai/stream-object': 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) '@xsai/stream-text': 0.1.3 - '@xsai/tool': 0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)) + '@xsai/tool': 0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)) '@xsai/utils-chat': 0.1.3 '@xsai/utils-stream': 0.1.3 transitivePeerDependencies: @@ -12830,9 +13589,9 @@ snapshots: - arktype - zod-to-json-schema - xsschema@0.1.3(zod-to-json-schema@3.24.3(zod@3.24.2)): + xsschema@0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)): optionalDependencies: - zod-to-json-schema: 3.24.3(zod@3.24.2) + zod-to-json-schema: 3.24.5(zod@3.24.2) xstate@5.19.2: {} @@ -12860,10 +13619,17 @@ snapshots: yocto-queue@0.1.0: {} + yoctocolors@2.1.1: {} + zod-to-json-schema@3.24.3(zod@3.24.2): dependencies: zod: 3.24.2 + zod-to-json-schema@3.24.5(zod@3.24.2): + dependencies: + zod: 3.24.2 + optional: true + zod-validation-error@3.4.0(zod@3.24.2): dependencies: zod: 3.24.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 14da1f9..8f7c7f4 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,8 +7,10 @@ catalog: zod: ^3.24.2 zod-validation-error: ^3.4.0 openai-zod-to-json-schema: ^1.0.3 + cleye: ^1.3.4 dedent: ^1.5.3 delay: ^6.0.0 + exit-hook: ^4.0.0 jsonrepair: ^3.9.0 jsrsasign: ^10.9.0 mathjs: ^13.0.3 @@ -23,6 +25,8 @@ catalog: type-fest: ^4.37.0 wikibase-sdk: ^10.2.2 '@types/jsrsasign': ^10.5.15 + fast-xml-parser: ^5.0.9 + '@modelcontextprotocol/sdk': ^1.7.0 # vercel ai sdk ai: ^4.1.61 diff --git a/readme.md b/readme.md index 34bfe7c..7423d48 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,7 @@ ## Intro -Agentic is a **standard library of AI functions / tools** which are **optimized for both normal TS-usage as well as LLM-based usage**. Agentic works with all of the major TS AI SDKs (Vercel AI SDK, Mastra, LangChain, LlamaIndex, OpenAI SDK, etc). +Agentic is a **standard library of AI functions / tools** which are **optimized for both normal TS-usage as well as LLM-based usage**. Agentic works with all of the major TS AI SDKs (Vercel AI SDK, Mastra, LangChain, LlamaIndex, OpenAI SDK, MCP, etc). Agentic clients like `WeatherClient` can be used as normal TS classes: @@ -80,11 +80,34 @@ console.log(result.toolResults[0]) You can use our standard library of thoroughly tested AI functions with your favorite AI SDK – without having to write any glue code! +All Agentic clients expose an `AIFunctionSet`, which makes it easy to mix & match all sorts of different tools together. + +```ts +import { SerperClient, WikipediaClient, FirecrawlClient } from '@agentic/stdlib' + +const googleSearch = new SerperClient() +const wikipedia = new WikipediaClient() +const firecrawl = new FirecrawlClient() + +const result = await generateText({ + model: openai('gpt-4o-mini'), + tools: createAISDKTools( + googleSearch, + wikipedia, + // Pick a single function from the firecrawl client's set of AI functions + firecrawl.functions.pick('firecrawl_search') + ), + toolChoice: 'required', + prompt: + 'What year did Jurassic Park come out, and what else happened that year?' +}) +``` + ### Under the hood -All of the adapters (like `createAISDKTools` in this example) accept a very flexible var args of `AIFunctionLike` parameters, so you can pass as many tools as you'd like. An `AIFunctionLike` can be any agentic client instance, a single `AIFunction` selected from the client's `.functions` property (which holds an `AIFunctionSet` of available AI functions), or an AI function created manually via `createAIFunction`. +All of the adapters (like `createAISDKTools`) accept a very flexible var args of `AIFunctionLike` parameters, so you can pass as many tools as you'd like. An `AIFunctionLike` can be any agentic client instance, a single `AIFunction` selected from the client's `.functions` property (which holds an `AIFunctionSet` of available AI functions), or an AI function created manually via `createAIFunction`. -`AIFunctionLike` and `AIFunctionSet` are implementation details that you likely won't have to touch directly, but they're important primitives because they're designed to maximize flexibility when working with various AI functions coming from different places. +`AIFunctionLike` and `AIFunctionSet` are details that you likely won't have to touch directly, but they're important because of their flexibility. ## Docs @@ -133,11 +156,13 @@ Full docs are available at [agentic.so](https://agentic.so). | Service / Tool | Package | Docs | Description | | ------------------------------------------------------------------------ | --------------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Apollo](https://docs.apollo.io) | `@agentic/apollo` | [docs](https://agentic.so/tools/apollo) | B2B person and company enrichment API. | +| [ArXiv](https://arxiv.org) | `@agentic/arxiv` | [docs](https://agentic.so/tools/arxiv) | Search for research articles. | | [Bing](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api) | `@agentic/bing` | [docs](https://agentic.so/tools/bing) | Bing web search. | | [Calculator](https://github.com/josdejong/mathjs) | `@agentic/calculator` | [docs](https://agentic.so/tools/calculator) | Basic calculator for simple mathematical expressions. | | [Clearbit](https://dashboard.clearbit.com/docs) | `@agentic/clearbit` | [docs](https://agentic.so/tools/clearbit) | Resolving and enriching people and company data. | | [Dexa](https://dexa.ai) | `@agentic/dexa` | [docs](https://agentic.so/tools/dexa) | Answers questions from the world's best podcasters. | | [Diffbot](https://docs.diffbot.com) | `@agentic/diffbot` | [docs](https://agentic.so/tools/diffbot) | Web page classification and scraping; person and company data enrichment. | +| [DuckDuckGo](https://duckduckgo.com) | `@agentic/duck-duck-go` | [docs](https://agentic.so/tools/duck-duck-go) | Privacy-focused web search API. | | [E2B](https://e2b.dev) | `@agentic/e2b` | [docs](https://agentic.so/tools/e2b) | Hosted Python code interpreter sandbox which is really useful for data analysis, flexible code execution, and advanced reasoning on-the-fly. | | [Exa](https://docs.exa.ai) | `@agentic/exa` | [docs](https://agentic.so/tools/exa) | Web search tailored for LLMs. | | [Firecrawl](https://www.firecrawl.dev) | `@agentic/firecrawl` | [docs](https://agentic.so/tools/firecrawl) | Website scraping and structured data extraction. | @@ -147,6 +172,7 @@ Full docs are available at [agentic.so](https://agentic.so). | [Jina](https://jina.ai/reader) | `@agentic/jina` | [docs](https://agentic.so/tools/jina) | URL scraper and web search. | | [LeadMagic](https://leadmagic.io) | `@agentic/leadmagic` | [docs](https://agentic.so/tools/leadmagic) | B2B person, company, and email enrichment API. | | [Midjourney](https://www.imagineapi.dev) | `@agentic/midjourney` | [docs](https://agentic.so/tools/midjourney) | Unofficial Midjourney client for generative images. | +| [McpTools](https://modelcontextprotocol.io) | `@agentic/mcp` | [docs](https://agentic.so/tools/mcp) | Model Context Protocol (MCP) client, supporting any MCP server. Use [createMcpTools](https://agentic.so/tools/mcp) to spawn or connect to an MCP server. | | [Novu](https://novu.co) | `@agentic/novu` | [docs](https://agentic.so/tools/novu) | Sending notifications (email, SMS, in-app, push, etc). | | [People Data Labs](https://www.peopledatalabs.com) | `@agentic/people-data-labs` | [docs](https://agentic.so/tools/people-data-labs) | People & company data (WIP). | | [Perigon](https://www.goperigon.com/products/news-api) | `@agentic/perigon` | [docs](https://agentic.so/tools/perigon) | Real-time news API and web content data from 140,000+ sources. Structured and enriched by AI, primed for LLMs. | @@ -171,6 +197,9 @@ Full docs are available at [agentic.so](https://agentic.so). > [!NOTE] > All Agentic clients have been hand-crafted for minimal size, with very few relying on external dependencies aside from our native `fetch` wrapper, [ky](https://github.com/sindresorhus/ky). +> [!NOTE] +> Missing a tool or want to add your own tool to this list? If you have an OpenAPI v3 spec for your API, we make it extremely easy to add support using our [@agentic/openapi-to-ts CLI](./packages/openapi-to-ts). Otherwise, feel free to [open an issue to discuss](https://github.com/transitive-bullshit/agentic/issues/new?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen). + For more details, see the [docs](https://agentic.so). ## Contributors