From 95db80c956f74e9a362a302bd997c5f58df22648 Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Fri, 10 Apr 2026 23:10:56 +0530 Subject: [PATCH 01/11] feat(supervisor): add process supervision utilities Add @executor/supervisor package with graceful signal-based process termination (gracefulStopPid, isPidAlive) and HTTP readiness polling (pollReadiness, isReachable). Consumed by apps/desktop and the launchd plugin. --- packages/core/supervisor/package.json | 28 ++++ packages/core/supervisor/src/errors.ts | 7 + packages/core/supervisor/src/index.cjs | 104 ++++++++++++++ packages/core/supervisor/src/index.ts | 3 + packages/core/supervisor/src/process.test.ts | 95 +++++++++++++ packages/core/supervisor/src/process.ts | 59 ++++++++ .../core/supervisor/src/readiness.test.ts | 128 ++++++++++++++++++ packages/core/supervisor/src/readiness.ts | 65 +++++++++ packages/core/supervisor/tsconfig.json | 23 ++++ packages/core/supervisor/vitest.config.ts | 7 + 10 files changed, 519 insertions(+) create mode 100644 packages/core/supervisor/package.json create mode 100644 packages/core/supervisor/src/errors.ts create mode 100644 packages/core/supervisor/src/index.cjs create mode 100644 packages/core/supervisor/src/index.ts create mode 100644 packages/core/supervisor/src/process.test.ts create mode 100644 packages/core/supervisor/src/process.ts create mode 100644 packages/core/supervisor/src/readiness.test.ts create mode 100644 packages/core/supervisor/src/readiness.ts create mode 100644 packages/core/supervisor/tsconfig.json create mode 100644 packages/core/supervisor/vitest.config.ts diff --git a/packages/core/supervisor/package.json b/packages/core/supervisor/package.json new file mode 100644 index 000000000..698a2fcf1 --- /dev/null +++ b/packages/core/supervisor/package.json @@ -0,0 +1,28 @@ +{ + "name": "@executor/supervisor", + "version": "1.4.0", + "private": true, + "type": "module", + "main": "./src/index.cjs", + "types": "./src/index.ts", + "exports": { + ".": { + "types": "./src/index.ts", + "import": "./src/index.ts", + "require": "./src/index.cjs" + } + }, + "scripts": { + "typecheck": "bunx tsc --noEmit -p tsconfig.json", + "test": "vitest run" + }, + "dependencies": { + "effect": "catalog:" + }, + "devDependencies": { + "@effect/vitest": "catalog:", + "@types/node": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:" + } +} diff --git a/packages/core/supervisor/src/errors.ts b/packages/core/supervisor/src/errors.ts new file mode 100644 index 000000000..0af75fea0 --- /dev/null +++ b/packages/core/supervisor/src/errors.ts @@ -0,0 +1,7 @@ +import { Data } from "effect"; + +export class ReadinessTimeout extends Data.TaggedError("ReadinessTimeout")<{ + readonly url: string; + readonly elapsedMs: number; + readonly attempts: number; +}> {} diff --git a/packages/core/supervisor/src/index.cjs b/packages/core/supervisor/src/index.cjs new file mode 100644 index 000000000..548f479e0 --- /dev/null +++ b/packages/core/supervisor/src/index.cjs @@ -0,0 +1,104 @@ +const { Effect, Data } = require("effect"); + +class ReadinessTimeout extends Data.TaggedError("ReadinessTimeout") {} + +const DEFAULT_TIMEOUT_MS = 10000; +const DEFAULT_INTERVAL_MS = 100; +const DEFAULT_PROBE_TIMEOUT_MS = 2000; +const DEFAULT_SIGNAL_DELAY_MS = 500; +const DEFAULT_KILL_AFTER_MS = 5000; +const DEFAULT_SIGNALS = ["SIGTERM", "SIGINT"]; + +const sleepEffect = (ms) => Effect.promise(() => new Promise((resolve) => setTimeout(resolve, ms))); + +const isReachable = (url, opts = {}) => + Effect.tryPromise({ + try: async () => { + const response = await fetch(url, { + headers: opts.headers, + signal: AbortSignal.timeout(opts.probeTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS), + }); + return response.ok; + }, + catch: () => false, + }).pipe(Effect.orElseSucceed(() => false)); + +const pollReadiness = (url, opts = {}) => { + const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS; + const intervalMs = opts.intervalMs ?? DEFAULT_INTERVAL_MS; + const start = Date.now(); + + const loop = (attempts) => + Effect.gen(function* () { + const reachable = yield* isReachable(url, opts); + const nextAttempts = attempts + 1; + if (reachable) return; + + const elapsedMs = Date.now() - start; + if (elapsedMs >= timeoutMs) { + return yield* new ReadinessTimeout({ + url, + elapsedMs, + attempts: nextAttempts, + }); + } + + yield* sleepEffect(Math.min(intervalMs, timeoutMs - elapsedMs)); + return yield* loop(nextAttempts); + }); + + return loop(0); +}; + +const isPidAlive = (pid) => { + try { + process.kill(pid, 0); + return true; + } catch { + return false; + } +}; + +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const sendSignal = (pid, signal) => { + try { + process.kill(pid, signal); + } catch { + // Best-effort shutdown. + } +}; + +const gracefulStopPid = (pid, opts = {}) => + Effect.promise(async () => { + if (!isPidAlive(pid)) return; + + const signals = opts.signals ?? DEFAULT_SIGNALS; + const signalDelayMs = opts.signalDelayMs ?? DEFAULT_SIGNAL_DELAY_MS; + const killAfterMs = opts.killAfterMs ?? DEFAULT_KILL_AFTER_MS; + const startedAt = Date.now(); + + for (const signal of signals) { + sendSignal(pid, signal); + await sleep(signalDelayMs); + if (!isPidAlive(pid)) return; + if (Date.now() - startedAt >= killAfterMs) break; + } + + const remainingMs = killAfterMs - (Date.now() - startedAt); + if (remainingMs > 0) { + await sleep(remainingMs); + } + + if (isPidAlive(pid)) { + sendSignal(pid, "SIGKILL"); + } + }).pipe(Effect.orElseSucceed(() => undefined)); + +module.exports = { + ReadinessTimeout, + gracefulStopPid, + isPidAlive, + isReachable, + pollReadiness, +}; diff --git a/packages/core/supervisor/src/index.ts b/packages/core/supervisor/src/index.ts new file mode 100644 index 000000000..3ab7ee07f --- /dev/null +++ b/packages/core/supervisor/src/index.ts @@ -0,0 +1,3 @@ +export * from "./errors.js"; +export * from "./process.js"; +export * from "./readiness.js"; diff --git a/packages/core/supervisor/src/process.test.ts b/packages/core/supervisor/src/process.test.ts new file mode 100644 index 000000000..0569e39c8 --- /dev/null +++ b/packages/core/supervisor/src/process.test.ts @@ -0,0 +1,95 @@ +import { describe, expect, it } from "@effect/vitest"; +import { afterEach, vi } from "vitest"; +import { Effect } from "effect"; + +import { gracefulStopPid, isPidAlive } from "./process"; + +afterEach(() => { + vi.restoreAllMocks(); +}); + +describe("isPidAlive", () => { + it("returns true for the current process", () => { + expect(isPidAlive(process.pid)).toBe(true); + }); + + it("returns false when signal 0 throws", () => { + vi.spyOn(process, "kill").mockImplementation(() => { + throw new Error("not found"); + }); + + expect(isPidAlive(999_999_999)).toBe(false); + }); +}); + +describe("gracefulStopPid", () => { + it.effect("sends graceful signals before SIGKILL when process remains alive", () => + Effect.gen(function* () { + const signals: Array = []; + vi.spyOn(process, "kill").mockImplementation(((_pid, signal) => { + signals.push(signal); + return true; + }) as typeof process.kill); + + yield* gracefulStopPid(1234, { + signals: ["SIGTERM", "SIGINT"], + signalDelayMs: 1, + killAfterMs: 3, + }); + + expect(signals.filter((signal) => signal !== 0)).toEqual(["SIGTERM", "SIGINT", "SIGKILL"]); + }), + ); + + it.effect("returns after the process exits from a graceful signal", () => + Effect.gen(function* () { + let alive = true; + const signals: Array = []; + vi.spyOn(process, "kill").mockImplementation(((_pid, signal) => { + signals.push(signal); + if (signal === "SIGTERM") alive = false; + if (signal === 0 && !alive) throw new Error("not found"); + return true; + }) as typeof process.kill); + + yield* gracefulStopPid(1234, { + signals: ["SIGTERM", "SIGINT"], + signalDelayMs: 1, + killAfterMs: 10, + }); + + expect(signals.filter((signal) => signal !== 0)).toEqual(["SIGTERM"]); + }), + ); + + it.effect("returns immediately if the process is already dead", () => + Effect.gen(function* () { + const signals: Array = []; + vi.spyOn(process, "kill").mockImplementation(((_pid, signal) => { + signals.push(signal); + if (signal === 0) throw new Error("not found"); + return true; + }) as typeof process.kill); + + yield* gracefulStopPid(1234, { + signalDelayMs: 1, + killAfterMs: 1, + }); + + expect(signals).toEqual([0]); + }), + ); + + it.effect("never fails when signal delivery throws", () => + Effect.gen(function* () { + vi.spyOn(process, "kill").mockImplementation(() => { + throw new Error("permission denied"); + }); + + yield* gracefulStopPid(1234, { + signalDelayMs: 1, + killAfterMs: 1, + }); + }), + ); +}); diff --git a/packages/core/supervisor/src/process.ts b/packages/core/supervisor/src/process.ts new file mode 100644 index 000000000..7e7dff64b --- /dev/null +++ b/packages/core/supervisor/src/process.ts @@ -0,0 +1,59 @@ +import { Effect } from "effect"; + +export interface GracefulStopOptions { + readonly signalDelayMs?: number; + readonly killAfterMs?: number; + readonly signals?: readonly NodeJS.Signals[]; +} + +const DEFAULT_SIGNAL_DELAY_MS = 500; +const DEFAULT_KILL_AFTER_MS = 5_000; +const DEFAULT_SIGNALS: readonly NodeJS.Signals[] = ["SIGTERM", "SIGINT"]; + +const sleep = (ms: number): Promise => new Promise((resolve) => setTimeout(resolve, ms)); + +export const isPidAlive = (pid: number): boolean => { + try { + process.kill(pid, 0); + return true; + } catch { + return false; + } +}; + +const sendSignal = (pid: number, signal: NodeJS.Signals): void => { + try { + process.kill(pid, signal); + } catch { + // The process may have exited between checks. Stop attempts are best-effort. + } +}; + +export const gracefulStopPid = ( + pid: number, + opts: GracefulStopOptions = {}, +): Effect.Effect => + Effect.promise(async () => { + if (!isPidAlive(pid)) return; + + const signals = opts.signals ?? DEFAULT_SIGNALS; + const signalDelayMs = opts.signalDelayMs ?? DEFAULT_SIGNAL_DELAY_MS; + const killAfterMs = opts.killAfterMs ?? DEFAULT_KILL_AFTER_MS; + const startedAt = Date.now(); + + for (const signal of signals) { + sendSignal(pid, signal); + await sleep(signalDelayMs); + if (!isPidAlive(pid)) return; + if (Date.now() - startedAt >= killAfterMs) break; + } + + const remainingMs = killAfterMs - (Date.now() - startedAt); + if (remainingMs > 0) { + await sleep(remainingMs); + } + + if (isPidAlive(pid)) { + sendSignal(pid, "SIGKILL"); + } + }).pipe(Effect.orElseSucceed(() => undefined)); diff --git a/packages/core/supervisor/src/readiness.test.ts b/packages/core/supervisor/src/readiness.test.ts new file mode 100644 index 000000000..545290042 --- /dev/null +++ b/packages/core/supervisor/src/readiness.test.ts @@ -0,0 +1,128 @@ +import { describe, expect, it } from "@effect/vitest"; +import { afterEach, vi } from "vitest"; +import { Effect } from "effect"; + +import { isReachable, pollReadiness } from "./readiness"; + +afterEach(() => { + vi.unstubAllGlobals(); +}); + +describe("isReachable", () => { + it.effect("returns true when fetch resolves with ok true", () => + Effect.gen(function* () { + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 204 }))), + ); + + const reachable = yield* isReachable("http://127.0.0.1:4788/api/scope"); + + expect(reachable).toBe(true); + }), + ); + + it.effect("returns false when fetch rejects", () => + Effect.gen(function* () { + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.reject(new Error("connection refused"))), + ); + + const reachable = yield* isReachable("http://127.0.0.1:4788/api/scope"); + + expect(reachable).toBe(false); + }), + ); + + it.effect("returns false when response is not ok", () => + Effect.gen(function* () { + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 500 }))), + ); + + const reachable = yield* isReachable("http://127.0.0.1:4788/api/scope"); + + expect(reachable).toBe(false); + }), + ); + + it.effect("honors probeTimeoutMs", () => + Effect.gen(function* () { + vi.stubGlobal( + "fetch", + vi.fn( + (_: string, init?: RequestInit) => + new Promise((_, reject) => { + init?.signal?.addEventListener("abort", () => + reject(new DOMException("Aborted", "AbortError")), + ); + }), + ), + ); + + const reachable = yield* isReachable("http://127.0.0.1:4788/api/scope", { + probeTimeoutMs: 1, + }); + + expect(reachable).toBe(false); + }), + ); +}); + +describe("pollReadiness", () => { + it.effect("returns immediately when already reachable", () => + Effect.gen(function* () { + const fetchMock = vi.fn(() => Promise.resolve(new Response(null, { status: 204 }))); + vi.stubGlobal("fetch", fetchMock); + + yield* pollReadiness("http://127.0.0.1:4788/api/scope", { + timeoutMs: 50, + intervalMs: 1, + }); + + expect(fetchMock).toHaveBeenCalledTimes(1); + }), + ); + + it.effect("retries until reachable", () => + Effect.gen(function* () { + let calls = 0; + vi.stubGlobal( + "fetch", + vi.fn(() => { + calls += 1; + return Promise.resolve(new Response(null, { status: calls >= 3 ? 204 : 503 })); + }), + ); + + yield* pollReadiness("http://127.0.0.1:4788/api/scope", { + timeoutMs: 100, + intervalMs: 1, + }); + + expect(calls).toBe(3); + }), + ); + + it.effect("fails with ReadinessTimeout after timeout", () => + Effect.gen(function* () { + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 503 }))), + ); + + const error = yield* Effect.flip( + pollReadiness("http://127.0.0.1:4788/api/scope", { + timeoutMs: 3, + intervalMs: 1, + }), + ); + + expect(error._tag).toBe("ReadinessTimeout"); + expect(error.url).toBe("http://127.0.0.1:4788/api/scope"); + expect(error.attempts).toBeGreaterThan(0); + }), + ); +}); diff --git a/packages/core/supervisor/src/readiness.ts b/packages/core/supervisor/src/readiness.ts new file mode 100644 index 000000000..555713fd3 --- /dev/null +++ b/packages/core/supervisor/src/readiness.ts @@ -0,0 +1,65 @@ +import { Effect } from "effect"; + +import { ReadinessTimeout } from "./errors.js"; + +export interface ReachabilityOptions { + readonly probeTimeoutMs?: number; + readonly headers?: Record; +} + +export interface ReadinessOptions extends ReachabilityOptions { + readonly timeoutMs?: number; + readonly intervalMs?: number; +} + +const DEFAULT_TIMEOUT_MS = 10_000; +const DEFAULT_INTERVAL_MS = 100; +const DEFAULT_PROBE_TIMEOUT_MS = 2_000; + +const sleep = (ms: number): Effect.Effect => + Effect.promise(() => new Promise((resolve) => setTimeout(resolve, ms))); + +export const isReachable = ( + url: string, + opts: ReachabilityOptions = {}, +): Effect.Effect => + Effect.tryPromise({ + try: async () => { + const response = await fetch(url, { + headers: opts.headers, + signal: AbortSignal.timeout(opts.probeTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS), + }); + return response.ok; + }, + catch: () => false, + }).pipe(Effect.orElseSucceed(() => false)); + +export const pollReadiness = ( + url: string, + opts: ReadinessOptions = {}, +): Effect.Effect => { + const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS; + const intervalMs = opts.intervalMs ?? DEFAULT_INTERVAL_MS; + const start = Date.now(); + + const loop = (attempts: number): Effect.Effect => + Effect.gen(function* () { + const reachable = yield* isReachable(url, opts); + const nextAttempts = attempts + 1; + if (reachable) return; + + const elapsedMs = Date.now() - start; + if (elapsedMs >= timeoutMs) { + return yield* new ReadinessTimeout({ + url, + elapsedMs, + attempts: nextAttempts, + }); + } + + yield* sleep(Math.min(intervalMs, timeoutMs - elapsedMs)); + return yield* loop(nextAttempts); + }); + + return loop(0); +}; diff --git a/packages/core/supervisor/tsconfig.json b/packages/core/supervisor/tsconfig.json new file mode 100644 index 000000000..66c6c2905 --- /dev/null +++ b/packages/core/supervisor/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "outDir": "dist", + "rootDir": "src", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "types": ["node"], + "plugins": [ + { + "name": "@effect/language-service", + "diagnosticSeverity": {} + } + ] + }, + "include": ["src"] +} diff --git a/packages/core/supervisor/vitest.config.ts b/packages/core/supervisor/vitest.config.ts new file mode 100644 index 000000000..ae847ff6d --- /dev/null +++ b/packages/core/supervisor/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["src/**/*.test.ts"], + }, +}); From 400e7323d3a7916cddccbd077ab370fe802e19ae Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Fri, 10 Apr 2026 23:11:05 +0530 Subject: [PATCH 02/11] feat(launchd): add launchd plugin for macOS service management Add @executor/plugin-launchd package exposing launchd.install, launchd.uninstall, launchd.start, launchd.stop, and launchd.status tools via the SDK plugin interface. Uses @executor/supervisor for graceful pid shutdown and readiness polling. --- packages/plugins/launchd/package.json | 58 ++++ packages/plugins/launchd/src/commands.ts | 200 ++++++++++++ packages/plugins/launchd/src/errors.ts | 28 ++ packages/plugins/launchd/src/index.ts | 6 + packages/plugins/launchd/src/launchctl.ts | 52 ++++ packages/plugins/launchd/src/plist.test.ts | 113 +++++++ packages/plugins/launchd/src/plist.ts | 90 ++++++ packages/plugins/launchd/src/plugin.test.ts | 64 ++++ packages/plugins/launchd/src/plugin.ts | 261 ++++++++++++++++ packages/plugins/launchd/src/promise.ts | 10 + .../plugins/launchd/src/supervisor.test.ts | 275 +++++++++++++++++ packages/plugins/launchd/src/supervisor.ts | 290 ++++++++++++++++++ packages/plugins/launchd/tsconfig.json | 22 ++ packages/plugins/launchd/tsup.config.ts | 13 + packages/plugins/launchd/vitest.config.ts | 7 + 15 files changed, 1489 insertions(+) create mode 100644 packages/plugins/launchd/package.json create mode 100644 packages/plugins/launchd/src/commands.ts create mode 100644 packages/plugins/launchd/src/errors.ts create mode 100644 packages/plugins/launchd/src/index.ts create mode 100644 packages/plugins/launchd/src/launchctl.ts create mode 100644 packages/plugins/launchd/src/plist.test.ts create mode 100644 packages/plugins/launchd/src/plist.ts create mode 100644 packages/plugins/launchd/src/plugin.test.ts create mode 100644 packages/plugins/launchd/src/plugin.ts create mode 100644 packages/plugins/launchd/src/promise.ts create mode 100644 packages/plugins/launchd/src/supervisor.test.ts create mode 100644 packages/plugins/launchd/src/supervisor.ts create mode 100644 packages/plugins/launchd/tsconfig.json create mode 100644 packages/plugins/launchd/tsup.config.ts create mode 100644 packages/plugins/launchd/vitest.config.ts diff --git a/packages/plugins/launchd/package.json b/packages/plugins/launchd/package.json new file mode 100644 index 000000000..79d19a7ba --- /dev/null +++ b/packages/plugins/launchd/package.json @@ -0,0 +1,58 @@ +{ + "name": "@executor/plugin-launchd", + "version": "0.0.1-beta.5", + "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/launchd", + "bugs": { + "url": "https://github.com/RhysSullivan/executor/issues" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/RhysSullivan/executor.git", + "directory": "packages/plugins/launchd" + }, + "files": [ + "dist" + ], + "type": "module", + "exports": { + ".": "./src/index.ts", + "./promise": "./src/promise.ts" + }, + "publishConfig": { + "access": "public", + "exports": { + ".": { + "import": { + "types": "./dist/promise.d.ts", + "default": "./dist/index.js" + } + }, + "./core": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/core.js" + } + } + } + }, + "scripts": { + "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", + "typecheck": "bunx tsc --noEmit -p tsconfig.json", + "test": "vitest run", + "test:watch": "vitest" + }, + "dependencies": { + "@effect/cli": "catalog:", + "@executor/sdk": "workspace:*", + "@executor/supervisor": "workspace:*", + "effect": "catalog:" + }, + "devDependencies": { + "@effect/vitest": "catalog:", + "@types/node": "catalog:", + "bun-types": "catalog:", + "tsup": "catalog:", + "vitest": "catalog:" + } +} diff --git a/packages/plugins/launchd/src/commands.ts b/packages/plugins/launchd/src/commands.ts new file mode 100644 index 000000000..207fd9111 --- /dev/null +++ b/packages/plugins/launchd/src/commands.ts @@ -0,0 +1,200 @@ +import { Command, Options } from "@effect/cli"; +import { Effect, Option } from "effect"; + +import { + installAgent, + printAgent, + startAgent, + stopAgent, + uninstallAgent, + type AgentStatus, + type InstallResult, + type LaunchdError, +} from "./supervisor.js"; + +const labelOpt = Options.text("label").pipe( + Options.optional, + Options.withDescription("LaunchAgent label"), +); +const plistOpt = Options.text("plist").pipe( + Options.optional, + Options.withDescription("Plist path override"), +); +const logFileOpt = Options.text("log-file").pipe( + Options.optional, + Options.withDescription("Log file path override"), +); +const portOpt = Options.integer("port").pipe( + Options.withDefault(4788), + Options.withDescription("Port the daemon should bind to"), +); +const scopeOpt = Options.text("scope").pipe( + Options.optional, + Options.withDescription("Scope directory"), +); +const jsonOpt = Options.boolean("json").pipe( + Options.withDefault(false), + Options.withDescription("Output as JSON"), +); + +const unwrap = (opt: Option.Option): T | undefined => Option.getOrUndefined(opt); + +const handleErrors = (effect: Effect.Effect): Effect.Effect => + effect.pipe( + Effect.catchTags({ + LaunchdUnsupportedPlatform: (err) => + Effect.sync(() => { + console.error(`Error: ${err.message}`); + process.exit(1); + }), + LaunchdBootstrapFailed: (err) => + Effect.sync(() => { + console.error(`launchctl bootstrap failed for ${err.label}:`); + console.error(err.stderr || err.stdout || `exit code ${err.code}`); + process.exit(1); + }), + LaunchdReadinessTimeout: (err) => + Effect.sync(() => { + console.error( + `Daemon failed to become reachable at ${err.url} within ${err.elapsedMs}ms; rolled back.`, + ); + process.exit(1); + }), + LaunchdBootoutFailed: (err) => + Effect.sync(() => { + console.error(`launchctl bootout failed for ${err.label}:`); + console.error(err.stderr || err.stdout || `exit code ${err.code}`); + process.exit(1); + }), + }), + ); + +const installCommand = Command.make( + "install", + { + label: labelOpt, + plist: plistOpt, + "log-file": logFileOpt, + port: portOpt, + scope: scopeOpt, + }, + ({ label, plist, "log-file": logFile, port, scope }) => + handleErrors( + installAgent({ + label: unwrap(label), + plistPath: unwrap(plist), + logPath: unwrap(logFile), + port, + scope: unwrap(scope), + }).pipe( + Effect.tap((result: InstallResult) => + Effect.sync(() => { + console.log(`Installed LaunchAgent: ${result.label}`); + console.log(`Plist: ${result.plistPath}`); + console.log(`Logs: ${result.logPath}`); + console.log(`URL: ${result.url}`); + }), + ), + ), + ), +).pipe(Command.withDescription("Install executor daemon as a macOS LaunchAgent")); + +const uninstallCommand = Command.make( + "uninstall", + { label: labelOpt, plist: plistOpt }, + ({ label, plist }) => + handleErrors( + uninstallAgent({ + label: unwrap(label), + plistPath: unwrap(plist), + }).pipe( + Effect.tap(() => + Effect.sync(() => { + console.log("Uninstalled executor LaunchAgent."); + }), + ), + ), + ), +).pipe(Command.withDescription("Uninstall the executor LaunchAgent")); + +const startCommand = Command.make( + "start", + { label: labelOpt, plist: plistOpt, port: portOpt }, + ({ label, plist, port }) => + handleErrors( + startAgent({ + label: unwrap(label), + plistPath: unwrap(plist), + port, + }).pipe( + Effect.tap(() => + Effect.sync(() => { + console.log("Started executor LaunchAgent."); + }), + ), + ), + ), +).pipe(Command.withDescription("(Re)load the executor LaunchAgent")); + +const stopCommand = Command.make("stop", { label: labelOpt, plist: plistOpt }, ({ label, plist }) => + handleErrors( + stopAgent({ + label: unwrap(label), + plistPath: unwrap(plist), + }).pipe( + Effect.tap(() => + Effect.sync(() => { + console.log("Stopped executor LaunchAgent."); + }), + ), + ), + ), +).pipe(Command.withDescription("Unload the executor LaunchAgent")); + +const statusCommand = Command.make( + "status", + { label: labelOpt, plist: plistOpt, json: jsonOpt }, + ({ label, plist, json }) => + printAgent({ + label: unwrap(label), + plistPath: unwrap(plist), + }).pipe( + Effect.tap((status: AgentStatus) => + Effect.sync(() => { + if (json) { + console.log(JSON.stringify(status, null, 2)); + return; + } + console.log(`Label: ${status.label}`); + console.log(`Plist: ${status.plistPath}`); + console.log(`Logs: ${status.logPath}`); + console.log(`URL: ${status.url}`); + console.log(`Installed: ${status.installed ? "yes" : "no"}`); + console.log( + `Running: ${status.running ? "yes" : "no"}${ + status.pid ? ` (pid ${status.pid})` : "" + }`, + ); + console.log(`Reachable: ${status.reachable ? "yes" : "no"}`); + }), + ), + Effect.catchTag("LaunchdUnsupportedPlatform", (err) => + Effect.sync(() => { + console.error(`Error: ${err.message}`); + process.exit(1); + }), + ), + ), +).pipe(Command.withDescription("Show executor LaunchAgent status")); + +export const makeServiceCommand = () => + Command.make("service").pipe( + Command.withSubcommands([ + installCommand, + uninstallCommand, + startCommand, + stopCommand, + statusCommand, + ] as const), + Command.withDescription("Manage the executor daemon as a macOS service"), + ); diff --git a/packages/plugins/launchd/src/errors.ts b/packages/plugins/launchd/src/errors.ts new file mode 100644 index 000000000..5f0d03044 --- /dev/null +++ b/packages/plugins/launchd/src/errors.ts @@ -0,0 +1,28 @@ +import { Data } from "effect"; + +export class LaunchdUnsupportedPlatform extends Data.TaggedError("LaunchdUnsupportedPlatform")<{ + readonly platform: string; + readonly message: string; +}> {} + +export class LaunchdBootstrapFailed extends Data.TaggedError("LaunchdBootstrapFailed")<{ + readonly label: string; + readonly plistPath: string; + readonly stdout: string; + readonly stderr: string; + readonly code: number; +}> {} + +export class LaunchdReadinessTimeout extends Data.TaggedError("LaunchdReadinessTimeout")<{ + readonly label: string; + readonly url: string; + readonly elapsedMs: number; +}> {} + +export class LaunchdBootoutFailed extends Data.TaggedError("LaunchdBootoutFailed")<{ + readonly label: string; + readonly plistPath: string; + readonly stdout: string; + readonly stderr: string; + readonly code: number; +}> {} diff --git a/packages/plugins/launchd/src/index.ts b/packages/plugins/launchd/src/index.ts new file mode 100644 index 000000000..18e270c76 --- /dev/null +++ b/packages/plugins/launchd/src/index.ts @@ -0,0 +1,6 @@ +export * from "./errors.js"; +export * from "./launchctl.js"; +export * from "./plist.js"; +export * from "./supervisor.js"; +export * from "./commands.js"; +export * from "./plugin.js"; diff --git a/packages/plugins/launchd/src/launchctl.ts b/packages/plugins/launchd/src/launchctl.ts new file mode 100644 index 000000000..35e7cb176 --- /dev/null +++ b/packages/plugins/launchd/src/launchctl.ts @@ -0,0 +1,52 @@ +import { execFile } from "node:child_process"; +import { promisify } from "node:util"; +import { Effect } from "effect"; + +const execFileAsync = promisify(execFile); + +export interface LaunchctlResult { + readonly stdout: string; + readonly stderr: string; + readonly code: number; +} + +interface ExecFileError { + readonly stdout?: unknown; + readonly stderr?: unknown; + readonly code?: unknown; + readonly message?: unknown; +} + +export const launchctl = (args: readonly string[]): Effect.Effect => + Effect.promise(async () => { + try { + const { stdout, stderr } = await execFileAsync("launchctl", [...args]); + return { + stdout: String(stdout ?? ""), + stderr: String(stderr ?? ""), + code: 0, + }; + } catch (raw) { + const err = raw as ExecFileError; + return { + stdout: err.stdout === undefined ? "" : String(err.stdout), + stderr: + err.stderr === undefined + ? err.message === undefined + ? "" + : String(err.message) + : String(err.stderr), + code: typeof err.code === "number" ? err.code : 1, + }; + } + }); + +export const getGuiDomain = (): string => + `gui/${typeof process.getuid === "function" ? process.getuid() : 0}`; + +export const parseLaunchdPid = (printOutput: string): number | undefined => { + const match = printOutput.match(/\bpid\s*=\s*(\d+)\b/); + if (!match?.[1]) return undefined; + const parsed = Number.parseInt(match[1], 10); + return Number.isFinite(parsed) ? parsed : undefined; +}; diff --git a/packages/plugins/launchd/src/plist.test.ts b/packages/plugins/launchd/src/plist.test.ts new file mode 100644 index 000000000..dc023e19e --- /dev/null +++ b/packages/plugins/launchd/src/plist.test.ts @@ -0,0 +1,113 @@ +import { homedir } from "node:os"; +import { join } from "node:path"; +import { describe, expect, it } from "@effect/vitest"; + +import { + DEFAULT_EXECUTOR_LAUNCHD_LABEL, + buildExecutorLaunchdPath, + getDefaultExecutorLogPath, + getDefaultLaunchAgentPath, + renderLaunchAgentPlist, +} from "./plist"; + +describe("renderLaunchAgentPlist", () => { + it("renders the core LaunchAgent keys", () => { + const plist = renderLaunchAgentPlist({ + label: "sh.executor.daemon", + program: "/usr/local/bin/executor", + args: ["web", "--port", "4788"], + stdoutPath: "/tmp/executor.log", + stderrPath: "/tmp/executor.err.log", + }); + + expect(plist).toContain("Label"); + expect(plist).toContain("sh.executor.daemon"); + expect(plist).toContain("ProgramArguments"); + expect(plist).toContain("/usr/local/bin/executor"); + expect(plist).toContain("web"); + expect(plist).toContain("--port"); + expect(plist).toContain("4788"); + expect(plist).toContain("RunAtLoad"); + expect(plist).toContain("KeepAlive"); + expect(plist).toContain("StandardOutPath"); + expect(plist).toContain("/tmp/executor.log"); + expect(plist).toContain("StandardErrorPath"); + expect(plist).toContain("/tmp/executor.err.log"); + }); + + it("renders environment variables when present", () => { + const plist = renderLaunchAgentPlist({ + label: "sh.executor.daemon", + program: "/usr/local/bin/executor", + args: ["web"], + stdoutPath: "/tmp/executor.log", + stderrPath: "/tmp/executor.log", + environment: { + PATH: "/opt/homebrew/bin:/usr/bin", + EXECUTOR_SCOPE_DIR: "/Users/saatvik/work", + }, + }); + + expect(plist).toContain("EnvironmentVariables"); + expect(plist).toContain("PATH"); + expect(plist).toContain("/opt/homebrew/bin:/usr/bin"); + expect(plist).toContain("EXECUTOR_SCOPE_DIR"); + expect(plist).toContain("/Users/saatvik/work"); + }); + + it("omits environment variables when empty", () => { + const plist = renderLaunchAgentPlist({ + label: "sh.executor.daemon", + program: "/usr/local/bin/executor", + args: ["web"], + stdoutPath: "/tmp/executor.log", + stderrPath: "/tmp/executor.log", + environment: {}, + }); + + expect(plist).not.toContain("EnvironmentVariables"); + }); + + it("escapes XML special characters", () => { + const plist = renderLaunchAgentPlist({ + label: `sh.executor.daemon&<>"'`, + program: `/tmp/executor&<>"'`, + args: [`web&<>"'`], + stdoutPath: `/tmp/out&<>"'.log`, + stderrPath: `/tmp/err&<>"'.log`, + environment: { + [`KEY&<>"'`]: `VALUE&<>"'`, + }, + }); + + expect(plist).toContain("sh.executor.daemon&<>"'"); + expect(plist).toContain("/tmp/executor&<>"'"); + expect(plist).toContain("web&<>"'"); + expect(plist).toContain("KEY&<>"'"); + expect(plist).toContain("VALUE&<>"'"); + }); +}); + +describe("path helpers", () => { + it("builds a launchd-friendly PATH and dedupes entries", () => { + const path = buildExecutorLaunchdPath("/usr/bin:/custom/bin:/opt/homebrew/bin"); + const parts = path.split(":"); + + expect(parts).toContain(join(homedir(), ".bun", "bin")); + expect(parts).toContain("/opt/homebrew/bin"); + expect(parts).toContain("/usr/local/bin"); + expect(parts).toContain("/usr/bin"); + expect(parts).toContain("/bin"); + expect(parts).toContain("/custom/bin"); + expect(parts.filter((entry) => entry === "/usr/bin")).toHaveLength(1); + expect(parts.filter((entry) => entry === "/opt/homebrew/bin")).toHaveLength(1); + }); + + it("returns executor default paths", () => { + expect(DEFAULT_EXECUTOR_LAUNCHD_LABEL).toBe("sh.executor.daemon"); + expect(getDefaultLaunchAgentPath("sh.executor.daemon")).toBe( + join(homedir(), "Library", "LaunchAgents", "sh.executor.daemon.plist"), + ); + expect(getDefaultExecutorLogPath()).toBe(join(homedir(), ".executor", "daemon.log")); + }); +}); diff --git a/packages/plugins/launchd/src/plist.ts b/packages/plugins/launchd/src/plist.ts new file mode 100644 index 000000000..b2415c227 --- /dev/null +++ b/packages/plugins/launchd/src/plist.ts @@ -0,0 +1,90 @@ +import { homedir } from "node:os"; +import { join } from "node:path"; + +export const DEFAULT_EXECUTOR_LAUNCHD_LABEL = "sh.executor.daemon"; + +export interface LaunchdServiceSpec { + readonly label: string; + readonly program: string; + readonly args: readonly string[]; + readonly stdoutPath: string; + readonly stderrPath: string; + readonly environment?: Readonly>; +} + +export const getDefaultLaunchAgentPath = (label: string): string => + join(homedir(), "Library", "LaunchAgents", `${label}.plist`); + +export const getDefaultExecutorLogPath = (): string => join(homedir(), ".executor", "daemon.log"); + +export const buildExecutorLaunchdPath = (currentPath?: string): string => { + const preferred = [ + join(homedir(), ".bun", "bin"), + join(homedir(), ".local", "bin"), + join(homedir(), "bin"), + join(homedir(), ".cargo", "bin"), + "/opt/homebrew/bin", + "/opt/homebrew/sbin", + "/usr/local/bin", + "/usr/local/sbin", + "/usr/bin", + "/bin", + "/usr/sbin", + "/sbin", + ]; + const extras = (currentPath ?? "") + .split(":") + .map((p) => p.trim()) + .filter((p) => p.length > 0); + const seen = new Set(); + return [...preferred, ...extras] + .filter((p) => { + if (seen.has(p)) return false; + seen.add(p); + return true; + }) + .join(":"); +}; + +const xmlEscape = (value: string): string => + value + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); + +export const renderLaunchAgentPlist = (spec: LaunchdServiceSpec): string => { + const programArgs = [spec.program, ...spec.args] + .map((arg) => `\t\t${xmlEscape(arg)}`) + .join("\n"); + + const envEntries = Object.entries(spec.environment ?? {}) + .filter(([, value]) => value.length > 0) + .map( + ([key, value]) => + `\t\t${xmlEscape(key)}\n\t\t${xmlEscape(value)}`, + ) + .join("\n"); + + const envBlock = + envEntries.length > 0 + ? `\tEnvironmentVariables\n\t\n${envEntries}\n\t\n` + : ""; + + return ( + `\n` + + `\n` + + `\n` + + `\n` + + `\tLabel\n\t${xmlEscape(spec.label)}\n` + + `\tProgramArguments\n\t\n${programArgs}\n\t\n` + + `\tRunAtLoad\n\t\n` + + `\tKeepAlive\n\t\n` + + envBlock + + `\tStandardOutPath\n\t${xmlEscape(spec.stdoutPath)}\n` + + `\tStandardErrorPath\n\t${xmlEscape(spec.stderrPath)}\n` + + `\n` + + `\n` + ); +}; diff --git a/packages/plugins/launchd/src/plugin.test.ts b/packages/plugins/launchd/src/plugin.test.ts new file mode 100644 index 000000000..c53e02780 --- /dev/null +++ b/packages/plugins/launchd/src/plugin.test.ts @@ -0,0 +1,64 @@ +import { describe, expect, it } from "@effect/vitest"; +import { Effect } from "effect"; +import { ElicitationResponse, createExecutor, makeTestConfig } from "@executor/sdk"; + +import { launchdPlugin } from "./plugin"; + +describe("launchdPlugin", () => { + it.effect("registers runtime tools with approval annotations", () => + Effect.gen(function* () { + const executor = yield* createExecutor( + makeTestConfig({ + plugins: [ + launchdPlugin({ + label: "test.executor.daemon", + plistPath: "/tmp/test.executor.daemon.plist", + logPath: "/tmp/test.executor.daemon.log", + }), + ] as const, + }), + ); + + expect(executor.launchd.displayName).toBe("macOS launchd"); + expect(executor.launchd.isSupported).toBeTypeOf("boolean"); + expect(executor.launchd.label).toBe("test.executor.daemon"); + + const tools = yield* executor.tools.list(); + const launchdTools = tools.filter((tool) => tool.pluginKey === "launchd"); + const launchdToolNames = launchdTools.map((tool) => tool.name).sort(); + + expect(launchdToolNames).toEqual([ + "launchd.install", + "launchd.start", + "launchd.status", + "launchd.stop", + "launchd.uninstall", + ]); + + const installSchema = yield* executor.tools.schema("launchd.install"); + expect(installSchema.inputSchema).toBeDefined(); + }), + ); + + it.effect("approval decline prevents mutating tool invocation", () => + Effect.gen(function* () { + const executor = yield* createExecutor( + makeTestConfig({ + plugins: [launchdPlugin()] as const, + }), + ); + + const error = yield* Effect.flip( + executor.tools.invoke( + "launchd.install", + {}, + { + onElicitation: () => Effect.succeed(new ElicitationResponse({ action: "decline" })), + }, + ), + ); + + expect(error._tag).toBe("ElicitationDeclinedError"); + }), + ); +}); diff --git a/packages/plugins/launchd/src/plugin.ts b/packages/plugins/launchd/src/plugin.ts new file mode 100644 index 000000000..74b0c979d --- /dev/null +++ b/packages/plugins/launchd/src/plugin.ts @@ -0,0 +1,261 @@ +import { Effect, JSONSchema, Schema } from "effect"; +import { + ToolAnnotations, + ToolId, + ToolInvocationError, + ToolInvocationResult, + definePlugin, + type ExecutorPlugin, + type PluginContext, + type RuntimeToolHandler, + type ToolRegistration, +} from "@executor/sdk"; + +import { installAgent, printAgent, startAgent, stopAgent, uninstallAgent } from "./supervisor.js"; +import { + DEFAULT_EXECUTOR_LAUNCHD_LABEL, + getDefaultExecutorLogPath, + getDefaultLaunchAgentPath, +} from "./plist.js"; + +export interface LaunchdPluginConfig { + readonly label?: string; + readonly plistPath?: string; + readonly logPath?: string; + readonly defaultPort?: number; +} + +export interface LaunchdExtension { + readonly displayName: string; + readonly isSupported: boolean; + readonly label: string; + readonly plistPath: string; + readonly logPath: string; +} + +const InstallInputSchema = Schema.Struct({ + port: Schema.optional(Schema.Number), + scope: Schema.optional(Schema.String), +}); + +const EmptyInputSchema = Schema.Struct({}); + +const PLUGIN_KEY = "launchd" as const; +const RUNTIME_SOURCE_ID = "built-in"; + +const resolveConfig = (config?: LaunchdPluginConfig) => { + const label = config?.label ?? DEFAULT_EXECUTOR_LAUNCHD_LABEL; + return { + label, + plistPath: config?.plistPath ?? getDefaultLaunchAgentPath(label), + logPath: config?.logPath ?? getDefaultExecutorLogPath(), + defaultPort: config?.defaultPort ?? 4788, + }; +}; + +const errorMessage = (err: unknown): string => { + if (err instanceof Error) return err.message; + if (typeof err === "object" && err !== null && "_tag" in err && typeof err._tag === "string") { + return err._tag; + } + return String(err); +}; + +interface BuildHandlerArgs { + readonly toolId: ToolId; + readonly inputSchema: Schema.Schema; + readonly effect: (input: TInput) => Effect.Effect; + readonly annotations?: ToolAnnotations; +} + +const buildHandler = (args: BuildHandlerArgs): RuntimeToolHandler => { + const decode = Schema.decodeUnknownSync(args.inputSchema); + + return { + invoke: (rawArgs) => + Effect.try({ + try: () => decode(rawArgs), + catch: (err) => + new ToolInvocationError({ + toolId: args.toolId, + message: `Invalid input: ${errorMessage(err)}`, + cause: err, + }), + }).pipe( + Effect.flatMap((input) => args.effect(input as TInput)), + Effect.map((data) => new ToolInvocationResult({ data, error: null })), + Effect.mapError((err) => + err instanceof ToolInvocationError + ? err + : new ToolInvocationError({ + toolId: args.toolId, + message: errorMessage(err), + cause: err, + }), + ), + ), + resolveAnnotations: args.annotations ? () => Effect.succeed(args.annotations) : undefined, + }; +}; + +const inputSchema = (schema: Schema.Schema): unknown => + JSONSchema.make(schema); + +const approval = (description: string): ToolAnnotations => + new ToolAnnotations({ + requiresApproval: true, + approvalDescription: description, + }); + +export const launchdPlugin = ( + config?: LaunchdPluginConfig, +): ExecutorPlugin => + definePlugin({ + key: PLUGIN_KEY, + init: (ctx: PluginContext) => + Effect.gen(function* () { + const cfg = resolveConfig(config); + + const statusId = ToolId.make("launchd.status"); + const installId = ToolId.make("launchd.install"); + const uninstallId = ToolId.make("launchd.uninstall"); + const startId = ToolId.make("launchd.start"); + const stopId = ToolId.make("launchd.stop"); + + const registrations: readonly ToolRegistration[] = [ + { + id: statusId, + pluginKey: PLUGIN_KEY, + sourceId: RUNTIME_SOURCE_ID, + name: "launchd.status", + description: "Show the status of the executor macOS LaunchAgent", + inputSchema: inputSchema(EmptyInputSchema), + }, + { + id: installId, + pluginKey: PLUGIN_KEY, + sourceId: RUNTIME_SOURCE_ID, + name: "launchd.install", + description: "Install the executor daemon as a macOS LaunchAgent", + mayElicit: true, + inputSchema: inputSchema(InstallInputSchema), + }, + { + id: uninstallId, + pluginKey: PLUGIN_KEY, + sourceId: RUNTIME_SOURCE_ID, + name: "launchd.uninstall", + description: "Uninstall the executor LaunchAgent", + mayElicit: true, + inputSchema: inputSchema(EmptyInputSchema), + }, + { + id: startId, + pluginKey: PLUGIN_KEY, + sourceId: RUNTIME_SOURCE_ID, + name: "launchd.start", + description: "(Re)load the executor LaunchAgent", + mayElicit: true, + inputSchema: inputSchema(EmptyInputSchema), + }, + { + id: stopId, + pluginKey: PLUGIN_KEY, + sourceId: RUNTIME_SOURCE_ID, + name: "launchd.stop", + description: "Unload the executor LaunchAgent", + mayElicit: true, + inputSchema: inputSchema(EmptyInputSchema), + }, + ]; + + yield* ctx.tools.registerRuntime(registrations); + + yield* ctx.tools.registerRuntimeHandler( + statusId, + buildHandler({ + toolId: statusId, + inputSchema: EmptyInputSchema, + effect: () => + printAgent({ + label: cfg.label, + plistPath: cfg.plistPath, + logPath: cfg.logPath, + port: cfg.defaultPort, + }), + }), + ); + + yield* ctx.tools.registerRuntimeHandler( + installId, + buildHandler({ + toolId: installId, + inputSchema: InstallInputSchema, + effect: (input) => + installAgent({ + label: cfg.label, + plistPath: cfg.plistPath, + logPath: cfg.logPath, + port: input.port ?? cfg.defaultPort, + scope: input.scope, + }), + annotations: approval("Install executor daemon as a macOS LaunchAgent"), + }), + ); + + yield* ctx.tools.registerRuntimeHandler( + uninstallId, + buildHandler({ + toolId: uninstallId, + inputSchema: EmptyInputSchema, + effect: () => + uninstallAgent({ + label: cfg.label, + plistPath: cfg.plistPath, + }), + annotations: approval("Uninstall the executor LaunchAgent"), + }), + ); + + yield* ctx.tools.registerRuntimeHandler( + startId, + buildHandler({ + toolId: startId, + inputSchema: EmptyInputSchema, + effect: () => + startAgent({ + label: cfg.label, + plistPath: cfg.plistPath, + port: cfg.defaultPort, + }), + annotations: approval("(Re)load the executor LaunchAgent"), + }), + ); + + yield* ctx.tools.registerRuntimeHandler( + stopId, + buildHandler({ + toolId: stopId, + inputSchema: EmptyInputSchema, + effect: () => + stopAgent({ + label: cfg.label, + plistPath: cfg.plistPath, + }), + annotations: approval("Stop the executor LaunchAgent"), + }), + ); + + return { + extension: { + displayName: "macOS launchd", + isSupported: process.platform === "darwin", + label: cfg.label, + plistPath: cfg.plistPath, + logPath: cfg.logPath, + }, + close: () => + ctx.tools.unregisterRuntime([statusId, installId, uninstallId, startId, stopId]), + }; + }), + }); diff --git a/packages/plugins/launchd/src/promise.ts b/packages/plugins/launchd/src/promise.ts new file mode 100644 index 000000000..12926ece6 --- /dev/null +++ b/packages/plugins/launchd/src/promise.ts @@ -0,0 +1,10 @@ +import { launchdPlugin as launchdPluginEffect } from "./index"; + +export type { LaunchdPluginConfig } from "./index"; + +export const launchdPlugin = (config?: { + readonly label?: string; + readonly plistPath?: string; + readonly logPath?: string; + readonly defaultPort?: number; +}) => launchdPluginEffect(config); diff --git a/packages/plugins/launchd/src/supervisor.test.ts b/packages/plugins/launchd/src/supervisor.test.ts new file mode 100644 index 000000000..b49958efb --- /dev/null +++ b/packages/plugins/launchd/src/supervisor.test.ts @@ -0,0 +1,275 @@ +import { mkdtemp, readFile, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { describe, expect, it } from "@effect/vitest"; +import { afterEach, beforeEach, vi } from "vitest"; +import { Effect } from "effect"; + +const launchdMocks = vi.hoisted(() => ({ + getGuiDomain: vi.fn(() => "gui/501"), + launchctl: vi.fn(), + parseLaunchdPid: vi.fn((output: string) => { + const match = output.match(/\bpid\s*=\s*(\d+)\b/); + return match?.[1] ? Number.parseInt(match[1], 10) : undefined; + }), +})); + +vi.mock("./launchctl.js", () => launchdMocks); + +import { installAgent, printAgent, startAgent, stopAgent } from "./supervisor"; + +const originalPlatform = process.platform; + +const setPlatform = (platform: NodeJS.Platform) => { + Object.defineProperty(process, "platform", { + configurable: true, + value: platform, + }); +}; + +beforeEach(() => { + setPlatform("darwin"); + launchdMocks.getGuiDomain.mockReturnValue("gui/501"); + launchdMocks.launchctl.mockReset(); + launchdMocks.launchctl.mockReturnValue(Effect.succeed({ stdout: "", stderr: "", code: 0 })); + launchdMocks.parseLaunchdPid.mockClear(); + vi.unstubAllGlobals(); +}); + +afterEach(() => { + Object.defineProperty(process, "platform", { + configurable: true, + value: originalPlatform, + }); + vi.unstubAllGlobals(); + vi.restoreAllMocks(); +}); + +const makeTempPaths = async () => { + const dir = await mkdtemp(join(tmpdir(), "executor-launchd-test-")); + return { + dir, + plistPath: join(dir, "test.executor.daemon.plist"), + logPath: join(dir, "daemon.log"), + }; +}; + +describe("installAgent", () => { + it.effect("writes a plist, bootstraps, kickstarts, and waits for readiness", () => + Effect.gen(function* () { + const paths = yield* Effect.promise(makeTempPaths); + let fetchCalls = 0; + vi.stubGlobal( + "fetch", + vi.fn(() => { + fetchCalls += 1; + return Promise.resolve(new Response(null, { status: fetchCalls === 1 ? 503 : 204 })); + }), + ); + + const result = yield* installAgent({ + label: "test.executor.daemon", + plistPath: paths.plistPath, + logPath: paths.logPath, + port: 4999, + readinessTimeoutMs: 50, + programArgs: ["web", "--port", "4999"], + }); + + const plist = yield* Effect.promise(() => readFile(paths.plistPath, "utf8")); + + expect(result.url).toBe("http://127.0.0.1:4999/api/scope"); + expect(plist).toContain("test.executor.daemon"); + expect(plist).toContain("web"); + expect(plist).toContain("4999"); + expect(launchdMocks.launchctl).toHaveBeenCalledWith(["bootout", "gui/501", paths.plistPath]); + expect(launchdMocks.launchctl).toHaveBeenCalledWith([ + "bootstrap", + "gui/501", + paths.plistPath, + ]); + expect(launchdMocks.launchctl).toHaveBeenCalledWith([ + "kickstart", + "-k", + "gui/501/test.executor.daemon", + ]); + + yield* Effect.promise(() => rm(paths.dir, { recursive: true, force: true })); + }), + ); + + it.effect("skips kickstart when the target URL is already reachable", () => + Effect.gen(function* () { + const paths = yield* Effect.promise(makeTempPaths); + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 204 }))), + ); + + yield* installAgent({ + label: "test.executor.daemon", + plistPath: paths.plistPath, + logPath: paths.logPath, + readinessTimeoutMs: 50, + programArgs: ["web"], + }); + + expect(launchdMocks.launchctl).not.toHaveBeenCalledWith([ + "kickstart", + "-k", + "gui/501/test.executor.daemon", + ]); + + yield* Effect.promise(() => rm(paths.dir, { recursive: true, force: true })); + }), + ); + + it.effect("rolls back bootstrapped service on readiness timeout", () => + Effect.gen(function* () { + const paths = yield* Effect.promise(makeTempPaths); + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 503 }))), + ); + + const error = yield* Effect.flip( + installAgent({ + label: "test.executor.daemon", + plistPath: paths.plistPath, + logPath: paths.logPath, + readinessTimeoutMs: 3, + programArgs: ["web"], + }), + ); + + expect(error._tag).toBe("LaunchdReadinessTimeout"); + expect( + launchdMocks.launchctl.mock.calls.filter( + ([args]) => Array.isArray(args) && args[0] === "bootout", + ), + ).toHaveLength(2); + + yield* Effect.promise(() => rm(paths.dir, { recursive: true, force: true })); + }), + ); + + it.effect("fails when bootstrap fails", () => + Effect.gen(function* () { + const paths = yield* Effect.promise(makeTempPaths); + launchdMocks.launchctl.mockImplementation((args: readonly string[]) => + Effect.succeed( + args[0] === "bootstrap" + ? { stdout: "", stderr: "bootstrap failed", code: 5 } + : { stdout: "", stderr: "", code: 0 }, + ), + ); + + const error = yield* Effect.flip( + installAgent({ + label: "test.executor.daemon", + plistPath: paths.plistPath, + logPath: paths.logPath, + programArgs: ["web"], + }), + ); + + expect(error._tag).toBe("LaunchdBootstrapFailed"); + if (error._tag === "LaunchdBootstrapFailed") { + expect(error.stderr).toBe("bootstrap failed"); + } + + yield* Effect.promise(() => rm(paths.dir, { recursive: true, force: true })); + }), + ); +}); + +describe("agent operations", () => { + it.effect("prints status", () => + Effect.gen(function* () { + const paths = yield* Effect.promise(makeTempPaths); + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 204 }))), + ); + launchdMocks.launchctl.mockReturnValue( + Effect.succeed({ stdout: "pid = 42", stderr: "", code: 0 }), + ); + + const status = yield* printAgent({ + label: "test.executor.daemon", + plistPath: paths.plistPath, + logPath: paths.logPath, + }); + + expect(status.running).toBe(true); + expect(status.pid).toBe(42); + expect(status.reachable).toBe(true); + expect(status.installed).toBe(false); + + yield* Effect.promise(() => rm(paths.dir, { recursive: true, force: true })); + }), + ); + + it.effect("startAgent reloads the plist and waits for readiness", () => + Effect.gen(function* () { + vi.stubGlobal( + "fetch", + vi.fn(() => Promise.resolve(new Response(null, { status: 204 }))), + ); + + yield* startAgent({ + label: "test.executor.daemon", + plistPath: "/tmp/test.executor.daemon.plist", + readinessTimeoutMs: 50, + }); + + expect(launchdMocks.launchctl).toHaveBeenCalledWith([ + "bootout", + "gui/501", + "/tmp/test.executor.daemon.plist", + ]); + expect(launchdMocks.launchctl).toHaveBeenCalledWith([ + "bootstrap", + "gui/501", + "/tmp/test.executor.daemon.plist", + ]); + expect(launchdMocks.launchctl).toHaveBeenCalledWith([ + "kickstart", + "-k", + "gui/501/test.executor.daemon", + ]); + }), + ); + + it.effect("stopAgent gracefully stops the pid before bootout", () => + Effect.gen(function* () { + let alive = true; + const signals: Array = []; + vi.spyOn(process, "kill").mockImplementation(((_pid, signal) => { + signals.push(signal); + if (signal === "SIGTERM") alive = false; + if (signal === 0 && !alive) throw new Error("not found"); + return true; + }) as typeof process.kill); + launchdMocks.launchctl.mockImplementation((args: readonly string[]) => + Effect.succeed( + args[0] === "print" + ? { stdout: "pid = 42", stderr: "", code: 0 } + : { stdout: "", stderr: "", code: 0 }, + ), + ); + + yield* stopAgent({ + label: "test.executor.daemon", + plistPath: "/tmp/test.executor.daemon.plist", + }); + + expect(signals.filter((signal) => signal !== 0)).toContain("SIGTERM"); + expect(launchdMocks.launchctl).toHaveBeenCalledWith([ + "bootout", + "gui/501", + "/tmp/test.executor.daemon.plist", + ]); + }), + ); +}); diff --git a/packages/plugins/launchd/src/supervisor.ts b/packages/plugins/launchd/src/supervisor.ts new file mode 100644 index 000000000..ffa1f921d --- /dev/null +++ b/packages/plugins/launchd/src/supervisor.ts @@ -0,0 +1,290 @@ +import { existsSync } from "node:fs"; +import { mkdir, rm, writeFile } from "node:fs/promises"; +import { homedir } from "node:os"; +import { dirname, resolve } from "node:path"; +import { Effect } from "effect"; +import { gracefulStopPid, isPidAlive, isReachable, pollReadiness } from "@executor/supervisor"; + +import { + DEFAULT_EXECUTOR_LAUNCHD_LABEL, + buildExecutorLaunchdPath, + getDefaultExecutorLogPath, + getDefaultLaunchAgentPath, + renderLaunchAgentPlist, + type LaunchdServiceSpec, +} from "./plist.js"; +import { getGuiDomain, launchctl, parseLaunchdPid } from "./launchctl.js"; +import { + LaunchdBootoutFailed, + LaunchdBootstrapFailed, + LaunchdReadinessTimeout, + LaunchdUnsupportedPlatform, +} from "./errors.js"; + +export interface InstallOptions { + readonly label?: string; + readonly plistPath?: string; + readonly logPath?: string; + readonly port?: number; + readonly scope?: string; + readonly readinessUrl?: string; + readonly readinessTimeoutMs?: number; + readonly programArgs?: readonly string[]; +} + +export interface InstallResult { + readonly label: string; + readonly plistPath: string; + readonly logPath: string; + readonly url: string; +} + +export interface AgentStatus { + readonly label: string; + readonly plistPath: string; + readonly logPath: string; + readonly installed: boolean; + readonly running: boolean; + readonly pid?: number; + readonly reachable: boolean; + readonly url: string; +} + +export type LaunchdError = + | LaunchdUnsupportedPlatform + | LaunchdBootstrapFailed + | LaunchdReadinessTimeout + | LaunchdBootoutFailed; + +const DEFAULT_PORT = 4788; + +const requireDarwin = (): Effect.Effect => + process.platform === "darwin" + ? Effect.void + : Effect.fail( + new LaunchdUnsupportedPlatform({ + platform: process.platform, + message: `macOS launchd is only supported on darwin (got ${process.platform})`, + }), + ); + +const expandHome = (path: string): string => { + if (path === "~") return homedir(); + if (path.startsWith("~/")) return resolve(homedir(), path.slice(2)); + return resolve(path); +}; + +const resolveConfig = (opts: InstallOptions = {}) => { + const label = opts.label ?? DEFAULT_EXECUTOR_LAUNCHD_LABEL; + const plistPath = opts.plistPath ? expandHome(opts.plistPath) : getDefaultLaunchAgentPath(label); + const logPath = opts.logPath ? expandHome(opts.logPath) : getDefaultExecutorLogPath(); + const port = opts.port ?? DEFAULT_PORT; + const url = opts.readinessUrl ?? `http://127.0.0.1:${port}/api/scope`; + const readinessTimeoutMs = opts.readinessTimeoutMs ?? 10_000; + return { + label, + plistPath, + logPath, + port, + url, + readinessTimeoutMs, + scope: opts.scope, + }; +}; + +const resolveCliEntry = (): readonly string[] => { + const script = process.argv[1]; + if (!script || resolve(script) === resolve(process.execPath)) return []; + return [resolve(script)]; +}; + +const buildProgramArgs = ( + port: number, + scope: string | undefined, + override: readonly string[] | undefined, +): readonly string[] => { + if (override) return override; + return [ + ...resolveCliEntry(), + "web", + "--port", + String(port), + ...(scope ? ["--scope", scope] : []), + ]; +}; + +const makeBootstrapFailed = ( + label: string, + plistPath: string, + result: { readonly stdout: string; readonly stderr: string; readonly code: number }, +) => + new LaunchdBootstrapFailed({ + label, + plistPath, + stdout: result.stdout, + stderr: result.stderr, + code: result.code, + }); + +export const installAgent = ( + opts: InstallOptions = {}, +): Effect.Effect => + Effect.gen(function* () { + yield* requireDarwin(); + const cfg = resolveConfig(opts); + const domain = getGuiDomain(); + const target = `${domain}/${cfg.label}`; + + yield* Effect.promise(async () => { + await mkdir(dirname(cfg.plistPath), { recursive: true }); + await mkdir(dirname(cfg.logPath), { recursive: true }); + }).pipe(Effect.orDie); + + const spec: LaunchdServiceSpec = { + label: cfg.label, + program: process.execPath, + args: buildProgramArgs(cfg.port, cfg.scope, opts.programArgs), + stdoutPath: cfg.logPath, + stderrPath: cfg.logPath, + environment: { PATH: buildExecutorLaunchdPath(process.env.PATH) }, + }; + + yield* Effect.promise(() => + writeFile(cfg.plistPath, renderLaunchAgentPlist(spec), "utf8"), + ).pipe(Effect.orDie); + + yield* launchctl(["bootout", domain, cfg.plistPath]); + const boot = yield* launchctl(["bootstrap", domain, cfg.plistPath]); + if (boot.code !== 0) { + return yield* makeBootstrapFailed(cfg.label, cfg.plistPath, boot); + } + + const alreadyReachable = yield* isReachable(cfg.url, { probeTimeoutMs: 500 }); + if (!alreadyReachable) { + yield* launchctl(["kickstart", "-k", target]); + } + + yield* pollReadiness(cfg.url, { + timeoutMs: cfg.readinessTimeoutMs, + intervalMs: 100, + }).pipe( + Effect.catchTag("ReadinessTimeout", (err) => + Effect.gen(function* () { + yield* launchctl(["bootout", domain, cfg.plistPath]); + return yield* new LaunchdReadinessTimeout({ + label: cfg.label, + url: err.url, + elapsedMs: err.elapsedMs, + }); + }), + ), + ); + + return { + label: cfg.label, + plistPath: cfg.plistPath, + logPath: cfg.logPath, + url: cfg.url, + }; + }); + +export const startAgent = ( + opts: Pick< + InstallOptions, + "label" | "plistPath" | "port" | "readinessUrl" | "readinessTimeoutMs" + > = {}, +): Effect.Effect => + Effect.gen(function* () { + yield* requireDarwin(); + const cfg = resolveConfig(opts); + const domain = getGuiDomain(); + const target = `${domain}/${cfg.label}`; + + yield* launchctl(["bootout", domain, cfg.plistPath]); + const boot = yield* launchctl(["bootstrap", domain, cfg.plistPath]); + if (boot.code !== 0) { + return yield* makeBootstrapFailed(cfg.label, cfg.plistPath, boot); + } + + yield* launchctl(["kickstart", "-k", target]); + + yield* pollReadiness(cfg.url, { + timeoutMs: cfg.readinessTimeoutMs, + intervalMs: 100, + }).pipe( + Effect.catchTag("ReadinessTimeout", (err) => + Effect.fail( + new LaunchdReadinessTimeout({ + label: cfg.label, + url: err.url, + elapsedMs: err.elapsedMs, + }), + ), + ), + ); + }); + +export const stopAgent = ( + opts: Pick = {}, +): Effect.Effect => + Effect.gen(function* () { + yield* requireDarwin(); + const cfg = resolveConfig(opts); + const domain = getGuiDomain(); + const target = `${domain}/${cfg.label}`; + + const printRes = yield* launchctl(["print", target]); + if (printRes.code === 0) { + const pid = parseLaunchdPid(printRes.stdout); + if (pid !== undefined && isPidAlive(pid)) { + yield* gracefulStopPid(pid, { + signals: ["SIGTERM", "SIGINT"], + signalDelayMs: 500, + killAfterMs: 5_000, + }); + } + } + + const bootout = yield* launchctl(["bootout", domain, cfg.plistPath]); + if (printRes.code === 0 && bootout.code !== 0) { + return yield* new LaunchdBootoutFailed({ + label: cfg.label, + plistPath: cfg.plistPath, + stdout: bootout.stdout, + stderr: bootout.stderr, + code: bootout.code, + }); + } + }); + +export const uninstallAgent = ( + opts: Pick = {}, +): Effect.Effect => + Effect.gen(function* () { + yield* stopAgent(opts); + const cfg = resolveConfig(opts); + yield* Effect.promise(() => rm(cfg.plistPath, { force: true })).pipe(Effect.orDie); + }); + +export const printAgent = ( + opts: Pick = {}, +): Effect.Effect => + Effect.gen(function* () { + yield* requireDarwin(); + const cfg = resolveConfig(opts); + const target = `${getGuiDomain()}/${cfg.label}`; + const printRes = yield* launchctl(["print", target]); + const pid = printRes.code === 0 ? parseLaunchdPid(printRes.stdout) : undefined; + const reachable = yield* isReachable(cfg.url, { probeTimeoutMs: 500 }); + + return { + label: cfg.label, + plistPath: cfg.plistPath, + logPath: cfg.logPath, + installed: existsSync(cfg.plistPath), + running: printRes.code === 0, + pid, + reachable, + url: cfg.url, + }; + }); diff --git a/packages/plugins/launchd/tsconfig.json b/packages/plugins/launchd/tsconfig.json new file mode 100644 index 000000000..1354b0259 --- /dev/null +++ b/packages/plugins/launchd/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "skipLibCheck": true, + "lib": ["ES2022"], + "types": ["bun-types", "node"], + "noUnusedLocals": true, + "noImplicitOverride": true, + "plugins": [ + { + "name": "@effect/language-service", + "diagnosticSeverity": { + "preferSchemaOverJson": "off" + } + } + ] + }, + "include": ["src/**/*.ts"] +} diff --git a/packages/plugins/launchd/tsup.config.ts b/packages/plugins/launchd/tsup.config.ts new file mode 100644 index 000000000..d1c885590 --- /dev/null +++ b/packages/plugins/launchd/tsup.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: { + index: "src/promise.ts", + core: "src/index.ts", + }, + format: ["esm"], + dts: false, + sourcemap: true, + clean: true, + external: [/^@executor\//, /^effect/, /^@effect\//], +}); diff --git a/packages/plugins/launchd/vitest.config.ts b/packages/plugins/launchd/vitest.config.ts new file mode 100644 index 000000000..ae847ff6d --- /dev/null +++ b/packages/plugins/launchd/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["src/**/*.test.ts"], + }, +}); From 93bf98bc9fa791891ba0baf0389d813c0f996686 Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Fri, 10 Apr 2026 23:13:23 +0530 Subject: [PATCH 03/11] refactor(cli): improve type safety for QuickJS WASM loading and executionId Replace unsafe `any` casts with proper `unknown` + type assertions, add type-safe executionId extraction, and normalize formatting. --- apps/cli/package.json | 9 ++++--- apps/cli/src/main.ts | 57 ++++++++++++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/apps/cli/package.json b/apps/cli/package.json index 35e99d3bc..2a2f6139f 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -2,10 +2,10 @@ "name": "executor", "version": "1.4.4", "private": true, - "type": "module", "bin": { "executor": "./bin/executor.ts" }, + "type": "module", "exports": { ".": "./src/main.ts" }, @@ -22,11 +22,12 @@ "@effect/platform": "catalog:", "@effect/platform-bun": "catalog:", "@executor/api": "workspace:*", - "@executor/runtime-quickjs": "workspace:*", "@executor/local": "workspace:*", + "@executor/plugin-launchd": "workspace:*", + "@executor/runtime-quickjs": "workspace:*", "@jitl/quickjs-wasmfile-release-sync": "catalog:", - "quickjs-emscripten": "catalog:", - "effect": "catalog:" + "effect": "catalog:", + "quickjs-emscripten": "catalog:" }, "devDependencies": { "bun-types": "catalog:", diff --git a/apps/cli/src/main.ts b/apps/cli/src/main.ts index 06d15fb90..3a4485015 100644 --- a/apps/cli/src/main.ts +++ b/apps/cli/src/main.ts @@ -7,20 +7,30 @@ if (process.env.PATH && !process.env.PATH.includes(execDir)) { // Pre-load QuickJS WASM for compiled binaries — must run before server imports const wasmOnDisk = join(execDir, "emscripten-module.wasm"); -if (typeof Bun !== "undefined" && await Bun.file(wasmOnDisk).exists()) { +if (typeof Bun !== "undefined" && (await Bun.file(wasmOnDisk).exists())) { const { setQuickJSModule } = await import("@executor/runtime-quickjs"); const { newQuickJSWASMModule } = await import("quickjs-emscripten"); const wasmBinary = await Bun.file(wasmOnDisk).arrayBuffer(); const variant = { type: "sync" as const, - importFFI: () => import("@jitl/quickjs-wasmfile-release-sync/ffi").then((m: any) => m.QuickJSFFI), + importFFI: () => + import("@jitl/quickjs-wasmfile-release-sync/ffi").then( + (m: unknown) => (m as { readonly QuickJSFFI: unknown }).QuickJSFFI, + ), importModuleLoader: () => - import("@jitl/quickjs-wasmfile-release-sync/emscripten-module").then((m: any) => { - const original = m.default; - return (moduleArg: any = {}) => original({ ...moduleArg, wasmBinary }); + import("@jitl/quickjs-wasmfile-release-sync/emscripten-module").then((m: unknown) => { + const original = ( + m as { + readonly default: (moduleArg?: Readonly>) => unknown; + } + ).default; + return (moduleArg: Readonly> = {}) => + original({ ...moduleArg, wasmBinary }); }), }; - const mod = await newQuickJSWASMModule(variant as any); + const mod = await newQuickJSWASMModule( + variant as unknown as Parameters[0], + ); setQuickJSModule(mod); } @@ -34,6 +44,7 @@ import * as Cause from "effect/Cause"; import { ExecutorApi } from "@executor/api"; import { startServer, runMcpStdioServer, getExecutor } from "@executor/local"; +import { makeServiceCommand } from "@executor/plugin-launchd"; // Embedded web UI — baked into compiled binaries via `with { type: "file" }` import embeddedWebUI from "./embedded-web-ui.gen"; @@ -106,9 +117,7 @@ const makeApiClient = (baseUrl: string) => const runForegroundSession = (input: { port: number }) => Effect.gen(function* () { - const server = yield* Effect.promise(() => - startServer({ port: input.port, embeddedWebUI }), - ); + const server = yield* Effect.promise(() => startServer({ port: input.port, embeddedWebUI })); const baseUrl = `http://localhost:${server.port}`; console.log(`Executor is ready.`); @@ -201,7 +210,9 @@ const callCommand = Command.make( } } else { console.log(result.text); - const executionId = (result.structured as any)?.executionId; + const structured = result.structured as { readonly executionId?: unknown } | undefined; + const executionId = + typeof structured?.executionId === "string" ? structured.executionId : undefined; if (executionId) { console.log( `\nTo resume:\n ${cliPrefix} resume --execution-id ${executionId} --action accept`, @@ -259,16 +270,15 @@ const webCommand = Command.make( port: Options.integer("port").pipe(Options.withDefault(DEFAULT_PORT)), scope, }, - ({ port, scope }) => Effect.gen(function* () { - applyScope(scope); - yield* runForegroundSession({ port }); - }), + ({ port, scope }) => + Effect.gen(function* () { + applyScope(scope); + yield* runForegroundSession({ port }); + }), ).pipe(Command.withDescription("Start a foreground web session")); -const mcpCommand = Command.make( - "mcp", - { scope }, - ({ scope }) => Effect.gen(function* () { +const mcpCommand = Command.make("mcp", { scope }, ({ scope }) => + Effect.gen(function* () { applyScope(scope); yield* runStdioMcpSession(); }), @@ -278,8 +288,17 @@ const mcpCommand = Command.make( // Root command // --------------------------------------------------------------------------- +// Host-contributed commands; future host plugin work can replace this seam. +const hostCommandFactories = [makeServiceCommand()] as const; + const root = Command.make("executor").pipe( - Command.withSubcommands([callCommand, resumeCommand, webCommand, mcpCommand] as const), + Command.withSubcommands([ + callCommand, + resumeCommand, + webCommand, + mcpCommand, + ...hostCommandFactories, + ] as const), Command.withDescription("Executor local CLI"), ); From 880e60dfc0dcdd5f3f36ba6feb9bc3307ba1e34b Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Fri, 10 Apr 2026 23:53:31 +0530 Subject: [PATCH 04/11] style: apply consistent code formatting across entire codebase - Normalize package.json field ordering across workspace - Collapse multi-line declarations, imports, and function calls - Standardize quotes and trailing punctuation throughout - Apply Prettier formatting to all plugin SDK packages - Reformat generated routeTree files with consistent style --- .astro/content.d.ts | 304 +- .astro/types.d.ts | 2 +- .mcp.json | 6 +- .oxlintrc.jsonc | 4 +- .skills/effect-http-testing/SKILL.md | 91 +- .skills/effect-use-pattern/SKILL.md | 50 +- apps/cli/src/build.ts | 139 +- apps/cli/src/release.ts | 21 +- apps/cloud/.mcp.json | 2 +- apps/cloud/drizzle/meta/0000_snapshot.json | 54 +- apps/cloud/drizzle/meta/_journal.json | 2 +- apps/cloud/package.json | 28 +- apps/cloud/src/api.ts | 26 +- apps/cloud/src/auth/api.ts | 17 +- apps/cloud/src/auth/errors.ts | 12 +- apps/cloud/src/auth/handlers.ts | 13 +- apps/cloud/src/auth/middleware-live.ts | 15 +- apps/cloud/src/auth/middleware.ts | 15 +- apps/cloud/src/auth/workos.ts | 8 +- apps/cloud/src/env.ts | 44 +- apps/cloud/src/mcp-session.ts | 18 +- apps/cloud/src/mcp.ts | 26 +- apps/cloud/src/routeTree.gen.ts | 200 +- apps/cloud/src/routes/__root.tsx | 5 +- .../src/routes/sources.add.$pluginKey.tsx | 9 +- apps/cloud/src/services/db.test.ts | 14 +- apps/cloud/src/services/db.ts | 5 +- apps/cloud/src/services/executor.ts | 5 +- apps/cloud/src/services/schema.ts | 4 +- apps/cloud/src/services/user-store.ts | 6 +- apps/cloud/src/start.ts | 9 +- apps/cloud/src/web/auth.tsx | 13 +- apps/cloud/src/web/client.tsx | 13 +- apps/cloud/src/web/pages/login.tsx | 4 +- apps/cloud/src/web/shell.tsx | 70 +- apps/cloud/worker-configuration.d.ts | 21906 +- apps/cloud/wrangler.jsonc | 32 +- apps/cloud/wrangler.test.jsonc | 4 +- apps/desktop/package.json | 49 +- apps/desktop/src/main.ts | 125 +- apps/desktop/src/preload.ts | 3 +- apps/local/package.json | 13 +- apps/local/src/entry-client.tsx | 6 +- apps/local/src/index.ts | 16 +- apps/local/src/routeTree.gen.ts | 188 +- .../src/routes/sources.add.$pluginKey.tsx | 9 +- apps/local/src/serve.ts | 18 +- apps/local/src/server/executor.ts | 23 +- apps/local/src/server/main.ts | 40 +- apps/local/src/server/mcp.ts | 25 +- apps/local/src/web/shell.tsx | 104 +- apps/local/vite.config.ts | 12 +- apps/marketing/astro.config.mjs | 12 +- apps/marketing/package.json | 24 +- apps/marketing/src/pages/api/detect.ts | 19 +- apps/marketing/src/styles/global.css | 65 +- bun.lock | 40 + examples/promise-sdk/package.json | 8 +- examples/promise-sdk/src/main.ts | 7 +- knip.config.ts | 9 +- package.json | 76 +- packages/core/api/package.json | 6 +- packages/core/api/src/executions/api.ts | 3 +- packages/core/api/src/handlers/executions.ts | 104 +- packages/core/api/src/handlers/scope.ts | 25 +- packages/core/api/src/handlers/secrets.ts | 89 +- packages/core/api/src/handlers/sources.ts | 119 +- packages/core/api/src/handlers/tools.ts | 47 +- packages/core/api/src/scope/api.ts | 9 +- packages/core/api/src/secrets/api.ts | 24 +- packages/core/api/src/server.ts | 9 +- packages/core/api/src/services.ts | 5 +- packages/core/api/src/sources/api.ts | 23 +- packages/core/api/src/tools/api.ts | 18 +- packages/core/api/tsconfig.json | 3 +- packages/core/config/package.json | 4 +- packages/core/config/src/config-store.ts | 69 +- packages/core/config/src/config.test.ts | 12 +- packages/core/config/src/load.ts | 13 +- packages/core/config/src/schema.ts | 8 +- packages/core/config/src/write.ts | 8 +- packages/core/config/tsconfig.json | 3 +- packages/core/env/package.json | 2 +- packages/core/env/src/index.ts | 27 +- packages/core/execution/package.json | 4 +- packages/core/execution/src/description.ts | 13 +- packages/core/execution/src/engine.ts | 45 +- .../core/execution/src/tool-invoker.test.ts | 109 +- packages/core/execution/src/tool-invoker.ts | 79 +- packages/core/sdk/README.md | 19 +- packages/core/sdk/package.json | 20 +- .../stripe-get-balance-transactions-id.json | 36649 +- packages/core/sdk/src/elicitation.ts | 40 +- packages/core/sdk/src/errors.ts | 4 +- packages/core/sdk/src/executor.ts | 45 +- .../core/sdk/src/in-memory/policy-engine.ts | 10 +- .../core/sdk/src/in-memory/secret-store.ts | 16 +- .../core/sdk/src/in-memory/tool-registry.ts | 4 +- packages/core/sdk/src/index.test.ts | 122 +- packages/core/sdk/src/index.ts | 6 +- packages/core/sdk/src/plugin-kv.ts | 10 +- packages/core/sdk/src/plugin.ts | 24 +- .../core/sdk/src/plugins/in-memory-tools.ts | 44 +- packages/core/sdk/src/policies.ts | 4 +- packages/core/sdk/src/promise-executor.ts | 186 +- packages/core/sdk/src/promise.ts | 13 +- packages/core/sdk/src/runtime-tools.ts | 45 +- packages/core/sdk/src/schema-refs.ts | 8 +- packages/core/sdk/src/schema-types.test.ts | 11 +- packages/core/sdk/src/schema-types.ts | 77 +- packages/core/sdk/src/secrets.ts | 9 +- packages/core/sdk/src/sources.ts | 8 +- packages/core/sdk/src/testing.ts | 10 +- packages/core/sdk/src/tools.ts | 68 +- packages/core/storage-file/package.json | 8 +- packages/core/storage-file/src/index.test.ts | 17 +- packages/core/storage-file/src/index.ts | 18 +- .../core/storage-file/src/migrations/index.ts | 7 +- packages/core/storage-file/src/plugin-kv.ts | 69 +- .../core/storage-file/src/policy-engine.ts | 15 +- .../core/storage-file/src/secret-store.ts | 12 +- .../core/storage-file/src/tool-registry.ts | 24 +- packages/core/storage-file/tsconfig.json | 3 +- .../drizzle/meta/0000_snapshot.json | 33 +- .../drizzle/meta/_journal.json | 2 +- packages/core/storage-postgres/package.json | 12 +- packages/core/storage-postgres/src/crypto.ts | 6 +- .../core/storage-postgres/src/index.test.ts | 37 +- packages/core/storage-postgres/src/index.ts | 4 +- packages/core/storage-postgres/src/pg-kv.ts | 14 +- .../storage-postgres/src/policy-engine.ts | 5 +- packages/core/storage-postgres/src/schema.ts | 8 +- .../core/storage-postgres/src/secret-store.ts | 19 +- .../storage-postgres/src/tool-registry.ts | 33 +- packages/core/storage-postgres/tsconfig.json | 3 +- packages/hosts/mcp/package.json | 4 +- packages/hosts/mcp/src/server.test.ts | 40 +- packages/hosts/mcp/src/server.ts | 127 +- .../hosts/mcp/src/stdio-integration.test.ts | 5 +- packages/kernel/core/package.json | 2 +- packages/kernel/core/src/effect-errors.ts | 10 +- packages/kernel/core/src/json-schema.ts | 4 +- packages/kernel/core/src/types.ts | 17 +- packages/kernel/core/src/validation.ts | 23 +- packages/kernel/core/tsconfig.json | 4 +- packages/kernel/ir/package.json | 2 +- packages/kernel/ir/src/serialize.ts | 4 +- packages/kernel/ir/tsconfig.json | 4 +- .../runtime-deno-subprocess/package.json | 2 +- .../src/deno-worker-process.ts | 32 +- .../runtime-deno-subprocess/src/index.test.ts | 25 +- .../runtime-deno-subprocess/src/index.ts | 38 +- .../runtime-deno-subprocess/tsconfig.json | 4 +- .../runtime-dynamic-worker/package.json | 2 +- .../runtime-dynamic-worker/src/executor.ts | 45 +- .../src/invocation.test.ts | 19 +- .../src/module-template.ts | 5 +- .../runtime-dynamic-worker/src/normalize.ts | 10 +- .../runtime-dynamic-worker/tsconfig.json | 4 +- .../runtime-dynamic-worker/wrangler.jsonc | 6 +- packages/kernel/runtime-quickjs/package.json | 2 +- .../kernel/runtime-quickjs/src/index.test.ts | 5 +- packages/kernel/runtime-quickjs/src/index.ts | 51 +- packages/kernel/runtime-quickjs/tsconfig.json | 4 +- .../kernel/runtime-secure-exec/package.json | 2 +- .../runtime-secure-exec/src/index.test.ts | 5 +- .../kernel/runtime-secure-exec/src/index.ts | 50 +- .../kernel/runtime-secure-exec/tsconfig.json | 4 +- packages/plugins/file-secrets/package.json | 48 +- packages/plugins/file-secrets/src/index.ts | 37 +- packages/plugins/file-secrets/src/promise.ts | 5 +- packages/plugins/file-secrets/tsconfig.json | 13 +- .../google-discovery/fixtures/drive.json | 8 +- .../plugins/google-discovery/package.json | 76 +- .../plugins/google-discovery/src/api/group.ts | 3 +- .../google-discovery/src/api/handlers.ts | 10 +- .../plugins/google-discovery/src/api/index.ts | 5 +- .../plugins/google-discovery/src/promise.ts | 5 +- .../src/react/AddGoogleDiscoverySource.tsx | 110 +- .../src/react/EditGoogleDiscoverySource.tsx | 11 +- .../react/GoogleDiscoverySourceSummary.tsx | 6 +- .../google-discovery/src/sdk/binding-store.ts | 66 +- .../google-discovery/src/sdk/document.test.ts | 14 +- .../google-discovery/src/sdk/document.ts | 168 +- .../google-discovery/src/sdk/errors.ts | 4 +- .../plugins/google-discovery/src/sdk/index.ts | 4 +- .../google-discovery/src/sdk/invoke.ts | 167 +- .../plugins/google-discovery/src/sdk/oauth.ts | 34 +- .../google-discovery/src/sdk/plugin.test.ts | 105 +- .../google-discovery/src/sdk/plugin.ts | 112 +- .../plugins/google-discovery/src/sdk/types.ts | 16 +- .../plugins/google-discovery/tsconfig.json | 15 +- packages/plugins/graphql/package.json | 82 +- packages/plugins/graphql/src/api/group.ts | 23 +- packages/plugins/graphql/src/api/handlers.ts | 76 +- packages/plugins/graphql/src/promise.ts | 3 +- .../graphql/src/react/AddGraphqlSource.tsx | 7 +- .../graphql/src/react/EditGraphqlSource.tsx | 33 +- .../src/react/GraphqlSourceSummary.tsx | 10 +- packages/plugins/graphql/src/react/client.ts | 13 +- .../graphql/src/sdk/config-file-store.ts | 6 +- packages/plugins/graphql/src/sdk/errors.ts | 4 +- .../plugins/graphql/src/sdk/extract.test.ts | 101 +- packages/plugins/graphql/src/sdk/extract.ts | 21 +- packages/plugins/graphql/src/sdk/index.ts | 11 +- .../plugins/graphql/src/sdk/introspect.ts | 4 +- packages/plugins/graphql/src/sdk/invoke.ts | 31 +- .../graphql/src/sdk/kv-operation-store.ts | 31 +- .../graphql/src/sdk/operation-store.ts | 8 +- .../plugins/graphql/src/sdk/plugin.test.ts | 18 +- packages/plugins/graphql/src/sdk/plugin.ts | 70 +- .../plugins/graphql/src/sdk/stored-source.ts | 8 +- packages/plugins/graphql/src/sdk/types.ts | 31 +- packages/plugins/graphql/tsconfig.json | 15 +- packages/plugins/keychain/package.json | 52 +- packages/plugins/keychain/src/index.test.ts | 16 +- packages/plugins/keychain/src/index.ts | 6 +- packages/plugins/keychain/src/keyring.ts | 7 +- packages/plugins/keychain/src/promise.ts | 5 +- packages/plugins/keychain/src/provider.ts | 13 +- packages/plugins/keychain/tsconfig.json | 13 +- packages/plugins/mcp/package.json | 48 +- packages/plugins/mcp/src/api/group.ts | 12 +- packages/plugins/mcp/src/api/handlers.ts | 219 +- packages/plugins/mcp/src/promise.ts | 3 +- .../plugins/mcp/src/react/AddMcpSource.tsx | 234 +- .../plugins/mcp/src/react/EditMcpSource.tsx | 14 +- .../mcp/src/react/McpSourceSummary.tsx | 10 +- packages/plugins/mcp/src/react/client.ts | 13 +- packages/plugins/mcp/src/sdk/binding-store.ts | 67 +- .../plugins/mcp/src/sdk/config-file-store.ts | 5 +- packages/plugins/mcp/src/sdk/connection.ts | 17 +- packages/plugins/mcp/src/sdk/discover.ts | 5 +- .../plugins/mcp/src/sdk/elicitation.test.ts | 372 +- packages/plugins/mcp/src/sdk/errors.ts | 9 +- packages/plugins/mcp/src/sdk/index.ts | 11 +- packages/plugins/mcp/src/sdk/invoke.ts | 140 +- packages/plugins/mcp/src/sdk/manifest.ts | 36 +- packages/plugins/mcp/src/sdk/oauth.ts | 50 +- packages/plugins/mcp/src/sdk/plugin.test.ts | 24 +- packages/plugins/mcp/src/sdk/plugin.ts | 196 +- packages/plugins/mcp/src/sdk/stored-source.ts | 4 +- packages/plugins/mcp/src/sdk/types.ts | 9 +- packages/plugins/mcp/tsconfig.json | 15 +- packages/plugins/onepassword/package.json | 60 +- packages/plugins/onepassword/src/api/group.ts | 17 +- .../plugins/onepassword/src/api/handlers.ts | 7 +- packages/plugins/onepassword/src/promise.ts | 14 +- .../src/react/OnePasswordSettings.tsx | 97 +- .../plugins/onepassword/src/react/atoms.ts | 12 +- .../plugins/onepassword/src/react/client.ts | 13 +- .../plugins/onepassword/src/sdk/errors.ts | 11 +- packages/plugins/onepassword/src/sdk/index.ts | 15 +- .../plugins/onepassword/src/sdk/plugin.ts | 46 +- .../plugins/onepassword/src/sdk/service.ts | 60 +- packages/plugins/onepassword/tsconfig.json | 13 +- .../plugins/openapi/fixtures/cloudflare.json | 390877 ++++++++++++++- packages/plugins/openapi/package.json | 82 +- packages/plugins/openapi/src/api/group.ts | 27 +- packages/plugins/openapi/src/api/handlers.ts | 88 +- packages/plugins/openapi/src/promise.ts | 3 +- .../openapi/src/react/AddOpenApiSource.tsx | 66 +- .../openapi/src/react/EditOpenApiSource.tsx | 33 +- .../src/react/OpenApiSourceSummary.tsx | 10 +- packages/plugins/openapi/src/react/atoms.ts | 5 +- packages/plugins/openapi/src/react/client.ts | 13 +- packages/plugins/openapi/src/react/index.ts | 5 +- .../openapi/src/sdk/config-file-store.ts | 6 +- .../plugins/openapi/src/sdk/definitions.ts | 46 +- packages/plugins/openapi/src/sdk/errors.ts | 4 +- packages/plugins/openapi/src/sdk/extract.ts | 41 +- .../plugins/openapi/src/sdk/index.test.ts | 43 +- packages/plugins/openapi/src/sdk/index.ts | 25 +- packages/plugins/openapi/src/sdk/invoke.ts | 88 +- .../openapi/src/sdk/kv-operation-store.ts | 165 +- .../plugins/openapi/src/sdk/openapi-utils.ts | 5 +- .../openapi/src/sdk/operation-store.ts | 8 +- packages/plugins/openapi/src/sdk/parse.ts | 4 +- .../plugins/openapi/src/sdk/plugin.test.ts | 106 +- packages/plugins/openapi/src/sdk/plugin.ts | 67 +- packages/plugins/openapi/src/sdk/preview.ts | 24 +- .../openapi/src/sdk/real-specs.test.ts | 95 +- .../plugins/openapi/src/sdk/stored-source.ts | 8 +- packages/plugins/openapi/src/sdk/types.ts | 47 +- packages/plugins/openapi/tsconfig.json | 15 +- packages/react/package.json | 12 +- packages/react/src/api/atoms.tsx | 8 +- packages/react/src/api/client.tsx | 13 +- packages/react/src/api/scope-context.tsx | 6 +- packages/react/src/components/accordion.tsx | 24 +- .../react/src/components/alert-dialog.tsx | 77 +- packages/react/src/components/alert.tsx | 30 +- .../react/src/components/aspect-ratio.tsx | 12 +- packages/react/src/components/avatar.tsx | 49 +- packages/react/src/components/badge.tsx | 24 +- packages/react/src/components/breadcrumb.tsx | 41 +- .../react/src/components/button-group.tsx | 33 +- packages/react/src/components/button.tsx | 26 +- packages/react/src/components/calendar.tsx | 118 +- packages/react/src/components/card.tsx | 43 +- packages/react/src/components/carousel.tsx | 151 +- packages/react/src/components/chart.tsx | 200 +- packages/react/src/components/checkbox.tsx | 21 +- packages/react/src/components/code-block.tsx | 26 +- packages/react/src/components/collapsible.tsx | 24 +- packages/react/src/components/combobox.tsx | 119 +- packages/react/src/components/command.tsx | 93 +- .../react/src/components/context-menu.tsx | 104 +- packages/react/src/components/dialog.tsx | 66 +- packages/react/src/components/direction.tsx | 18 +- packages/react/src/components/drawer.tsx | 55 +- .../react/src/components/dropdown-menu.tsx | 103 +- packages/react/src/components/empty.tsx | 40 +- .../src/components/expandable-code-block.tsx | 78 +- packages/react/src/components/field.tsx | 124 +- packages/react/src/components/form.tsx | 95 +- packages/react/src/components/hover-card.tsx | 26 +- packages/react/src/components/input-group.tsx | 86 +- packages/react/src/components/input-otp.tsx | 41 +- packages/react/src/components/input.tsx | 10 +- packages/react/src/components/item.tsx | 81 +- packages/react/src/components/kbd.tsx | 10 +- packages/react/src/components/label.tsx | 17 +- packages/react/src/components/markdown.tsx | 10 +- .../react/src/components/mcp-install-card.tsx | 15 +- packages/react/src/components/menubar.tsx | 110 +- .../react/src/components/native-select.tsx | 27 +- .../react/src/components/navigation-menu.tsx | 55 +- packages/react/src/components/pagination.tsx | 61 +- packages/react/src/components/popover.tsx | 47 +- packages/react/src/components/progress.tsx | 17 +- packages/react/src/components/radio-group.tsx | 16 +- packages/react/src/components/resizable.tsx | 30 +- .../react/src/components/schema-explorer.tsx | 49 +- packages/react/src/components/scroll-area.tsx | 20 +- packages/react/src/components/select.tsx | 69 +- packages/react/src/components/separator.tsx | 12 +- packages/react/src/components/sheet.tsx | 57 +- packages/react/src/components/sidebar.tsx | 304 +- packages/react/src/components/skeleton.tsx | 6 +- packages/react/src/components/slider.tsx | 27 +- packages/react/src/components/sonner.tsx | 16 +- packages/react/src/components/spinner.tsx | 8 +- packages/react/src/components/switch.tsx | 16 +- packages/react/src/components/table.tsx | 60 +- packages/react/src/components/tabs.tsx | 42 +- packages/react/src/components/textarea.tsx | 10 +- .../react/src/components/toggle-group.tsx | 33 +- packages/react/src/components/toggle.tsx | 21 +- packages/react/src/components/tool-detail.tsx | 33 +- packages/react/src/components/tool-tree.tsx | 22 +- packages/react/src/components/tooltip.tsx | 26 +- packages/react/src/hooks/use-mobile.ts | 22 +- packages/react/src/lib/shiki.ts | 11 +- packages/react/src/pages/secrets.tsx | 42 +- packages/react/src/pages/source-detail.tsx | 83 +- packages/react/src/pages/sources-add.tsx | 6 +- packages/react/src/pages/sources.tsx | 54 +- packages/react/src/pages/tools.tsx | 15 +- .../react/src/plugins/secret-header-auth.tsx | 83 +- packages/react/src/plugins/secret-picker.tsx | 15 +- packages/react/src/styles/globals.css | 20 +- scripts/publish-packages.ts | 11 +- tests/presets-reachable.test.ts | 22 +- tests/release-bootstrap-smoke.test.ts | 310 +- 365 files changed, 445009 insertions(+), 17981 deletions(-) diff --git a/.astro/content.d.ts b/.astro/content.d.ts index d9eaab410..3007cb279 100644 --- a/.astro/content.d.ts +++ b/.astro/content.d.ts @@ -1,154 +1,152 @@ -declare module 'astro:content' { - export interface RenderResult { - Content: import('astro/runtime/server/index.js').AstroComponentFactory; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - } - interface Render { - '.md': Promise; - } - - export interface RenderedContent { - html: string; - metadata?: { - imagePaths: Array; - [key: string]: unknown; - }; - } - - type Flatten = T extends { [K: string]: infer U } ? U : never; - - export type CollectionKey = keyof DataEntryMap; - export type CollectionEntry = Flatten; - - type AllValuesOf = T extends any ? T[keyof T] : never; - - export type ReferenceDataEntry< - C extends CollectionKey, - E extends keyof DataEntryMap[C] = string, - > = { - collection: C; - id: E; - }; - - export type ReferenceLiveEntry = { - collection: C; - id: string; - }; - - export function getCollection>( - collection: C, - filter?: (entry: CollectionEntry) => entry is E, - ): Promise; - export function getCollection( - collection: C, - filter?: (entry: CollectionEntry) => unknown, - ): Promise[]>; - - export function getLiveCollection( - collection: C, - filter?: LiveLoaderCollectionFilterType, - ): Promise< - import('astro').LiveDataCollectionResult, LiveLoaderErrorType> - >; - - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >( - entry: ReferenceDataEntry, - ): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >( - collection: C, - id: E, - ): E extends keyof DataEntryMap[C] - ? string extends keyof DataEntryMap[C] - ? Promise | undefined - : Promise - : Promise | undefined>; - export function getLiveEntry( - collection: C, - filter: string | LiveLoaderEntryFilterType, - ): Promise, LiveLoaderErrorType>>; - - /** Resolve an array of entry references from the same collection */ - export function getEntries( - entries: ReferenceDataEntry[], - ): Promise[]>; - - export function render( - entry: DataEntryMap[C][string], - ): Promise; - - export function reference< - C extends - | keyof DataEntryMap - // Allow generic `string` to avoid excessive type errors in the config - // if `dev` is not running to update as you edit. - // Invalid collection names will be caught at build time. - | (string & {}), - >( - collection: C, - ): import('astro/zod').ZodPipe< - import('astro/zod').ZodString, - import('astro/zod').ZodTransform< - C extends keyof DataEntryMap - ? { - collection: C; - id: string; - } - : never, - string - > - >; - - type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; - type InferEntrySchema = import('astro/zod').infer< - ReturnTypeOrOriginal['schema']> - >; - type ExtractLoaderConfig = T extends { loader: infer L } ? L : never; - type InferLoaderSchema< - C extends keyof DataEntryMap, - L = ExtractLoaderConfig, - > = L extends { schema: import('astro/zod').ZodSchema } - ? import('astro/zod').infer - : any; - - type DataEntryMap = { - - }; - - type ExtractLoaderTypes = T extends import('astro/loaders').LiveLoader< - infer TData, - infer TEntryFilter, - infer TCollectionFilter, - infer TError - > - ? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError } - : { data: never; entryFilter: never; collectionFilter: never; error: never }; - type ExtractEntryFilterType = ExtractLoaderTypes['entryFilter']; - type ExtractCollectionFilterType = ExtractLoaderTypes['collectionFilter']; - type ExtractErrorType = ExtractLoaderTypes['error']; - - type LiveLoaderDataType = - LiveContentConfig['collections'][C]['schema'] extends undefined - ? ExtractDataType - : import('astro/zod').infer< - Exclude - >; - type LiveLoaderEntryFilterType = - ExtractEntryFilterType; - type LiveLoaderCollectionFilterType = - ExtractCollectionFilterType; - type LiveLoaderErrorType = ExtractErrorType< - LiveContentConfig['collections'][C]['loader'] - >; - - export type ContentConfig = never; - export type LiveContentConfig = never; +declare module "astro:content" { + export interface RenderResult { + Content: import("astro/runtime/server/index.js").AstroComponentFactory; + headings: import("astro").MarkdownHeading[]; + remarkPluginFrontmatter: Record; + } + interface Render { + ".md": Promise; + } + + export interface RenderedContent { + html: string; + metadata?: { + imagePaths: Array; + [key: string]: unknown; + }; + } + + type Flatten = T extends { [K: string]: infer U } ? U : never; + + export type CollectionKey = keyof DataEntryMap; + export type CollectionEntry = Flatten; + + type AllValuesOf = T extends any ? T[keyof T] : never; + + export type ReferenceDataEntry< + C extends CollectionKey, + E extends keyof DataEntryMap[C] = string, + > = { + collection: C; + id: E; + }; + + export type ReferenceLiveEntry = { + collection: C; + id: string; + }; + + export function getCollection>( + collection: C, + filter?: (entry: CollectionEntry) => entry is E, + ): Promise; + export function getCollection( + collection: C, + filter?: (entry: CollectionEntry) => unknown, + ): Promise[]>; + + export function getLiveCollection( + collection: C, + filter?: LiveLoaderCollectionFilterType, + ): Promise< + import("astro").LiveDataCollectionResult, LiveLoaderErrorType> + >; + + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >( + entry: ReferenceDataEntry, + ): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >( + collection: C, + id: E, + ): E extends keyof DataEntryMap[C] + ? string extends keyof DataEntryMap[C] + ? Promise | undefined + : Promise + : Promise | undefined>; + export function getLiveEntry( + collection: C, + filter: string | LiveLoaderEntryFilterType, + ): Promise, LiveLoaderErrorType>>; + + /** Resolve an array of entry references from the same collection */ + export function getEntries( + entries: ReferenceDataEntry[], + ): Promise[]>; + + export function render( + entry: DataEntryMap[C][string], + ): Promise; + + export function reference< + C extends + | keyof DataEntryMap + // Allow generic `string` to avoid excessive type errors in the config + // if `dev` is not running to update as you edit. + // Invalid collection names will be caught at build time. + | (string & {}), + >( + collection: C, + ): import("astro/zod").ZodPipe< + import("astro/zod").ZodString, + import("astro/zod").ZodTransform< + C extends keyof DataEntryMap + ? { + collection: C; + id: string; + } + : never, + string + > + >; + + type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; + type InferEntrySchema = import("astro/zod").infer< + ReturnTypeOrOriginal["schema"]> + >; + type ExtractLoaderConfig = T extends { loader: infer L } ? L : never; + type InferLoaderSchema< + C extends keyof DataEntryMap, + L = ExtractLoaderConfig, + > = L extends { schema: import("astro/zod").ZodSchema } + ? import("astro/zod").infer + : any; + + type DataEntryMap = {}; + + type ExtractLoaderTypes = T extends import("astro/loaders").LiveLoader< + infer TData, + infer TEntryFilter, + infer TCollectionFilter, + infer TError + > + ? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError } + : { data: never; entryFilter: never; collectionFilter: never; error: never }; + type ExtractEntryFilterType = ExtractLoaderTypes["entryFilter"]; + type ExtractCollectionFilterType = ExtractLoaderTypes["collectionFilter"]; + type ExtractErrorType = ExtractLoaderTypes["error"]; + + type LiveLoaderDataType = + LiveContentConfig["collections"][C]["schema"] extends undefined + ? ExtractDataType + : import("astro/zod").infer< + Exclude + >; + type LiveLoaderEntryFilterType = + ExtractEntryFilterType; + type LiveLoaderCollectionFilterType = + ExtractCollectionFilterType; + type LiveLoaderErrorType = ExtractErrorType< + LiveContentConfig["collections"][C]["loader"] + >; + + export type ContentConfig = never; + export type LiveContentConfig = never; } diff --git a/.astro/types.d.ts b/.astro/types.d.ts index 03d7cc43f..306a68bfd 100644 --- a/.astro/types.d.ts +++ b/.astro/types.d.ts @@ -1,2 +1,2 @@ /// -/// \ No newline at end of file +/// diff --git a/.mcp.json b/.mcp.json index 9375999d4..b416235e8 100644 --- a/.mcp.json +++ b/.mcp.json @@ -2,11 +2,7 @@ "mcpServers": { "executor": { "command": "bun", - "args": [ - "run", - "/Users/rhyssullivan/src/v4-executor/apps/cli/src/main.ts", - "mcp" - ], + "args": ["run", "/Users/rhyssullivan/src/v4-executor/apps/cli/src/main.ts", "mcp"], "type": "http", "url": "http://localhost:5173/mcp" } diff --git a/.oxlintrc.jsonc b/.oxlintrc.jsonc index 0523c99d2..56cbf3c9d 100644 --- a/.oxlintrc.jsonc +++ b/.oxlintrc.jsonc @@ -1,5 +1,5 @@ { "rules": { - "typescript/no-explicit-any": "error" - } + "typescript/no-explicit-any": "error", + }, } diff --git a/.skills/effect-http-testing/SKILL.md b/.skills/effect-http-testing/SKILL.md index 2dc453415..9c4cca904 100644 --- a/.skills/effect-http-testing/SKILL.md +++ b/.skills/effect-http-testing/SKILL.md @@ -10,13 +10,17 @@ description: Testing Effect HttpApi services end-to-end. Use when writing tests Define an API with `HttpApi`, implement handlers with `HttpApiBuilder.group`, serve it with `HttpApiBuilder.serve()`, and use `NodeHttpServer.layerTest` to get an in-process test server + `HttpClient` pointed at it. ```ts -import { expect, layer } from "@effect/vitest" -import { Effect, Layer, Schema } from "effect" +import { expect, layer } from "@effect/vitest"; +import { Effect, Layer, Schema } from "effect"; import { - HttpApi, HttpApiBuilder, HttpApiEndpoint, HttpApiGroup, - HttpClient, OpenApi -} from "@effect/platform" -import { NodeHttpServer } from "@effect/platform-node" + HttpApi, + HttpApiBuilder, + HttpApiEndpoint, + HttpApiGroup, + HttpClient, + OpenApi, +} from "@effect/platform"; +import { NodeHttpServer } from "@effect/platform-node"; // 1. Define the API class Item extends Schema.Class("Item")({ @@ -29,37 +33,37 @@ const ItemsGroup = HttpApiGroup.make("items") .add( HttpApiEndpoint.get("getItem", "/items/:itemId") .setPath(Schema.Struct({ itemId: Schema.NumberFromString })) - .addSuccess(Item) - ) + .addSuccess(Item), + ); -const MyApi = HttpApi.make("myApi").add(ItemsGroup) +const MyApi = HttpApi.make("myApi").add(ItemsGroup); // 2. Implement handlers const ItemsLive = HttpApiBuilder.group(MyApi, "items", (handlers) => handlers .handle("listItems", () => Effect.succeed([{ id: 1, name: "Widget" }])) - .handle("getItem", (req) => Effect.succeed({ id: req.path.itemId, name: "Widget" })) -) + .handle("getItem", (req) => Effect.succeed({ id: req.path.itemId, name: "Widget" })), +); // 3. Build test layer -const ApiLive = HttpApiBuilder.api(MyApi).pipe(Layer.provide(ItemsLive)) +const ApiLive = HttpApiBuilder.api(MyApi).pipe(Layer.provide(ItemsLive)); const TestLayer = HttpApiBuilder.serve().pipe( Layer.provide(ApiLive), Layer.provideMerge(NodeHttpServer.layerTest), -) +); // 4. Use layer() to share across tests layer(TestLayer)("My API", (it) => { it.effect("works", () => Effect.gen(function* () { - const client = yield* HttpClient.HttpClient + const client = yield* HttpClient.HttpClient; // client is already pointed at the test server - const response = yield* client.get("/items") + const response = yield* client.get("/items"); // ... - }) - ) -}) + }), + ); +}); ``` ## Critical Rules @@ -70,16 +74,10 @@ layer(TestLayer)("My API", (it) => { ```ts // CORRECT -HttpApiBuilder.serve().pipe( - Layer.provide(ApiLive), - Layer.provideMerge(NodeHttpServer.layerTest), -) +HttpApiBuilder.serve().pipe(Layer.provide(ApiLive), Layer.provideMerge(NodeHttpServer.layerTest)); // WRONG — "Service not found: HttpApi.Api" -ApiLive.pipe( - Layer.provide(HttpApiBuilder.serve()), - Layer.provideMerge(NodeHttpServer.layerTest), -) +ApiLive.pipe(Layer.provide(HttpApiBuilder.serve()), Layer.provideMerge(NodeHttpServer.layerTest)); ``` ### layerTestClient prepends the server URL @@ -96,17 +94,18 @@ Effect's `HttpApiEndpoint` with `:param` syntax does NOT automatically populate ```ts // WRONG — req.path is undefined -HttpApiEndpoint.get("getItem", "/items/:itemId").addSuccess(Item) +HttpApiEndpoint.get("getItem", "/items/:itemId").addSuccess(Item); // CORRECT — req.path.itemId is typed and populated HttpApiEndpoint.get("getItem", "/items/:itemId") .setPath(Schema.Struct({ itemId: Schema.NumberFromString })) - .addSuccess(Item) + .addSuccess(Item); ``` ### OpenApi.fromApi generates the spec Use `OpenApi.fromApi(api)` to generate an OpenAPI spec from an `HttpApi` definition. The generated spec: + - Uses `"Api"` as the default title (not the api id) - Converts `:param` to `{param}` in paths - Does NOT list path parameters in the `parameters` array — they're implicit in the path template @@ -120,12 +119,12 @@ Inside `layer()` tests, the `HttpClient` is available in the Effect context: layer(TestLayer)("tests", (it) => { it.effect("test", () => Effect.gen(function* () { - const httpClient = yield* HttpClient.HttpClient + const httpClient = yield* HttpClient.HttpClient; // Use it directly or wrap in a Layer for injection - const clientLayer = Layer.succeed(HttpClient.HttpClient, httpClient) - }) - ) -}) + const clientLayer = Layer.succeed(HttpClient.HttpClient, httpClient); + }), + ); +}); ``` ### Use HttpClient for HTTP calls, not fetch @@ -133,19 +132,19 @@ layer(TestLayer)("tests", (it) => { Production code should use `HttpClient` from `@effect/platform`, not raw `fetch`: ```ts -import { HttpClient, HttpClientRequest } from "@effect/platform" +import { HttpClient, HttpClientRequest } from "@effect/platform"; // Build request -let request = HttpClientRequest.get("/items") -request = HttpClientRequest.setHeader(request, "accept", "application/json") -request = HttpClientRequest.setUrlParam(request, "limit", "10") +let request = HttpClientRequest.get("/items"); +request = HttpClientRequest.setHeader(request, "accept", "application/json"); +request = HttpClientRequest.setUrlParam(request, "limit", "10"); // Execute — requires HttpClient in context -const response = yield* client.execute(request) +const response = yield * client.execute(request); // Read body -const data = yield* response.json // Effect -const text = yield* response.text // Effect +const data = yield * response.json; // Effect +const text = yield * response.text; // Effect ``` This makes testing clean — swap in a test client layer, no monkey-patching needed. @@ -168,11 +167,11 @@ const copy = { ...response.headers } ```ts // The method parameter to make() must be uppercase -HttpClientRequest.make("GET")("/items") +HttpClientRequest.make("GET")("/items"); // Or use the convenience methods -HttpClientRequest.get("/items") -HttpClientRequest.post("/items") +HttpClientRequest.get("/items"); +HttpClientRequest.post("/items"); ``` ### Prepending base URLs to a client @@ -186,7 +185,7 @@ const clientWithBase = Layer.effect( HttpClient.HttpClient, HttpClient.mapRequest(HttpClientRequest.prependUrl("https://api.example.com")), ), -).pipe(Layer.provide(baseClientLayer)) +).pipe(Layer.provide(baseClientLayer)); ``` ### Error assertions @@ -194,8 +193,8 @@ const clientWithBase = Layer.effect( Use `Effect.flip` to turn errors into values for assertion: ```ts -const error = yield* Effect.flip(someFailingEffect) -expect(error._tag).toBe("MyError") +const error = yield * Effect.flip(someFailingEffect); +expect(error._tag).toBe("MyError"); ``` ### Dependencies diff --git a/.skills/effect-use-pattern/SKILL.md b/.skills/effect-use-pattern/SKILL.md index 3a4b52b27..49779f86a 100644 --- a/.skills/effect-use-pattern/SKILL.md +++ b/.skills/effect-use-pattern/SKILL.md @@ -17,18 +17,14 @@ export class MyClientError extends Data.TaggedError("MyClientError")<{ cause: unknown; }> {} -export class MyClientInstantiationError extends Data.TaggedError( - "MyClientInstantiationError", -)<{ +export class MyClientInstantiationError extends Data.TaggedError("MyClientInstantiationError")<{ cause: unknown; }> {} // 2. Define service interface with `use` method export type IMyClient = Readonly<{ client: ThirdPartyClient; - use: ( - fn: (client: ThirdPartyClient) => Promise, - ) => Effect.Effect; + use: (fn: (client: ThirdPartyClient) => Promise) => Effect.Effect; }>; // 3. Create the service implementation @@ -51,9 +47,7 @@ const make = Effect.gen(function* () { // 4. Export as Context.Tag with Default layer export class MyClient extends Context.Tag("MyClient")() { - static Default = Layer.effect(this, make).pipe( - Layer.annotateSpans({ module: "MyClient" }), - ); + static Default = Layer.effect(this, make).pipe(Layer.annotateSpans({ module: "MyClient" })); } ``` @@ -63,9 +57,7 @@ export class MyClient extends Context.Tag("MyClient")() { const program = Effect.gen(function* () { const myClient = yield* MyClient; - const result = yield* myClient.use((client) => - client.someMethod({ param: "value" }), - ); + const result = yield* myClient.use((client) => client.someMethod({ param: "value" })); return result; }); @@ -87,15 +79,11 @@ program.pipe(Effect.provide(MyClient.Default)); ### Multiple Error Types ```typescript -export class MyClientNetworkError extends Data.TaggedError( - "MyClientNetworkError", -)<{ +export class MyClientNetworkError extends Data.TaggedError("MyClientNetworkError")<{ cause: unknown; }> {} -export class MyClientValidationError extends Data.TaggedError( - "MyClientValidationError", -)<{ +export class MyClientValidationError extends Data.TaggedError("MyClientValidationError")<{ message: string; }> {} @@ -117,9 +105,7 @@ Expose specific methods instead of generic `use`: ```typescript export type IEmailClient = Readonly<{ - sendEmail: ( - params: SendEmailParams, - ) => Effect.Effect; + sendEmail: (params: SendEmailParams) => Effect.Effect; getEmail: (id: string) => Effect.Effect; }>; @@ -128,14 +114,10 @@ const make = Effect.gen(function* () { return { sendEmail: (params) => - resend - .use((client) => client.emails.send(params)) - .pipe(Effect.withSpan("email_client.send")), + resend.use((client) => client.emails.send(params)).pipe(Effect.withSpan("email_client.send")), getEmail: (id) => - resend - .use((client) => client.emails.get(id)) - .pipe(Effect.withSpan("email_client.get")), + resend.use((client) => client.emails.get(id)).pipe(Effect.withSpan("email_client.get")), }; }); ``` @@ -154,10 +136,7 @@ const use = (fn: (client: ThirdPartyClient) => Promise) => Effect.tryPromise({ try: () => fn(client), catch: (cause) => new MyClientError({ cause }), - }).pipe( - Effect.retry(retryPolicy), - Effect.withSpan(`my_client.${fn.name ?? "use"}`), - ); + }).pipe(Effect.retry(retryPolicy), Effect.withSpan(`my_client.${fn.name ?? "use"}`)); ``` ## Real-World Example: Stripe @@ -188,13 +167,8 @@ const make = Effect.gen(function* () { return { use }; }); -export class StripeClient extends Context.Tag("StripeClient")< - StripeClient, - IStripeClient ->() { - static Default = Layer.effect(this, make).pipe( - Layer.annotateSpans({ module: "StripeClient" }), - ); +export class StripeClient extends Context.Tag("StripeClient")() { + static Default = Layer.effect(this, make).pipe(Layer.annotateSpans({ module: "StripeClient" })); } // Usage diff --git a/apps/cli/src/build.ts b/apps/cli/src/build.ts index 3e98bcd44..72cfd3f91 100644 --- a/apps/cli/src/build.ts +++ b/apps/cli/src/build.ts @@ -32,7 +32,8 @@ const readMetadata = async () => { return { name: "executor", version: process.env.EXECUTOR_VERSION ?? cliPkg.version ?? rootPkg.version ?? "0.0.0", - description: rootPkg.description ?? "Local AI executor with a CLI, local API server, and web UI.", + description: + rootPkg.description ?? "Local AI executor with a CLI, local API server, and web UI.", keywords: rootPkg.keywords ?? [], homepage: rootPkg.homepage, bugs: rootPkg.bugs, @@ -62,17 +63,14 @@ const ALL_TARGETS: Target[] = [ { os: "win32", arch: "arm64" }, ]; -const platformName = (t: Target) => - t.os === "win32" ? "windows" : t.os; +const platformName = (t: Target) => (t.os === "win32" ? "windows" : t.os); const targetPackageName = (t: Target) => ["executor", platformName(t), t.arch, t.abi].filter(Boolean).join("-"); -const bunTarget = (t: Target) => - ["bun", platformName(t), t.arch, t.abi].filter(Boolean).join("-"); +const bunTarget = (t: Target) => ["bun", platformName(t), t.arch, t.abi].filter(Boolean).join("-"); -const binaryName = (t: Target) => - t.os === "win32" ? "executor.exe" : "executor"; +const binaryName = (t: Target) => (t.os === "win32" ? "executor.exe" : "executor"); const isCurrentPlatform = (t: Target) => t.os === process.platform && t.arch === process.arch && !t.abi; @@ -95,7 +93,10 @@ const resolveSecureExecV8 = (t: Target): string | null => { return join(dirname(pkgJson), "secure-exec-v8"); } catch { // Try bun's flat node_modules layout - const bunPath = join(repoRoot, `node_modules/.bun/${pkg.replace("/", "+")}@0.2.1/node_modules/${pkg}/secure-exec-v8`); + const bunPath = join( + repoRoot, + `node_modules/.bun/${pkg.replace("/", "+")}@0.2.1/node_modules/${pkg}/secure-exec-v8`, + ); if (existsSync(bunPath)) return bunPath; return null; } @@ -183,7 +184,8 @@ const secureExecBundlePlugin = async (): Promise => { const bridgeCode = await Bun.file(join(secureExecNodejs, "dist/bridge.js")).text(); const isolateRuntime = await import(join(secureExecCore, "dist/generated/isolate-runtime.js")); const bridgeAttachCode = isolateRuntime.ISOLATE_RUNTIME_SOURCES.bridgeAttach; - const polyfillCodeMap = (await import(join(secureExecCore, "dist/generated/polyfills.js"))).POLYFILL_CODE_MAP as Record; + const polyfillCodeMap = (await import(join(secureExecCore, "dist/generated/polyfills.js"))) + .POLYFILL_CODE_MAP as Record; return { name: "secure-exec-bundle-fixes", @@ -197,7 +199,10 @@ const secureExecBundlePlugin = async (): Promise => { // Replace @secure-exec/nodejs polyfills (which use node-stdlib-browser + esbuild // at runtime) with a shim that serves from pre-bundled POLYFILL_CODE_MAP. build.onResolve({ filter: /polyfills/ }, (args) => { - if (args.importer.includes("@secure-exec/nodejs") || args.importer.includes("@secure-exec+nodejs")) { + if ( + args.importer.includes("@secure-exec/nodejs") || + args.importer.includes("@secure-exec+nodejs") + ) { return { path: args.path, namespace: "polyfills-shim" }; } }); @@ -264,60 +269,60 @@ const buildBinaries = async (targets: Target[], mode: BuildMode) => { try { for (const target of targets) { - const name = targetPackageName(target); - const outDir = join(distDir, name); - const binDir = join(outDir, "bin"); - await mkdir(binDir, { recursive: true }); - - console.log(`Building ${name}...`); - - await Bun.build({ - entrypoints: [join(cliRoot, "src/main.ts")], - minify: mode === "production", - compile: { - target: bunTarget(target) as any, - outfile: join(binDir, binaryName(target)), - }, - plugins: [await secureExecBundlePlugin()], - }); - - // Copy QuickJS WASM next to binary — loaded at runtime by the server - await cp(quickJsWasmPath, join(binDir, "emscripten-module.wasm")); - - // Copy secure-exec-v8 binary next to executor — needed for code execution - const secureExecBin = resolveSecureExecV8(target); - if (secureExecBin && existsSync(secureExecBin)) { - const destName = target.os === "win32" ? "secure-exec-v8.exe" : "secure-exec-v8"; - await cp(secureExecBin, join(binDir, destName)); - await chmod(join(binDir, destName), 0o755); - } - - // Smoke test on current platform - if (isCurrentPlatform(target)) { - const bin = join(binDir, binaryName(target)); - console.log(` Smoke test: ${bin} --version`); - const version = await $`${bin} --version`.text(); - console.log(` OK: ${version.trim()}`); - } - - // Platform package.json - await writeFile( - join(outDir, "package.json"), - JSON.stringify( - { - name, - version: meta.version, - os: [target.os], - cpu: [target.arch], - bin: { executor: `bin/${binaryName(target)}` }, + const name = targetPackageName(target); + const outDir = join(distDir, name); + const binDir = join(outDir, "bin"); + await mkdir(binDir, { recursive: true }); + + console.log(`Building ${name}...`); + + await Bun.build({ + entrypoints: [join(cliRoot, "src/main.ts")], + minify: mode === "production", + compile: { + target: bunTarget(target) as any, + outfile: join(binDir, binaryName(target)), }, - null, - 2, - ) + "\n", - ); + plugins: [await secureExecBundlePlugin()], + }); - binaries[name] = meta.version; - } + // Copy QuickJS WASM next to binary — loaded at runtime by the server + await cp(quickJsWasmPath, join(binDir, "emscripten-module.wasm")); + + // Copy secure-exec-v8 binary next to executor — needed for code execution + const secureExecBin = resolveSecureExecV8(target); + if (secureExecBin && existsSync(secureExecBin)) { + const destName = target.os === "win32" ? "secure-exec-v8.exe" : "secure-exec-v8"; + await cp(secureExecBin, join(binDir, destName)); + await chmod(join(binDir, destName), 0o755); + } + + // Smoke test on current platform + if (isCurrentPlatform(target)) { + const bin = join(binDir, binaryName(target)); + console.log(` Smoke test: ${bin} --version`); + const version = await $`${bin} --version`.text(); + console.log(` OK: ${version.trim()}`); + } + + // Platform package.json + await writeFile( + join(outDir, "package.json"), + JSON.stringify( + { + name, + version: meta.version, + os: [target.os], + cpu: [target.arch], + bin: { executor: `bin/${binaryName(target)}` }, + }, + null, + 2, + ) + "\n", + ); + + binaries[name] = meta.version; + } return binaries; } finally { @@ -385,7 +390,7 @@ const buildWrapperPackage = async (binaries: Record) => { // --------------------------------------------------------------------------- const packageAlreadyPublished = async (pkgDir: string) => { - const pkg = await Bun.file(join(pkgDir, "package.json")).json() as { + const pkg = (await Bun.file(join(pkgDir, "package.json")).json()) as { name?: string; version?: string; }; @@ -448,7 +453,9 @@ const createReleaseAssets = async () => { if (name.includes("linux")) { await $`tar -czf ${join(distDir, `${name}.tar.gz`)} *`.cwd(join(pkgDir, "bin")); } else { - await $`python3 -c ${ZIP_ASSET_SCRIPT} ${join(distDir, `${name}.zip`)}`.cwd(join(pkgDir, "bin")); + await $`python3 -c ${ZIP_ASSET_SCRIPT} ${join(distDir, `${name}.zip`)}`.cwd( + join(pkgDir, "bin"), + ); } console.log(`Created release asset: ${name}`); @@ -659,9 +666,7 @@ if (mode !== "production" && mode !== "development") { } if (command === "binary") { - const targets = values.single - ? ALL_TARGETS.filter(isCurrentPlatform) - : ALL_TARGETS; + const targets = values.single ? ALL_TARGETS.filter(isCurrentPlatform) : ALL_TARGETS; const binaries = await buildBinaries(targets, mode); await buildWrapperPackage(binaries); } else if (command === "release-assets") { diff --git a/apps/cli/src/release.ts b/apps/cli/src/release.ts index 3d4755864..a6e61cd2f 100644 --- a/apps/cli/src/release.ts +++ b/apps/cli/src/release.ts @@ -75,7 +75,7 @@ const runCommand = async (input: CommandInput): Promise => { }; const readVersion = async (): Promise => { - const pkg = await Bun.file(versionPackagePath).json() as { version?: string }; + const pkg = (await Bun.file(versionPackagePath).json()) as { version?: string }; const version = pkg.version?.trim(); if (!version) { @@ -147,15 +147,14 @@ const packWrapperPackage = async (): Promise => { return destinationPath; }; -const collectReleaseAssetPaths = async (wrapperArchivePath: string): Promise> => { +const collectReleaseAssetPaths = async ( + wrapperArchivePath: string, +): Promise> => { const assetNames = (await readdir(distDir)) .filter((entry) => /^executor-.*\.(?:tar\.gz|zip)$/.test(entry)) .sort(); - return [ - wrapperArchivePath, - ...assetNames.map((entry) => join(distDir, entry)), - ]; + return [wrapperArchivePath, ...assetNames.map((entry) => join(distDir, entry))]; }; const githubReleaseExists = async (tag: string, repository: string): Promise => { @@ -182,7 +181,15 @@ const syncGitHubRelease = async (input: { if (await githubReleaseExists(input.tag, repository)) { await runCommand({ command: "gh", - args: ["release", "upload", input.tag, ...input.assetPaths, "--repo", repository, "--clobber"], + args: [ + "release", + "upload", + input.tag, + ...input.assetPaths, + "--repo", + repository, + "--clobber", + ], cwd: repoRoot, }); return; diff --git a/apps/cloud/.mcp.json b/apps/cloud/.mcp.json index 2fd0558e6..65ecfe831 100644 --- a/apps/cloud/.mcp.json +++ b/apps/cloud/.mcp.json @@ -5,4 +5,4 @@ "url": "https://executor.sh/mcp" } } -} \ No newline at end of file +} diff --git a/apps/cloud/drizzle/meta/0000_snapshot.json b/apps/cloud/drizzle/meta/0000_snapshot.json index 4b510d191..b6497f6c5 100644 --- a/apps/cloud/drizzle/meta/0000_snapshot.json +++ b/apps/cloud/drizzle/meta/0000_snapshot.json @@ -60,12 +60,8 @@ "name": "memberships_account_id_accounts_id_fk", "tableFrom": "memberships", "tableTo": "accounts", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["account_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, @@ -73,12 +69,8 @@ "name": "memberships_organization_id_organizations_id_fk", "tableFrom": "memberships", "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } @@ -86,10 +78,7 @@ "compositePrimaryKeys": { "memberships_account_id_organization_id_pk": { "name": "memberships_account_id_organization_id_pk", - "columns": [ - "account_id", - "organization_id" - ] + "columns": ["account_id", "organization_id"] } }, "uniqueConstraints": {}, @@ -163,11 +152,7 @@ "compositePrimaryKeys": { "plugin_kv_organization_id_namespace_key_pk": { "name": "plugin_kv_organization_id_namespace_key_pk", - "columns": [ - "organization_id", - "namespace", - "key" - ] + "columns": ["organization_id", "namespace", "key"] } }, "uniqueConstraints": {}, @@ -234,10 +219,7 @@ "compositePrimaryKeys": { "policies_id_organization_id_pk": { "name": "policies_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -298,10 +280,7 @@ "compositePrimaryKeys": { "secrets_id_organization_id_pk": { "name": "secrets_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -356,10 +335,7 @@ "compositePrimaryKeys": { "sources_id_organization_id_pk": { "name": "sources_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -395,10 +371,7 @@ "compositePrimaryKeys": { "tool_definitions_name_organization_id_pk": { "name": "tool_definitions_name_organization_id_pk", - "columns": [ - "name", - "organization_id" - ] + "columns": ["name", "organization_id"] } }, "uniqueConstraints": {}, @@ -477,10 +450,7 @@ "compositePrimaryKeys": { "tools_id_organization_id_pk": { "name": "tools_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -500,4 +470,4 @@ "schemas": {}, "tables": {} } -} \ No newline at end of file +} diff --git a/apps/cloud/drizzle/meta/_journal.json b/apps/cloud/drizzle/meta/_journal.json index b6abb34c8..87cf42cc2 100644 --- a/apps/cloud/drizzle/meta/_journal.json +++ b/apps/cloud/drizzle/meta/_journal.json @@ -10,4 +10,4 @@ "breakpoints": true } ] -} \ No newline at end of file +} diff --git a/apps/cloud/package.json b/apps/cloud/package.json index 56030db50..ac6e449d7 100644 --- a/apps/cloud/package.json +++ b/apps/cloud/package.json @@ -3,6 +3,20 @@ "version": "1.4.0", "private": true, "type": "module", + "scripts": { + "dev": "bun run dev:proxy && concurrently -n db,vite -c blue,green \"bun run dev:db\" \"bun run dev:vite\"", + "dev:proxy": "portless proxy start --port 1355 || true", + "dev:db": "bun run scripts/dev-db.ts", + "dev:vite": "CLOUDFLARE_INCLUDE_PROCESS_ENV=true op run --env-file=.env.op -- portless run --name executor-cloud vite dev", + "db:generate": "drizzle-kit generate", + "build": "vite build", + "preview": "vite preview", + "deploy": "vite build && wrangler deploy", + "cf-typegen": "wrangler types", + "typecheck": "tsc --noEmit", + "test": "vitest run", + "test:watch": "vitest" + }, "dependencies": { "@cloudflare/vite-plugin": "^1.31.1", "@effect-atom/atom": "^0.5.0", @@ -49,19 +63,5 @@ "vite": "catalog:", "vitest": "^4.1.4", "wrangler": "^4.81.0" - }, - "scripts": { - "dev": "bun run dev:proxy && concurrently -n db,vite -c blue,green \"bun run dev:db\" \"bun run dev:vite\"", - "dev:proxy": "portless proxy start --port 1355 || true", - "dev:db": "bun run scripts/dev-db.ts", - "dev:vite": "CLOUDFLARE_INCLUDE_PROCESS_ENV=true op run --env-file=.env.op -- portless run --name executor-cloud vite dev", - "db:generate": "drizzle-kit generate", - "build": "vite build", - "preview": "vite preview", - "deploy": "vite build && wrangler deploy", - "cf-typegen": "wrangler types", - "typecheck": "tsc --noEmit", - "test": "vitest run", - "test:watch": "vitest" } } diff --git a/apps/cloud/src/api.ts b/apps/cloud/src/api.ts index 7b55bf4c6..e667fdb0c 100644 --- a/apps/cloud/src/api.ts +++ b/apps/cloud/src/api.ts @@ -13,26 +13,15 @@ import { import { Effect, Layer } from "effect"; import { CoreExecutorApi } from "@executor/api"; -import { - CoreHandlers, - ExecutorService, - ExecutionEngineService, -} from "@executor/api/server"; +import { CoreHandlers, ExecutorService, ExecutionEngineService } from "@executor/api/server"; import { createExecutionEngine } from "@executor/execution"; -import { - makeDynamicWorkerExecutor, - type CodeExecutor, -} from "@executor/runtime-dynamic-worker"; +import { makeDynamicWorkerExecutor, type CodeExecutor } from "@executor/runtime-dynamic-worker"; import { OpenApiGroup, OpenApiExtensionService, OpenApiHandlers, } from "@executor/plugin-openapi/api"; -import { - McpGroup, - McpExtensionService, - McpHandlers, -} from "@executor/plugin-mcp/api"; +import { McpGroup, McpExtensionService, McpHandlers } from "@executor/plugin-mcp/api"; import { GoogleDiscoveryGroup, GoogleDiscoveryExtensionService, @@ -118,10 +107,7 @@ const RouterConfig = HttpRouter.setRouterConfig({ maxParamLength: 1000 }); const createNonProtectedHandler = () => HttpApiBuilder.toWebHandler( - NonProtectedApiLive.pipe( - Layer.provideMerge(SharedServices), - Layer.provideMerge(RouterConfig), - ), + NonProtectedApiLive.pipe(Layer.provideMerge(SharedServices), Layer.provideMerge(RouterConfig)), { middleware: HttpMiddleware.logger }, ); @@ -158,9 +144,7 @@ const buildProtectedHandler = ( Layer.provideMerge(ProtectedCloudApiLive), Layer.provideMerge(requestServices), Layer.provideMerge(SharedServices), - Layer.provideMerge( - HttpRouter.setRouterConfig({ maxParamLength: 1000 }), - ), + Layer.provideMerge(HttpRouter.setRouterConfig({ maxParamLength: 1000 })), ), { middleware: HttpMiddleware.logger }, ); diff --git a/apps/cloud/src/auth/api.ts b/apps/cloud/src/auth/api.ts index fea488d76..d6417f8fe 100644 --- a/apps/cloud/src/auth/api.ts +++ b/apps/cloud/src/auth/api.ts @@ -32,9 +32,7 @@ export const AUTH_PATHS = { /** Public auth endpoints — no authentication required */ export class CloudAuthPublicApi extends HttpApiGroup.make("cloudAuthPublic") - .add( - HttpApiEndpoint.get("login")`/auth/login`, - ) + .add(HttpApiEndpoint.get("login")`/auth/login`) .add( HttpApiEndpoint.get("callback")`/auth/callback` .setUrlParams(AuthCallbackSearch) @@ -44,13 +42,6 @@ export class CloudAuthPublicApi extends HttpApiGroup.make("cloudAuthPublic") /** Session auth endpoints — require a logged-in user, may not have an org */ export class CloudAuthApi extends HttpApiGroup.make("cloudAuth") - .add( - HttpApiEndpoint.get("me")`/auth/me` - .addSuccess(AuthMeResponse) - .addError(UserStoreError), - ) - .add( - HttpApiEndpoint.post("logout")`/auth/logout`, - ) - .middleware(SessionAuth) -{} + .add(HttpApiEndpoint.get("me")`/auth/me`.addSuccess(AuthMeResponse).addError(UserStoreError)) + .add(HttpApiEndpoint.post("logout")`/auth/logout`) + .middleware(SessionAuth) {} diff --git a/apps/cloud/src/auth/errors.ts b/apps/cloud/src/auth/errors.ts index 17a4d0ec7..24d8bd3d4 100644 --- a/apps/cloud/src/auth/errors.ts +++ b/apps/cloud/src/auth/errors.ts @@ -19,16 +19,12 @@ export class WorkOSError extends Schema.TaggedError()( * tagged error, so callers never observe this tag directly — its only job is * to keep the internal failure channel typed instead of `unknown` / `Error`. */ -export class ServiceAdapterError extends Data.TaggedError( - "ServiceAdapterError", -)<{ +export class ServiceAdapterError extends Data.TaggedError("ServiceAdapterError")<{ readonly cause: unknown; }> {} /** Lift a Promise-returning function into Effect with a typed failure channel. */ -export const tryPromiseService = ( - fn: () => Promise, -): Effect.Effect => +export const tryPromiseService = (fn: () => Promise): Effect.Effect => Effect.tryPromise({ try: fn, catch: (cause) => new ServiceAdapterError({ cause }), @@ -50,9 +46,7 @@ export const withServiceLogging = ( effect: Effect.Effect, ): Effect.Effect => effect.pipe( - Effect.tapErrorCause((cause) => - Effect.logError(`${name} failed`, cause), - ), + Effect.tapErrorCause((cause) => Effect.logError(`${name} failed`, cause)), Effect.mapError(publicError), Effect.withSpan(name), ); diff --git a/apps/cloud/src/auth/handlers.ts b/apps/cloud/src/auth/handlers.ts index b63e581a3..892ed474c 100644 --- a/apps/cloud/src/auth/handlers.ts +++ b/apps/cloud/src/auth/handlers.ts @@ -21,9 +21,7 @@ const COOKIE_OPTIONS = { // (me/logout). The session group has SessionAuth on it. // --------------------------------------------------------------------------- -export const NonProtectedApi = HttpApi.make("cloudWeb") - .add(CloudAuthPublicApi) - .add(CloudAuthApi); +export const NonProtectedApi = HttpApi.make("cloudWeb").add(CloudAuthPublicApi).add(CloudAuthApi); // --------------------------------------------------------------------------- // Public auth handlers (no authentication required) @@ -63,14 +61,11 @@ export const CloudAuthPublicHandlers = HttpApiBuilder.group( // session so it includes the new org_id claim. if (!organizationId) { const name = - [result.user.firstName, result.user.lastName] - .filter(Boolean) - .join(" ") || result.user.email; + [result.user.firstName, result.user.lastName].filter(Boolean).join(" ") || + result.user.email; const org = yield* workos.createOrganization(`${name}'s Workspace`); yield* workos.createMembership(org.id, result.user.id); - yield* users.use((s) => - s.upsertOrganization({ id: org.id, name: org.name }), - ); + yield* users.use((s) => s.upsertOrganization({ id: org.id, name: org.name })); if (sealedSession) { const refreshed = yield* workos.refreshSession(sealedSession, org.id); diff --git a/apps/cloud/src/auth/middleware-live.ts b/apps/cloud/src/auth/middleware-live.ts index 6cf2485f0..303eaca36 100644 --- a/apps/cloud/src/auth/middleware-live.ts +++ b/apps/cloud/src/auth/middleware-live.ts @@ -5,12 +5,7 @@ import { Effect, Layer, Redacted } from "effect"; -import { - NoOrganization, - OrgAuth, - SessionAuth, - Unauthorized, -} from "./middleware"; +import { NoOrganization, OrgAuth, SessionAuth, Unauthorized } from "./middleware"; import { WorkOSAuth } from "./workos"; export const SessionAuthLive = Layer.effect( @@ -31,9 +26,7 @@ export const SessionAuthLive = Layer.effect( return { accountId: result.userId, email: result.email, - name: - `${result.firstName ?? ""} ${result.lastName ?? ""}`.trim() || - null, + name: `${result.firstName ?? ""} ${result.lastName ?? ""}`.trim() || null, avatarUrl: result.avatarUrl ?? null, organizationId: result.organizationId ?? null, refreshedSession: result.refreshedSession ?? null, @@ -66,9 +59,7 @@ export const OrgAuthLive = Layer.effect( accountId: result.userId, organizationId: result.organizationId, email: result.email, - name: - `${result.firstName ?? ""} ${result.lastName ?? ""}`.trim() || - null, + name: `${result.firstName ?? ""} ${result.lastName ?? ""}`.trim() || null, avatarUrl: result.avatarUrl ?? null, }; }), diff --git a/apps/cloud/src/auth/middleware.ts b/apps/cloud/src/auth/middleware.ts index 7123d9ded..25f8b2f39 100644 --- a/apps/cloud/src/auth/middleware.ts +++ b/apps/cloud/src/auth/middleware.ts @@ -47,16 +47,13 @@ export class NoOrganization extends Schema.TaggedError()( // SessionAuth — resolves the WorkOS session cookie, provides SessionContext // --------------------------------------------------------------------------- -export class SessionAuth extends HttpApiMiddleware.Tag()( - "SessionAuth", - { - failure: Unauthorized, - provides: SessionContext, - security: { - cookie: HttpApiSecurity.apiKey({ in: "cookie", key: "wos-session" }), - }, +export class SessionAuth extends HttpApiMiddleware.Tag()("SessionAuth", { + failure: Unauthorized, + provides: SessionContext, + security: { + cookie: HttpApiSecurity.apiKey({ in: "cookie", key: "wos-session" }), }, -) {} +}) {} // --------------------------------------------------------------------------- // OrgAuth — like SessionAuth but rejects sessions with no organization diff --git a/apps/cloud/src/auth/workos.ts b/apps/cloud/src/auth/workos.ts index 07d7f6439..1b7a92b81 100644 --- a/apps/cloud/src/auth/workos.ts +++ b/apps/cloud/src/auth/workos.ts @@ -13,7 +13,6 @@ const COOKIE_NAME = "wos-session"; // Service // --------------------------------------------------------------------------- - const make = Effect.gen(function* () { const apiKey = server.WORKOS_API_KEY; const clientId = server.WORKOS_CLIENT_ID; @@ -63,7 +62,8 @@ const make = Effect.gen(function* () { Effect.orElseSucceed(() => ({ authenticated: false as const })), ); - if (!refreshed.authenticated || !("sealedSession" in refreshed) || !refreshed.sealedSession) return null; + if (!refreshed.authenticated || !("sealedSession" in refreshed) || !refreshed.sealedSession) + return null; return { userId: refreshed.user.id, @@ -147,9 +147,7 @@ export class WorkOSAuth extends Context.Tag("@executor/cloud/WorkOSAuth")< WorkOSAuth, WorkOSAuthService >() { - static Default = Layer.effect(this, make).pipe( - Layer.annotateSpans({ module: "WorkOSAuth" }), - ); + static Default = Layer.effect(this, make).pipe(Layer.annotateSpans({ module: "WorkOSAuth" })); } const parseCookie = (cookieHeader: string | null, name: string): string | null => { diff --git a/apps/cloud/src/env.ts b/apps/cloud/src/env.ts index 7300fae67..106704143 100644 --- a/apps/cloud/src/env.ts +++ b/apps/cloud/src/env.ts @@ -1,21 +1,12 @@ import { createEnv, Env } from "@executor/env"; const sharedShape = { - NODE_ENV: Env.literalOr( - "NODE_ENV", - "development", - "development", - "test", - "production", - ), + NODE_ENV: Env.literalOr("NODE_ENV", "development", "development", "test", "production"), }; const serverShape = { DATABASE_URL: Env.stringOr("DATABASE_URL", ""), - ENCRYPTION_KEY: Env.stringOr( - "ENCRYPTION_KEY", - "local-dev-encryption-key", - ), + ENCRYPTION_KEY: Env.stringOr("ENCRYPTION_KEY", "local-dev-encryption-key"), WORKOS_API_KEY: Env.string("WORKOS_API_KEY"), WORKOS_CLIENT_ID: Env.string("WORKOS_CLIENT_ID"), WORKOS_COOKIE_PASSWORD: Env.string("WORKOS_COOKIE_PASSWORD"), @@ -26,14 +17,15 @@ type SharedEnv = Readonly<{ NODE_ENV: "development" | "test" | "production"; }>; -type ServerEnv = SharedEnv & Readonly<{ - DATABASE_URL: string; - ENCRYPTION_KEY: string; - WORKOS_API_KEY: string; - WORKOS_CLIENT_ID: string; - WORKOS_COOKIE_PASSWORD: string; - VITE_PUBLIC_SITE_URL: string; -}>; +type ServerEnv = SharedEnv & + Readonly<{ + DATABASE_URL: string; + ENCRYPTION_KEY: string; + WORKOS_API_KEY: string; + WORKOS_CLIENT_ID: string; + WORKOS_COOKIE_PASSWORD: string; + VITE_PUBLIC_SITE_URL: string; + }>; type WebEnv = Readonly>; @@ -42,15 +34,17 @@ export const shared = createEnv(sharedShape, { emptyStringAsUndefined: true, }) as SharedEnv; -export const web = createEnv({}, { - prefix: "PUBLIC_", - runtimeEnv: process.env, - emptyStringAsUndefined: true, -}) as WebEnv; +export const web = createEnv( + {}, + { + prefix: "PUBLIC_", + runtimeEnv: process.env, + emptyStringAsUndefined: true, + }, +) as WebEnv; export const server = createEnv(serverShape, { extends: [shared], runtimeEnv: process.env, emptyStringAsUndefined: true, }) as ServerEnv; - diff --git a/apps/cloud/src/mcp-session.ts b/apps/cloud/src/mcp-session.ts index 77b3a386a..67f3796ed 100644 --- a/apps/cloud/src/mcp-session.ts +++ b/apps/cloud/src/mcp-session.ts @@ -39,9 +39,7 @@ const DbLive = DbService.Live; const UserStoreLive = UserStoreService.Live.pipe(Layer.provide(DbLive)); const Services = Layer.mergeAll(DbLive, UserStoreLive); -class OrganizationNotFoundError extends Data.TaggedError( - "OrganizationNotFoundError", -)<{ +class OrganizationNotFoundError extends Data.TaggedError("OrganizationNotFoundError")<{ readonly organizationId: string; }> {} @@ -54,11 +52,7 @@ const initSession = (organizationId: string) => return yield* new OrganizationNotFoundError({ organizationId }); } - const executor = yield* createOrgExecutor( - org.id, - org.name, - server.ENCRYPTION_KEY, - ); + const executor = yield* createOrgExecutor(org.id, org.name, server.ENCRYPTION_KEY); const codeExecutor = makeDynamicWorkerExecutor({ loader: env.LOADER }); const mcpServer = yield* Effect.promise(() => @@ -73,10 +67,10 @@ const initSession = (organizationId: string) => // --------------------------------------------------------------------------- const jsonRpcError = (status: number, code: number, message: string) => - new Response( - JSON.stringify({ jsonrpc: "2.0", error: { code, message }, id: null }), - { status, headers: { "content-type": "application/json" } }, - ); + new Response(JSON.stringify({ jsonrpc: "2.0", error: { code, message }, id: null }), { + status, + headers: { "content-type": "application/json" }, + }); // --------------------------------------------------------------------------- // Durable Object diff --git a/apps/cloud/src/mcp.ts b/apps/cloud/src/mcp.ts index a676f7095..a3f23adee 100644 --- a/apps/cloud/src/mcp.ts +++ b/apps/cloud/src/mcp.ts @@ -95,11 +95,10 @@ const unauthorized = () => // --------------------------------------------------------------------------- const jsonRpcError = (status: number, code: number, message: string) => - new Response( - JSON.stringify({ jsonrpc: "2.0", error: { code, message }, id: null }), - { status, headers: { "content-type": "application/json" } }, - ); - + new Response(JSON.stringify({ jsonrpc: "2.0", error: { code, message }, id: null }), { + status, + headers: { "content-type": "application/json" }, + }); /** * Route an MCP request to a session DO. @@ -107,10 +106,7 @@ const jsonRpcError = (status: number, code: number, message: string) => * - No session header → create a new DO (initialize flow) * - With session header → route to existing DO */ -const handleMcpRequest_POST = async ( - request: Request, - token: VerifiedToken, -): Promise => { +const handleMcpRequest_POST = async (request: Request, token: VerifiedToken): Promise => { if (!token.organizationId) { return jsonRpcError(403, -32001, "No organization in session — log in via the web app first"); } @@ -165,20 +161,22 @@ const handleMcpRequest_GET = async (request: Request): Promise => { // Main request handler // --------------------------------------------------------------------------- -export const handleMcpRequest = async ( - request: Request, -): Promise => { +export const handleMcpRequest = async (request: Request): Promise => { const url = new URL(request.url); const pathname = url.pathname; // CORS preflight for MCP paths - if (request.method === "OPTIONS" && (pathname === "/mcp" || pathname.startsWith("/.well-known/"))) { + if ( + request.method === "OPTIONS" && + (pathname === "/mcp" || pathname.startsWith("/.well-known/")) + ) { return new Response(null, { status: 204, headers: { "access-control-allow-origin": "*", "access-control-allow-methods": "GET, POST, DELETE, OPTIONS", - "access-control-allow-headers": "authorization, content-type, mcp-session-id, accept, mcp-protocol-version", + "access-control-allow-headers": + "authorization, content-type, mcp-session-id, accept, mcp-protocol-version", "access-control-expose-headers": "mcp-session-id", }, }); diff --git a/apps/cloud/src/routeTree.gen.ts b/apps/cloud/src/routeTree.gen.ts index 33b5b4066..9845d53da 100644 --- a/apps/cloud/src/routeTree.gen.ts +++ b/apps/cloud/src/routeTree.gen.ts @@ -8,130 +8,114 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -import { Route as rootRouteImport } from './routes/__root' -import { Route as ToolsRouteImport } from './routes/tools' -import { Route as SecretsRouteImport } from './routes/secrets' -import { Route as IndexRouteImport } from './routes/index' -import { Route as SourcesNamespaceRouteImport } from './routes/sources.$namespace' -import { Route as SourcesAddPluginKeyRouteImport } from './routes/sources.add.$pluginKey' +import { Route as rootRouteImport } from "./routes/__root"; +import { Route as ToolsRouteImport } from "./routes/tools"; +import { Route as SecretsRouteImport } from "./routes/secrets"; +import { Route as IndexRouteImport } from "./routes/index"; +import { Route as SourcesNamespaceRouteImport } from "./routes/sources.$namespace"; +import { Route as SourcesAddPluginKeyRouteImport } from "./routes/sources.add.$pluginKey"; const ToolsRoute = ToolsRouteImport.update({ - id: '/tools', - path: '/tools', + id: "/tools", + path: "/tools", getParentRoute: () => rootRouteImport, -} as any) +} as any); const SecretsRoute = SecretsRouteImport.update({ - id: '/secrets', - path: '/secrets', + id: "/secrets", + path: "/secrets", getParentRoute: () => rootRouteImport, -} as any) +} as any); const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', + id: "/", + path: "/", getParentRoute: () => rootRouteImport, -} as any) +} as any); const SourcesNamespaceRoute = SourcesNamespaceRouteImport.update({ - id: '/sources/$namespace', - path: '/sources/$namespace', + id: "/sources/$namespace", + path: "/sources/$namespace", getParentRoute: () => rootRouteImport, -} as any) +} as any); const SourcesAddPluginKeyRoute = SourcesAddPluginKeyRouteImport.update({ - id: '/sources/add/$pluginKey', - path: '/sources/add/$pluginKey', + id: "/sources/add/$pluginKey", + path: "/sources/add/$pluginKey", getParentRoute: () => rootRouteImport, -} as any) +} as any); export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/secrets': typeof SecretsRoute - '/tools': typeof ToolsRoute - '/sources/$namespace': typeof SourcesNamespaceRoute - '/sources/add/$pluginKey': typeof SourcesAddPluginKeyRoute + "/": typeof IndexRoute; + "/secrets": typeof SecretsRoute; + "/tools": typeof ToolsRoute; + "/sources/$namespace": typeof SourcesNamespaceRoute; + "/sources/add/$pluginKey": typeof SourcesAddPluginKeyRoute; } export interface FileRoutesByTo { - '/': typeof IndexRoute - '/secrets': typeof SecretsRoute - '/tools': typeof ToolsRoute - '/sources/$namespace': typeof SourcesNamespaceRoute - '/sources/add/$pluginKey': typeof SourcesAddPluginKeyRoute + "/": typeof IndexRoute; + "/secrets": typeof SecretsRoute; + "/tools": typeof ToolsRoute; + "/sources/$namespace": typeof SourcesNamespaceRoute; + "/sources/add/$pluginKey": typeof SourcesAddPluginKeyRoute; } export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/secrets': typeof SecretsRoute - '/tools': typeof ToolsRoute - '/sources/$namespace': typeof SourcesNamespaceRoute - '/sources/add/$pluginKey': typeof SourcesAddPluginKeyRoute + __root__: typeof rootRouteImport; + "/": typeof IndexRoute; + "/secrets": typeof SecretsRoute; + "/tools": typeof ToolsRoute; + "/sources/$namespace": typeof SourcesNamespaceRoute; + "/sources/add/$pluginKey": typeof SourcesAddPluginKeyRoute; } export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - | '/' - | '/secrets' - | '/tools' - | '/sources/$namespace' - | '/sources/add/$pluginKey' - fileRoutesByTo: FileRoutesByTo - to: - | '/' - | '/secrets' - | '/tools' - | '/sources/$namespace' - | '/sources/add/$pluginKey' - id: - | '__root__' - | '/' - | '/secrets' - | '/tools' - | '/sources/$namespace' - | '/sources/add/$pluginKey' - fileRoutesById: FileRoutesById + fileRoutesByFullPath: FileRoutesByFullPath; + fullPaths: "/" | "/secrets" | "/tools" | "/sources/$namespace" | "/sources/add/$pluginKey"; + fileRoutesByTo: FileRoutesByTo; + to: "/" | "/secrets" | "/tools" | "/sources/$namespace" | "/sources/add/$pluginKey"; + id: "__root__" | "/" | "/secrets" | "/tools" | "/sources/$namespace" | "/sources/add/$pluginKey"; + fileRoutesById: FileRoutesById; } export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - SecretsRoute: typeof SecretsRoute - ToolsRoute: typeof ToolsRoute - SourcesNamespaceRoute: typeof SourcesNamespaceRoute - SourcesAddPluginKeyRoute: typeof SourcesAddPluginKeyRoute + IndexRoute: typeof IndexRoute; + SecretsRoute: typeof SecretsRoute; + ToolsRoute: typeof ToolsRoute; + SourcesNamespaceRoute: typeof SourcesNamespaceRoute; + SourcesAddPluginKeyRoute: typeof SourcesAddPluginKeyRoute; } -declare module '@tanstack/react-router' { +declare module "@tanstack/react-router" { interface FileRoutesByPath { - '/tools': { - id: '/tools' - path: '/tools' - fullPath: '/tools' - preLoaderRoute: typeof ToolsRouteImport - parentRoute: typeof rootRouteImport - } - '/secrets': { - id: '/secrets' - path: '/secrets' - fullPath: '/secrets' - preLoaderRoute: typeof SecretsRouteImport - parentRoute: typeof rootRouteImport - } - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/sources/$namespace': { - id: '/sources/$namespace' - path: '/sources/$namespace' - fullPath: '/sources/$namespace' - preLoaderRoute: typeof SourcesNamespaceRouteImport - parentRoute: typeof rootRouteImport - } - '/sources/add/$pluginKey': { - id: '/sources/add/$pluginKey' - path: '/sources/add/$pluginKey' - fullPath: '/sources/add/$pluginKey' - preLoaderRoute: typeof SourcesAddPluginKeyRouteImport - parentRoute: typeof rootRouteImport - } + "/tools": { + id: "/tools"; + path: "/tools"; + fullPath: "/tools"; + preLoaderRoute: typeof ToolsRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/secrets": { + id: "/secrets"; + path: "/secrets"; + fullPath: "/secrets"; + preLoaderRoute: typeof SecretsRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/": { + id: "/"; + path: "/"; + fullPath: "/"; + preLoaderRoute: typeof IndexRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/sources/$namespace": { + id: "/sources/$namespace"; + path: "/sources/$namespace"; + fullPath: "/sources/$namespace"; + preLoaderRoute: typeof SourcesNamespaceRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/sources/add/$pluginKey": { + id: "/sources/add/$pluginKey"; + path: "/sources/add/$pluginKey"; + fullPath: "/sources/add/$pluginKey"; + preLoaderRoute: typeof SourcesAddPluginKeyRouteImport; + parentRoute: typeof rootRouteImport; + }; } } @@ -141,17 +125,17 @@ const rootRouteChildren: RootRouteChildren = { ToolsRoute: ToolsRoute, SourcesNamespaceRoute: SourcesNamespaceRoute, SourcesAddPluginKeyRoute: SourcesAddPluginKeyRoute, -} +}; export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) - ._addFileTypes() + ._addFileTypes(); -import type { getRouter } from './router.tsx' -import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { +import type { getRouter } from "./router.tsx"; +import type { startInstance } from "./start.ts"; +declare module "@tanstack/react-start" { interface Register { - ssr: true - router: Awaited> - config: Awaited> + ssr: true; + router: Awaited>; + config: Awaited>; } } diff --git a/apps/cloud/src/routes/__root.tsx b/apps/cloud/src/routes/__root.tsx index a4e38f87c..a4cdda18e 100644 --- a/apps/cloud/src/routes/__root.tsx +++ b/apps/cloud/src/routes/__root.tsx @@ -16,7 +16,10 @@ export const Route = createRootRoute({ links: [ { rel: "preconnect", href: "https://fonts.googleapis.com" }, { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }, - { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap", + }, { rel: "stylesheet", href: appCss }, ], }), diff --git a/apps/cloud/src/routes/sources.add.$pluginKey.tsx b/apps/cloud/src/routes/sources.add.$pluginKey.tsx index 977eaa35b..cb739ee06 100644 --- a/apps/cloud/src/routes/sources.add.$pluginKey.tsx +++ b/apps/cloud/src/routes/sources.add.$pluginKey.tsx @@ -25,6 +25,13 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({ component: () => { const { pluginKey } = Route.useParams(); const { url, preset } = Route.useSearch(); - return ; + return ( + + ); }, }); diff --git a/apps/cloud/src/services/db.test.ts b/apps/cloud/src/services/db.test.ts index 66135b0ef..02f598669 100644 --- a/apps/cloud/src/services/db.test.ts +++ b/apps/cloud/src/services/db.test.ts @@ -28,11 +28,7 @@ import { makeUserStore } from "./user-store"; const program = (body: Effect.Effect) => Effect.runPromise( - body.pipe(Effect.provide(DbService.Live), Effect.scoped) as Effect.Effect< - A, - E, - never - >, + body.pipe(Effect.provide(DbService.Live), Effect.scoped) as Effect.Effect, ); describe("DbService", () => { @@ -44,7 +40,9 @@ describe("DbService", () => { return rows; }), ); - expect(Array.isArray(result) ? result[0] : (result as { rows: unknown[] }).rows[0]).toBeDefined(); + expect( + Array.isArray(result) ? result[0] : (result as { rows: unknown[] }).rows[0], + ).toBeDefined(); }); it("round-trips an account through the user store", async () => { @@ -110,9 +108,7 @@ describe("DbService", () => { return yield* Effect.scoped( Effect.gen(function* () { const db = yield* DbService; - return yield* Effect.promise(() => - makeUserStore(db).getOrganization(orgId), - ); + return yield* Effect.promise(() => makeUserStore(db).getOrganization(orgId)); }).pipe(Effect.provide(DbService.Live)), ) as Effect.Effect<{ id: string; name: string } | null, never, never>; }) as Effect.Effect<{ id: string; name: string } | null, never, never>, diff --git a/apps/cloud/src/services/db.ts b/apps/cloud/src/services/db.ts index b2a93a541..70568865d 100644 --- a/apps/cloud/src/services/db.ts +++ b/apps/cloud/src/services/db.ts @@ -43,10 +43,7 @@ const makeSql = () => onnotice: () => undefined, }); -export class DbService extends Context.Tag("@executor/cloud/DbService")< - DbService, - DrizzleDb ->() { +export class DbService extends Context.Tag("@executor/cloud/DbService")() { static Live = Layer.scoped( this, Effect.acquireRelease( diff --git a/apps/cloud/src/services/executor.ts b/apps/cloud/src/services/executor.ts index a398210ab..4590f3154 100644 --- a/apps/cloud/src/services/executor.ts +++ b/apps/cloud/src/services/executor.ts @@ -42,10 +42,7 @@ export const createOrgExecutor = ( bindingStore: makeKvBindingStore(kv, "mcp"), }), googleDiscoveryPlugin({ - bindingStore: makeKvGoogleDiscoveryBindingStore( - kv, - "google-discovery", - ), + bindingStore: makeKvGoogleDiscoveryBindingStore(kv, "google-discovery"), }), graphqlPlugin({ operationStore: makeKvGraphqlOperationStore(kv, "graphql"), diff --git a/apps/cloud/src/services/schema.ts b/apps/cloud/src/services/schema.ts index 9b46845db..1038c67f3 100644 --- a/apps/cloud/src/services/schema.ts +++ b/apps/cloud/src/services/schema.ts @@ -40,9 +40,7 @@ export const memberships = pgTable( organizationId: text("organization_id") .notNull() .references(() => organizations.id, { onDelete: "cascade" }), - createdAt: timestamp("created_at", { withTimezone: true }) - .notNull() - .defaultNow(), + createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(), }, (t) => ({ pk: primaryKey({ columns: [t.accountId, t.organizationId] }), diff --git a/apps/cloud/src/services/user-store.ts b/apps/cloud/src/services/user-store.ts index 5189f393f..6879fbd33 100644 --- a/apps/cloud/src/services/user-store.ts +++ b/apps/cloud/src/services/user-store.ts @@ -19,11 +19,7 @@ export const makeUserStore = (db: DrizzleDb) => ({ // --- Accounts --- ensureAccount: async (id: string) => { - const [result] = await db - .insert(accounts) - .values({ id }) - .onConflictDoNothing() - .returning(); + const [result] = await db.insert(accounts).values({ id }).onConflictDoNothing().returning(); return result ?? (await db.select().from(accounts).where(eq(accounts.id, id)))[0]!; }, diff --git a/apps/cloud/src/start.ts b/apps/cloud/src/start.ts index 6fca16938..ed8bdd5a8 100644 --- a/apps/cloud/src/start.ts +++ b/apps/cloud/src/start.ts @@ -7,7 +7,14 @@ import { handleMcpRequest } from "./mcp"; // Marketing routes — proxied to the marketing worker via service binding // --------------------------------------------------------------------------- -const MARKETING_PATHS = ["/home", "/setup", "/api/detect", "/_astro", "/favicon.ico", "/favicon.svg"]; +const MARKETING_PATHS = [ + "/home", + "/setup", + "/api/detect", + "/_astro", + "/favicon.ico", + "/favicon.svg", +]; const isMarketingPath = (pathname: string) => MARKETING_PATHS.some((p) => pathname === p || pathname.startsWith(`${p}/`)); diff --git a/apps/cloud/src/web/auth.tsx b/apps/cloud/src/web/auth.tsx index 335ca7605..c9a659005 100644 --- a/apps/cloud/src/web/auth.tsx +++ b/apps/cloud/src/web/auth.tsx @@ -23,10 +23,9 @@ type AuthOrganization = { // Auth atom — typed query against CloudAuthApi // --------------------------------------------------------------------------- -export const authAtom = - CloudApiClient.query("cloudAuth", "me", { - timeToLive: "5 minutes", - }); +export const authAtom = CloudApiClient.query("cloudAuth", "me", { + timeToLive: "5 minutes", +}); // --------------------------------------------------------------------------- // Provider + hook @@ -59,11 +58,7 @@ const AuthProviderClient = ({ children }: { children: React.ReactNode }) => { export const AuthProvider = ({ children }: { children: React.ReactNode }) => { if (typeof window === "undefined") { - return ( - - {children} - - ); + return {children}; } return {children}; }; diff --git a/apps/cloud/src/web/client.tsx b/apps/cloud/src/web/client.tsx index 2d2e598cc..2a3836d8b 100644 --- a/apps/cloud/src/web/client.tsx +++ b/apps/cloud/src/web/client.tsx @@ -10,13 +10,10 @@ import { CloudAuthApi } from "../auth/api"; const CloudApi = addGroup(CloudAuthApi); -class CloudApiClient extends AtomHttpApi.Tag()( - "CloudApiClient", - { - api: CloudApi, - httpClient: FetchHttpClient.layer, - baseUrl: getBaseUrl(), - }, -) {} +class CloudApiClient extends AtomHttpApi.Tag()("CloudApiClient", { + api: CloudApi, + httpClient: FetchHttpClient.layer, + baseUrl: getBaseUrl(), +}) {} export { CloudApiClient }; diff --git a/apps/cloud/src/web/pages/login.tsx b/apps/cloud/src/web/pages/login.tsx index b5d4e343a..97b164c61 100644 --- a/apps/cloud/src/web/pages/login.tsx +++ b/apps/cloud/src/web/pages/login.tsx @@ -7,9 +7,7 @@ export const LoginPage = () => {

Executor

-

- Sign in to manage your tools and sources -

+

Sign in to manage your tools and sources

void }) { {value.map((s) => { const detailPath = `/sources/${s.id}`; const active = - props.pathname === detailPath || - props.pathname.startsWith(`${detailPath}/`); + props.pathname === detailPath || props.pathname.startsWith(`${detailPath}/`); return ( n[0]).join("").slice(0, 2).toUpperCase() + ? auth.user.name + .split(" ") + .map((n) => n[0]) + .join("") + .slice(0, 2) + .toUpperCase() : auth.user.email[0]!.toUpperCase(); return (
{auth.user.avatarUrl ? ( - + ) : (
{initials} @@ -105,9 +105,7 @@ function UserFooter() { {auth.user.name ?? auth.user.email}

{auth.organization && ( -

- {auth.organization.name} -

+

{auth.organization.name}

)}
@@ -117,7 +115,13 @@ function UserFooter() { title="Sign out" > - +
@@ -128,11 +132,7 @@ function UserFooter() { // ── SidebarContent ─────────────────────────────────────────────────────── -function SidebarContent(props: { - pathname: string; - onNavigate?: () => void; - showBrand?: boolean; -}) { +function SidebarContent(props: { pathname: string; onNavigate?: () => void; showBrand?: boolean }) { const isHome = props.pathname === "/"; const isSecrets = props.pathname === "/secrets"; @@ -141,26 +141,14 @@ function SidebarContent(props: { {props.showBrand !== false && (
- - executor - + executor
)}
); } @@ -274,27 +294,15 @@ function SidebarContent(props: { {props.showBrand !== false && (
- - executor - + executor
)}
@@ -412,7 +422,12 @@ export function Shell() { className="size-8 flex items-center justify-center rounded-md text-sidebar-foreground hover:bg-sidebar-active hover:text-foreground" > - +
@@ -439,13 +454,16 @@ export function Shell() { className="size-8 flex items-center justify-center rounded-md border border-border bg-card hover:bg-accent/50" > - + - - executor - + executor
diff --git a/apps/local/vite.config.ts b/apps/local/vite.config.ts index e0f0c67f2..836e65aaa 100644 --- a/apps/local/vite.config.ts +++ b/apps/local/vite.config.ts @@ -13,12 +13,14 @@ const cliPackage = JSON.parse( ) as { version?: string }; const repositoryUrl = - typeof rootPackage.repository === "string" - ? rootPackage.repository - : rootPackage.repository?.url; + typeof rootPackage.repository === "string" ? rootPackage.repository : rootPackage.repository?.url; const EXECUTOR_VERSION = cliPackage.version ?? rootPackage.version; -const EXECUTOR_GITHUB_URL = (rootPackage.homepage ?? repositoryUrl ?? "https://github.com/RhysSullivan/executor") +const EXECUTOR_GITHUB_URL = ( + rootPackage.homepage ?? + repositoryUrl ?? + "https://github.com/RhysSullivan/executor" +) .replace(/^git\+/, "") .replace(/\.git$/, ""); @@ -52,7 +54,7 @@ function executorApiPlugin(): Plugin { } // Strip /api prefix for Effect handlers - const url = isApi ? (rawUrl.slice("/api".length) || "/") : rawUrl; + const url = isApi ? rawUrl.slice("/api".length) || "/" : rawUrl; const hasBody = req.method !== "GET" && req.method !== "HEAD"; const webRequest = new Request(new URL(url, origin), { diff --git a/apps/marketing/astro.config.mjs b/apps/marketing/astro.config.mjs index d9b06c74c..1548b855b 100644 --- a/apps/marketing/astro.config.mjs +++ b/apps/marketing/astro.config.mjs @@ -1,16 +1,16 @@ // @ts-check -import { defineConfig } from 'astro/config'; +import { defineConfig } from "astro/config"; -import tailwindcss from '@tailwindcss/vite'; +import tailwindcss from "@tailwindcss/vite"; -import cloudflare from '@astrojs/cloudflare'; +import cloudflare from "@astrojs/cloudflare"; // https://astro.build/config export default defineConfig({ - output: 'server', + output: "server", vite: { - plugins: [tailwindcss()] + plugins: [tailwindcss()], }, adapter: cloudflare(), -}); \ No newline at end of file +}); diff --git a/apps/marketing/package.json b/apps/marketing/package.json index b53ba46fc..fca528208 100644 --- a/apps/marketing/package.json +++ b/apps/marketing/package.json @@ -1,10 +1,7 @@ { "name": "@executor/marketing", - "type": "module", "version": "0.0.3", - "engines": { - "node": ">=22.12.0" - }, + "type": "module", "scripts": { "dev": "portless run --name executor-marketing astro dev", "build": "astro build", @@ -12,19 +9,22 @@ "deploy": "astro build && npx wrangler deploy --config dist/server/wrangler.json", "astro": "astro" }, - "devDependencies": { - "portless": "^0.10.1", - "wrangler": "^4.0.0" - }, "dependencies": { "@astrojs/cloudflare": "^13.0.0", - "@executor/sdk": "workspace:*", - "@executor/plugin-openapi": "workspace:*", - "@executor/plugin-graphql": "workspace:*", "@executor/plugin-google-discovery": "workspace:*", + "@executor/plugin-graphql": "workspace:*", + "@executor/plugin-openapi": "workspace:*", + "@executor/sdk": "workspace:*", "@tailwindcss/vite": "^4.2.2", "astro": "^6.1.3", "effect": "^3.14.16", "tailwindcss": "^4.2.2" + }, + "devDependencies": { + "portless": "^0.10.1", + "wrangler": "^4.0.0" + }, + "engines": { + "node": ">=22.12.0" } -} \ No newline at end of file +} diff --git a/apps/marketing/src/pages/api/detect.ts b/apps/marketing/src/pages/api/detect.ts index 9b89e797c..55ef5f8f2 100644 --- a/apps/marketing/src/pages/api/detect.ts +++ b/apps/marketing/src/pages/api/detect.ts @@ -1,10 +1,6 @@ import type { APIRoute } from "astro"; import { Effect } from "effect"; -import { - createExecutor, - makeTestConfig, - type ToolMetadata, -} from "@executor/sdk"; +import { createExecutor, makeTestConfig, type ToolMetadata } from "@executor/sdk"; import { openApiPlugin } from "@executor/plugin-openapi"; import { graphqlPlugin } from "@executor/plugin-graphql"; import { googleDiscoveryPlugin } from "@executor/plugin-google-discovery"; @@ -26,10 +22,7 @@ function inferMethod(toolName: string, pluginKey: string): string { return "GET"; } -function inferPolicy( - method: string, - toolName: string -): "read" | "write" | "destructive" { +function inferPolicy(method: string, toolName: string): "read" | "write" | "destructive" { const m = method.toUpperCase(); if (m === "DELETE") return "destructive"; const lower = toolName.toLowerCase(); @@ -79,9 +72,7 @@ export const POST: APIRoute = async ({ request }) => { try { // Detect what kind of source lives at this URL - const detected = yield* executor.sources - .detect(url) - .pipe(Effect.timeout("10 seconds")); + const detected = yield* executor.sources.detect(url).pipe(Effect.timeout("10 seconds")); if (!detected || detected.length === 0) return null; @@ -130,7 +121,7 @@ export const POST: APIRoute = async ({ request }) => { Effect.catchAll(() => Effect.succeed(null)), Effect.timeout("25 seconds"), Effect.catchAll(() => Effect.succeed(null)), - ) + ), ); if (!result) { @@ -139,7 +130,7 @@ export const POST: APIRoute = async ({ request }) => { error: "Could not detect an API at this URL. Try an OpenAPI spec, GraphQL endpoint, or Google Discovery document.", }), - { status: 404, headers: { "Content-Type": "application/json" } } + { status: 404, headers: { "Content-Type": "application/json" } }, ); } diff --git a/apps/marketing/src/styles/global.css b/apps/marketing/src/styles/global.css index 32ea738a7..eafda6845 100644 --- a/apps/marketing/src/styles/global.css +++ b/apps/marketing/src/styles/global.css @@ -3,9 +3,9 @@ @source "../**/*.astro"; @theme { - --font-sans: 'Manrope', ui-sans-serif, system-ui, sans-serif; - --font-display: 'Instrument Serif', Georgia, serif; - --font-mono: 'JetBrains Mono', ui-monospace, monospace; + --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif; + --font-display: "Instrument Serif", Georgia, serif; + --font-mono: "JetBrains Mono", ui-monospace, monospace; --color-surface: #0c0f0e; --color-surface-raised: #141917; @@ -36,7 +36,7 @@ --color-teal: #0d9b7a; --color-teal-dim: #0a8068; --color-teal-faint: rgba(13, 155, 122, 0.06); - --color-teal-glow: rgba(13, 155, 122, 0.10); + --color-teal-glow: rgba(13, 155, 122, 0.1); --color-rule: rgba(0, 0, 0, 0.08); } @@ -47,8 +47,7 @@ html { } body { - background-image: - url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); background-repeat: repeat; background-size: 256px 256px; color-scheme: light dark; @@ -56,27 +55,47 @@ body { @media (prefers-color-scheme: light) { body { - background-image: - url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E"); } } /* Staggered fade-in for page load */ @keyframes rise { - from { opacity: 0; transform: translateY(24px); } - to { opacity: 1; transform: translateY(0); } + from { + opacity: 0; + transform: translateY(24px); + } + to { + opacity: 1; + transform: translateY(0); + } } -.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; } -.rise-d1 { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both; } -.rise-d2 { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both; } -.rise-d3 { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; } -.rise-d4 { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both; } +.rise { + animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; +} +.rise-d1 { + animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both; +} +.rise-d2 { + animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both; +} +.rise-d3 { + animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; +} +.rise-d4 { + animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both; +} /* Typing cursor blink for code block */ @keyframes blink { - 0%, 100% { opacity: 1; } - 50% { opacity: 0; } + 0%, + 100% { + opacity: 1; + } + 50% { + opacity: 0; + } } .cursor-blink { @@ -87,7 +106,9 @@ body { .reveal { opacity: 0; transform: translateY(20px); - transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); + transition: + opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), + transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); } .reveal.visible { opacity: 1; @@ -97,7 +118,7 @@ body { /* Thin scrollbar for catalog */ .scrollbar-thin { scrollbar-width: thin; - scrollbar-color: rgba(255,255,255,0.08) transparent; + scrollbar-color: rgba(255, 255, 255, 0.08) transparent; } .scrollbar-thin::-webkit-scrollbar { width: 4px; @@ -106,15 +127,15 @@ body { background: transparent; } .scrollbar-thin::-webkit-scrollbar-thumb { - background: rgba(255,255,255,0.1); + background: rgba(255, 255, 255, 0.1); border-radius: 2px; } @media (prefers-color-scheme: light) { .scrollbar-thin { - scrollbar-color: rgba(0,0,0,0.1) transparent; + scrollbar-color: rgba(0, 0, 0, 0.1) transparent; } .scrollbar-thin::-webkit-scrollbar-thumb { - background: rgba(0,0,0,0.12); + background: rgba(0, 0, 0, 0.12); } } diff --git a/bun.lock b/bun.lock index a0f87ec8a..1879e9be4 100644 --- a/bun.lock +++ b/bun.lock @@ -30,6 +30,7 @@ "@effect/platform-bun": "catalog:", "@executor/api": "workspace:*", "@executor/local": "workspace:*", + "@executor/plugin-launchd": "workspace:*", "@executor/runtime-quickjs": "workspace:*", "@jitl/quickjs-wasmfile-release-sync": "catalog:", "effect": "catalog:", @@ -94,6 +95,10 @@ "apps/desktop": { "name": "@executor/desktop", "version": "1.4.0", + "dependencies": { + "@executor/supervisor": "workspace:*", + "effect": "catalog:", + }, "devDependencies": { "@types/node": "catalog:", "electron": "35.7.5", @@ -118,6 +123,7 @@ "@executor/plugin-google-discovery": "workspace:*", "@executor/plugin-graphql": "workspace:*", "@executor/plugin-keychain": "workspace:*", + "@executor/plugin-launchd": "workspace:*", "@executor/plugin-mcp": "workspace:*", "@executor/plugin-onepassword": "workspace:*", "@executor/plugin-openapi": "workspace:*", @@ -286,6 +292,19 @@ "vitest": "catalog:", }, }, + "packages/core/supervisor": { + "name": "@executor/supervisor", + "version": "1.4.0", + "dependencies": { + "effect": "catalog:", + }, + "devDependencies": { + "@effect/vitest": "catalog:", + "@types/node": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, "packages/hosts/mcp": { "name": "@executor/host-mcp", "version": "1.4.2", @@ -489,6 +508,23 @@ "vitest": "catalog:", }, }, + "packages/plugins/launchd": { + "name": "@executor/plugin-launchd", + "version": "0.0.1-beta.5", + "dependencies": { + "@effect/cli": "catalog:", + "@executor/sdk": "workspace:*", + "@executor/supervisor": "workspace:*", + "effect": "catalog:", + }, + "devDependencies": { + "@effect/vitest": "catalog:", + "@types/node": "catalog:", + "bun-types": "catalog:", + "tsup": "catalog:", + "vitest": "catalog:", + }, + }, "packages/plugins/mcp": { "name": "@executor/plugin-mcp", "version": "0.0.1-beta.5", @@ -1024,6 +1060,8 @@ "@executor/plugin-keychain": ["@executor/plugin-keychain@workspace:packages/plugins/keychain"], + "@executor/plugin-launchd": ["@executor/plugin-launchd@workspace:packages/plugins/launchd"], + "@executor/plugin-mcp": ["@executor/plugin-mcp@workspace:packages/plugins/mcp"], "@executor/plugin-onepassword": ["@executor/plugin-onepassword@workspace:packages/plugins/onepassword"], @@ -1046,6 +1084,8 @@ "@executor/storage-postgres": ["@executor/storage-postgres@workspace:packages/core/storage-postgres"], + "@executor/supervisor": ["@executor/supervisor@workspace:packages/core/supervisor"], + "@floating-ui/core": ["@floating-ui/core@1.7.5", "", { "dependencies": { "@floating-ui/utils": "^0.2.11" } }, "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ=="], "@floating-ui/dom": ["@floating-ui/dom@1.7.6", "", { "dependencies": { "@floating-ui/core": "^1.7.5", "@floating-ui/utils": "^0.2.11" } }, "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ=="], diff --git a/examples/promise-sdk/package.json b/examples/promise-sdk/package.json index 413ffbcad..75f62c6dd 100644 --- a/examples/promise-sdk/package.json +++ b/examples/promise-sdk/package.json @@ -7,13 +7,13 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@executor/sdk": "workspace:*", + "@executor/plugin-graphql": "workspace:*", "@executor/plugin-mcp": "workspace:*", "@executor/plugin-openapi": "workspace:*", - "@executor/plugin-graphql": "workspace:*" + "@executor/sdk": "workspace:*" }, "devDependencies": { - "typescript": "latest", - "@types/node": "catalog:" + "@types/node": "catalog:", + "typescript": "latest" } } diff --git a/examples/promise-sdk/src/main.ts b/examples/promise-sdk/src/main.ts index fa388f901..9fa9d435b 100644 --- a/examples/promise-sdk/src/main.ts +++ b/examples/promise-sdk/src/main.ts @@ -64,12 +64,7 @@ const weatherPlugin = definePlugin({ const executor = await createExecutor({ scope: { name: "my-app" }, - plugins: [ - mcpPlugin(), - openApiPlugin(), - graphqlPlugin(), - weatherPlugin, - ] as const, + plugins: [mcpPlugin(), openApiPlugin(), graphqlPlugin(), weatherPlugin] as const, }); // --------------------------------------------------------------------------- diff --git a/knip.config.ts b/knip.config.ts index b3e85c335..95389153c 100644 --- a/knip.config.ts +++ b/knip.config.ts @@ -63,13 +63,8 @@ const config: KnipConfig = { "**/*.d.ts", "packages/kernel/runtime-deno-subprocess/src/deno-subprocess-worker.mjs", ], - ignoreDependencies: [ - "bun-types", - ], - ignoreBinaries: [ - "tar", - "python3", - ], + ignoreDependencies: ["bun-types"], + ignoreBinaries: ["tar", "python3"], }; export default config; diff --git a/package.json b/package.json index 228abfcef..e67df5c11 100644 --- a/package.json +++ b/package.json @@ -1,63 +1,32 @@ { "name": "executor-workspace", "version": "1.4.0-beta.0", + "private": true, "description": "Local AI executor with a CLI, local API server, and web UI.", "keywords": [ - "executor", - "ai", "agent", - "cli", + "ai", "automation", + "cli", + "executor", "local-first" ], "homepage": "https://github.com/RhysSullivan/executor", "bugs": { "url": "https://github.com/RhysSullivan/executor/issues" }, + "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/RhysSullivan/executor.git" }, - "license": "MIT", - "private": true, - "type": "module", - "packageManager": "bun@1.3.11", "workspaces": [ "packages/*/*", "packages/react", "apps/*", "examples/*" ], - "catalog": { - "effect": "^3.21.0", - "@effect/experimental": "^0.60.0", - "@effect/sql": "^0.51.0", - "@effect/sql-sqlite-bun": "^0.52.0", - "@effect/sql-sqlite-node": "^0.52.0", - "@effect/cli": "^0.73.2", - "@effect/platform": "^0.96.0", - "@effect/platform-bun": "^0.89.0", - "@effect/platform-node": "^0.106.0", - "@effect/vitest": "^0.29.0", - "@types/node": "^24.3.1", - "bun-types": "^1.2.22", - "drizzle-orm": "^0.44.0", - "vitest": "^4.1.3", - "vite": "^8.0.0", - "@vitejs/plugin-react": "^6.0.1", - "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.168.10", - "@tanstack/react-start": "^1.167.16", - "react": "^19.1.0", - "react-dom": "^19.1.0", - "@types/react": "^19.1.0", - "@types/react-dom": "^19.1.0", - "typescript": "^5.9.3", - "tailwindcss": "^4.2.2", - "quickjs-emscripten": "^0.31.0", - "@jitl/quickjs-wasmfile-release-sync": "0.31.0", - "tsup": "^8.5.0" - }, + "type": "module", "scripts": { "dev": "turbo run dev --filter='!@executor/desktop' --filter='!@executor/cloud'", "dev:desktop": "turbo run dev", @@ -83,6 +52,7 @@ "release:publish:packages:dry-run": "bun run scripts/publish-packages.ts --dry-run", "prepare": "effect-language-service patch" }, + "dependencies": {}, "devDependencies": { "@changesets/cli": "^2.30.0", "@effect/language-service": "^0.84.2", @@ -96,5 +66,35 @@ "typescript": "^5.9.3", "vitest": "catalog:" }, - "dependencies": {} + "packageManager": "bun@1.3.11", + "catalog": { + "effect": "^3.21.0", + "@effect/experimental": "^0.60.0", + "@effect/sql": "^0.51.0", + "@effect/sql-sqlite-bun": "^0.52.0", + "@effect/sql-sqlite-node": "^0.52.0", + "@effect/cli": "^0.73.2", + "@effect/platform": "^0.96.0", + "@effect/platform-bun": "^0.89.0", + "@effect/platform-node": "^0.106.0", + "@effect/vitest": "^0.29.0", + "@types/node": "^24.3.1", + "bun-types": "^1.2.22", + "drizzle-orm": "^0.44.0", + "vitest": "^4.1.3", + "vite": "^8.0.0", + "@vitejs/plugin-react": "^6.0.1", + "@tailwindcss/vite": "^4.2.2", + "@tanstack/react-router": "^1.168.10", + "@tanstack/react-start": "^1.167.16", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "@types/react": "^19.1.0", + "@types/react-dom": "^19.1.0", + "typescript": "^5.9.3", + "tailwindcss": "^4.2.2", + "quickjs-emscripten": "^0.31.0", + "@jitl/quickjs-wasmfile-release-sync": "0.31.0", + "tsup": "^8.5.0" + } } diff --git a/packages/core/api/package.json b/packages/core/api/package.json index ab14f4cb5..9a7ff6e2c 100644 --- a/packages/core/api/package.json +++ b/packages/core/api/package.json @@ -7,6 +7,9 @@ ".": "./src/index.ts", "./server": "./src/server.ts" }, + "scripts": { + "typecheck": "tsc --noEmit" + }, "dependencies": { "@effect/platform": "catalog:", "@executor/execution": "workspace:*", @@ -17,8 +20,5 @@ "@types/node": "catalog:", "bun-types": "catalog:", "typescript": "catalog:" - }, - "scripts": { - "typecheck": "tsc --noEmit" } } diff --git a/packages/core/api/src/executions/api.ts b/packages/core/api/src/executions/api.ts index 46c2fd9e7..cc849827a 100644 --- a/packages/core/api/src/executions/api.ts +++ b/packages/core/api/src/executions/api.ts @@ -60,5 +60,4 @@ export class ExecutionsApi extends HttpApiGroup.make("executions") .setPayload(ResumeRequest) .addSuccess(ResumeResponse) .addError(ExecutionNotFoundError), - ) - {} + ) {} diff --git a/packages/core/api/src/handlers/executions.ts b/packages/core/api/src/handlers/executions.ts index 650b7d52e..3e7ec6d1f 100644 --- a/packages/core/api/src/handlers/executions.ts +++ b/packages/core/api/src/handlers/executions.ts @@ -2,74 +2,66 @@ import { HttpApiBuilder } from "@effect/platform"; import { Effect } from "effect"; import { ExecutorApi } from "../api"; -import { - formatExecuteResult, - formatPausedExecution, -} from "@executor/execution"; +import { formatExecuteResult, formatPausedExecution } from "@executor/execution"; import { ExecutionEngineService } from "../services"; -export const ExecutionsHandlers = HttpApiBuilder.group( - ExecutorApi, - "executions", - (handlers) => - handlers - .handle("execute", ({ payload }) => - Effect.gen(function* () { - const engine = yield* ExecutionEngineService; - const outcome = yield* Effect.promise(() => - engine.executeWithPause(payload.code), - ); +export const ExecutionsHandlers = HttpApiBuilder.group(ExecutorApi, "executions", (handlers) => + handlers + .handle("execute", ({ payload }) => + Effect.gen(function* () { + const engine = yield* ExecutionEngineService; + const outcome = yield* Effect.promise(() => engine.executeWithPause(payload.code)); - if (outcome.status === "completed") { - const formatted = formatExecuteResult(outcome.result); - return { - status: "completed" as const, - text: formatted.text, - structured: formatted.structured, - isError: formatted.isError, - }; - } - - const formatted = formatPausedExecution(outcome.execution); + if (outcome.status === "completed") { + const formatted = formatExecuteResult(outcome.result); return { - status: "paused" as const, + status: "completed" as const, text: formatted.text, structured: formatted.structured, + isError: formatted.isError, }; - }), - ) - .handle("resume", ({ path, payload }) => - Effect.gen(function* () { - const engine = yield* ExecutionEngineService; - const result = yield* Effect.promise(() => - engine.resume(path.executionId, { - action: payload.action, - content: payload.content as Record | undefined, - }), - ); + } - if (!result) { - return yield* Effect.fail({ - _tag: "ExecutionNotFoundError" as const, - executionId: path.executionId, - }); - } + const formatted = formatPausedExecution(outcome.execution); + return { + status: "paused" as const, + text: formatted.text, + structured: formatted.structured, + }; + }), + ) + .handle("resume", ({ path, payload }) => + Effect.gen(function* () { + const engine = yield* ExecutionEngineService; + const result = yield* Effect.promise(() => + engine.resume(path.executionId, { + action: payload.action, + content: payload.content as Record | undefined, + }), + ); - if (result.status === "completed") { - const formatted = formatExecuteResult(result.result); - return { - text: formatted.text, - structured: formatted.structured, - isError: formatted.isError, - }; - } + if (!result) { + return yield* Effect.fail({ + _tag: "ExecutionNotFoundError" as const, + executionId: path.executionId, + }); + } - const formatted = formatPausedExecution(result.execution); + if (result.status === "completed") { + const formatted = formatExecuteResult(result.result); return { text: formatted.text, structured: formatted.structured, - isError: false, + isError: formatted.isError, }; - }), - ), + } + + const formatted = formatPausedExecution(result.execution); + return { + text: formatted.text, + structured: formatted.structured, + isError: false, + }; + }), + ), ); diff --git a/packages/core/api/src/handlers/scope.ts b/packages/core/api/src/handlers/scope.ts index 5ef2b9a56..a91aa25fb 100644 --- a/packages/core/api/src/handlers/scope.ts +++ b/packages/core/api/src/handlers/scope.ts @@ -4,18 +4,15 @@ import { Effect } from "effect"; import { ExecutorApi } from "../api"; import { ExecutorService } from "../services"; -export const ScopeHandlers = HttpApiBuilder.group( - ExecutorApi, - "scope", - (handlers) => - handlers.handle("info", () => - Effect.gen(function* () { - const executor = yield* ExecutorService; - return { - id: executor.scope.id, - name: executor.scope.name, - dir: executor.scope.name, - }; - }), - ), +export const ScopeHandlers = HttpApiBuilder.group(ExecutorApi, "scope", (handlers) => + handlers.handle("info", () => + Effect.gen(function* () { + const executor = yield* ExecutorService; + return { + id: executor.scope.id, + name: executor.scope.name, + dir: executor.scope.name, + }; + }), + ), ); diff --git a/packages/core/api/src/handlers/secrets.ts b/packages/core/api/src/handlers/secrets.ts index 98548e77a..4c9f38b22 100644 --- a/packages/core/api/src/handlers/secrets.ts +++ b/packages/core/api/src/handlers/secrets.ts @@ -21,50 +21,47 @@ const refToResponse = (ref: { createdAt: ref.createdAt.getTime(), }); -export const SecretsHandlers = HttpApiBuilder.group( - ExecutorApi, - "secrets", - (handlers) => - handlers - .handle("list", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const refs = yield* executor.secrets.list(); - return refs.map(refToResponse); - }), - ) - .handle("status", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const status = yield* executor.secrets.status(path.secretId); - return { secretId: path.secretId, status }; - }), - ) - .handle("set", ({ path, payload }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const ref = yield* executor.secrets.set({ - id: payload.id, - name: payload.name, - value: payload.value, - purpose: payload.purpose, - provider: payload.provider, - }); - return refToResponse(ref); - }), - ) - .handle("resolve", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const value = yield* executor.secrets.resolve(path.secretId); - return { secretId: path.secretId, value }; - }), - ) - .handle("remove", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const removed = yield* executor.secrets.remove(path.secretId); - return { removed }; - }), - ), +export const SecretsHandlers = HttpApiBuilder.group(ExecutorApi, "secrets", (handlers) => + handlers + .handle("list", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const refs = yield* executor.secrets.list(); + return refs.map(refToResponse); + }), + ) + .handle("status", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const status = yield* executor.secrets.status(path.secretId); + return { secretId: path.secretId, status }; + }), + ) + .handle("set", ({ path, payload }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const ref = yield* executor.secrets.set({ + id: payload.id, + name: payload.name, + value: payload.value, + purpose: payload.purpose, + provider: payload.provider, + }); + return refToResponse(ref); + }), + ) + .handle("resolve", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const value = yield* executor.secrets.resolve(path.secretId); + return { secretId: path.secretId, value }; + }), + ) + .handle("remove", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const removed = yield* executor.secrets.remove(path.secretId); + return { removed }; + }), + ), ); diff --git a/packages/core/api/src/handlers/sources.ts b/packages/core/api/src/handlers/sources.ts index 902f11240..f5712c770 100644 --- a/packages/core/api/src/handlers/sources.ts +++ b/packages/core/api/src/handlers/sources.ts @@ -4,65 +4,62 @@ import { Effect } from "effect"; import { ExecutorApi } from "../api"; import { ExecutorService } from "../services"; -export const SourcesHandlers = HttpApiBuilder.group( - ExecutorApi, - "sources", - (handlers) => - handlers - .handle("list", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const sources = yield* executor.sources.list(); - return sources.map((s) => ({ - id: s.id, - name: s.name, - kind: s.kind, - runtime: s.runtime, - canRemove: s.canRemove, - canRefresh: s.canRefresh, - canEdit: s.canEdit, - })); - }), - ) - .handle("remove", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - yield* executor.sources.remove(path.sourceId); - return { removed: true }; - }), - ) - .handle("refresh", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - yield* executor.sources.refresh(path.sourceId); - return { refreshed: true }; - }), - ) - .handle("tools", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const tools = yield* executor.tools.list({ sourceId: path.sourceId }); - return tools.map((t) => ({ - id: t.id, - pluginKey: t.pluginKey, - sourceId: t.sourceId, - name: t.name, - description: t.description, - mayElicit: t.mayElicit, - })); - }), - ) - .handle("detect", ({ path, payload }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const results = yield* executor.sources.detect(payload.url); - return results.map((r) => ({ - kind: r.kind, - confidence: r.confidence, - endpoint: r.endpoint, - name: r.name, - namespace: r.namespace, - })); - }), - ), +export const SourcesHandlers = HttpApiBuilder.group(ExecutorApi, "sources", (handlers) => + handlers + .handle("list", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const sources = yield* executor.sources.list(); + return sources.map((s) => ({ + id: s.id, + name: s.name, + kind: s.kind, + runtime: s.runtime, + canRemove: s.canRemove, + canRefresh: s.canRefresh, + canEdit: s.canEdit, + })); + }), + ) + .handle("remove", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + yield* executor.sources.remove(path.sourceId); + return { removed: true }; + }), + ) + .handle("refresh", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + yield* executor.sources.refresh(path.sourceId); + return { refreshed: true }; + }), + ) + .handle("tools", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const tools = yield* executor.tools.list({ sourceId: path.sourceId }); + return tools.map((t) => ({ + id: t.id, + pluginKey: t.pluginKey, + sourceId: t.sourceId, + name: t.name, + description: t.description, + mayElicit: t.mayElicit, + })); + }), + ) + .handle("detect", ({ path, payload }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const results = yield* executor.sources.detect(payload.url); + return results.map((r) => ({ + kind: r.kind, + confidence: r.confidence, + endpoint: r.endpoint, + name: r.name, + namespace: r.namespace, + })); + }), + ), ); diff --git a/packages/core/api/src/handlers/tools.ts b/packages/core/api/src/handlers/tools.ts index 2a0d6d69a..5f984e7ed 100644 --- a/packages/core/api/src/handlers/tools.ts +++ b/packages/core/api/src/handlers/tools.ts @@ -4,29 +4,26 @@ import { Effect } from "effect"; import { ExecutorApi } from "../api"; import { ExecutorService } from "../services"; -export const ToolsHandlers = HttpApiBuilder.group( - ExecutorApi, - "tools", - (handlers) => - handlers - .handle("list", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - const tools = yield* executor.tools.list(); - return tools.map((t) => ({ - id: t.id, - pluginKey: t.pluginKey, - sourceId: t.sourceId, - name: t.name, - description: t.description, - mayElicit: t.mayElicit, - })); - }), - ) - .handle("schema", ({ path }) => - Effect.gen(function* () { - const executor = yield* ExecutorService; - return yield* executor.tools.schema(path.toolId); - }), - ), +export const ToolsHandlers = HttpApiBuilder.group(ExecutorApi, "tools", (handlers) => + handlers + .handle("list", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + const tools = yield* executor.tools.list(); + return tools.map((t) => ({ + id: t.id, + pluginKey: t.pluginKey, + sourceId: t.sourceId, + name: t.name, + description: t.description, + mayElicit: t.mayElicit, + })); + }), + ) + .handle("schema", ({ path }) => + Effect.gen(function* () { + const executor = yield* ExecutorService; + return yield* executor.tools.schema(path.toolId); + }), + ), ); diff --git a/packages/core/api/src/scope/api.ts b/packages/core/api/src/scope/api.ts index 41d505ab5..09f01b89d 100644 --- a/packages/core/api/src/scope/api.ts +++ b/packages/core/api/src/scope/api.ts @@ -16,9 +16,6 @@ const ScopeInfoResponse = Schema.Struct({ // Group // --------------------------------------------------------------------------- -export class ScopeApi extends HttpApiGroup.make("scope") - .add( - HttpApiEndpoint.get("info")`/scope` - .addSuccess(ScopeInfoResponse), - ) - {} +export class ScopeApi extends HttpApiGroup.make("scope").add( + HttpApiEndpoint.get("info")`/scope`.addSuccess(ScopeInfoResponse), +) {} diff --git a/packages/core/api/src/secrets/api.ts b/packages/core/api/src/secrets/api.ts index 52fd24738..7c6ac4516 100644 --- a/packages/core/api/src/secrets/api.ts +++ b/packages/core/api/src/secrets/api.ts @@ -1,11 +1,6 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "@effect/platform"; import { Schema } from "effect"; -import { - ScopeId, - SecretId, - SecretNotFoundError, - SecretResolutionError, -} from "@executor/sdk"; +import { ScopeId, SecretId, SecretNotFoundError, SecretResolutionError } from "@executor/sdk"; // --------------------------------------------------------------------------- // Params @@ -49,9 +44,7 @@ const SetSecretPayload = Schema.Struct({ // Error schemas with HTTP status annotations // --------------------------------------------------------------------------- -const SecretNotFound = SecretNotFoundError.annotations( - HttpApiSchema.annotations({ status: 404 }), -); +const SecretNotFound = SecretNotFoundError.annotations(HttpApiSchema.annotations({ status: 404 })); const SecretResolution = SecretResolutionError.annotations( HttpApiSchema.annotations({ status: 500 }), ); @@ -62,12 +55,14 @@ const SecretResolution = SecretResolutionError.annotations( export class SecretsApi extends HttpApiGroup.make("secrets") .add( - HttpApiEndpoint.get("list")`/scopes/${scopeIdParam}/secrets` - .addSuccess(Schema.Array(SecretRefResponse)), + HttpApiEndpoint.get("list")`/scopes/${scopeIdParam}/secrets`.addSuccess( + Schema.Array(SecretRefResponse), + ), ) .add( - HttpApiEndpoint.get("status")`/scopes/${scopeIdParam}/secrets/${secretIdParam}/status` - .addSuccess(SecretStatusResponse), + HttpApiEndpoint.get( + "status", + )`/scopes/${scopeIdParam}/secrets/${secretIdParam}/status`.addSuccess(SecretStatusResponse), ) .add( HttpApiEndpoint.post("set")`/scopes/${scopeIdParam}/secrets` @@ -85,5 +80,4 @@ export class SecretsApi extends HttpApiGroup.make("secrets") HttpApiEndpoint.del("remove")`/scopes/${scopeIdParam}/secrets/${secretIdParam}` .addSuccess(Schema.Struct({ removed: Schema.Boolean })) .addError(SecretNotFound), - ) - {} + ) {} diff --git a/packages/core/api/src/server.ts b/packages/core/api/src/server.ts index 6ada5aa2c..0ed5ca2a9 100644 --- a/packages/core/api/src/server.ts +++ b/packages/core/api/src/server.ts @@ -1,2 +1,9 @@ export { ExecutorService, ExecutionEngineService } from "./services"; -export { CoreHandlers, ToolsHandlers, SourcesHandlers, SecretsHandlers, ScopeHandlers, ExecutionsHandlers } from "./handlers"; +export { + CoreHandlers, + ToolsHandlers, + SourcesHandlers, + SecretsHandlers, + ScopeHandlers, + ExecutionsHandlers, +} from "./handlers"; diff --git a/packages/core/api/src/services.ts b/packages/core/api/src/services.ts index 4e319e30b..ff4f22e9b 100644 --- a/packages/core/api/src/services.ts +++ b/packages/core/api/src/services.ts @@ -2,10 +2,7 @@ import { Context } from "effect"; import type { Executor } from "@executor/sdk"; import type { ExecutionEngine } from "@executor/execution"; -export class ExecutorService extends Context.Tag("ExecutorService")< - ExecutorService, - Executor ->() {} +export class ExecutorService extends Context.Tag("ExecutorService")() {} export class ExecutionEngineService extends Context.Tag("ExecutionEngineService")< ExecutionEngineService, diff --git a/packages/core/api/src/sources/api.ts b/packages/core/api/src/sources/api.ts index 891690a72..82b5a3470 100644 --- a/packages/core/api/src/sources/api.ts +++ b/packages/core/api/src/sources/api.ts @@ -58,24 +58,27 @@ const DetectResultResponse = Schema.Struct({ export class SourcesApi extends HttpApiGroup.make("sources") .add( - HttpApiEndpoint.get("list")`/scopes/${scopeIdParam}/sources` - .addSuccess(Schema.Array(SourceResponse)), + HttpApiEndpoint.get("list")`/scopes/${scopeIdParam}/sources`.addSuccess( + Schema.Array(SourceResponse), + ), ) .add( - HttpApiEndpoint.del("remove")`/scopes/${scopeIdParam}/sources/${sourceIdParam}` - .addSuccess(SourceRemoveResponse), + HttpApiEndpoint.del("remove")`/scopes/${scopeIdParam}/sources/${sourceIdParam}`.addSuccess( + SourceRemoveResponse, + ), ) .add( - HttpApiEndpoint.post("refresh")`/scopes/${scopeIdParam}/sources/${sourceIdParam}/refresh` - .addSuccess(SourceRefreshResponse), + HttpApiEndpoint.post( + "refresh", + )`/scopes/${scopeIdParam}/sources/${sourceIdParam}/refresh`.addSuccess(SourceRefreshResponse), ) .add( - HttpApiEndpoint.get("tools")`/scopes/${scopeIdParam}/sources/${sourceIdParam}/tools` - .addSuccess(Schema.Array(ToolMetadataResponse)), + HttpApiEndpoint.get("tools")`/scopes/${scopeIdParam}/sources/${sourceIdParam}/tools`.addSuccess( + Schema.Array(ToolMetadataResponse), + ), ) .add( HttpApiEndpoint.post("detect")`/scopes/${scopeIdParam}/sources/detect` .setPayload(DetectRequest) .addSuccess(Schema.Array(DetectResultResponse)), - ) - {} + ) {} diff --git a/packages/core/api/src/tools/api.ts b/packages/core/api/src/tools/api.ts index 9ae2eb5af..9085a2753 100644 --- a/packages/core/api/src/tools/api.ts +++ b/packages/core/api/src/tools/api.ts @@ -1,10 +1,6 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "@effect/platform"; import { Schema } from "effect"; -import { - ScopeId, - ToolId, - ToolNotFoundError, -} from "@executor/sdk"; +import { ScopeId, ToolId, ToolNotFoundError } from "@executor/sdk"; // --------------------------------------------------------------------------- // Params @@ -41,9 +37,7 @@ const ToolSchemaResponse = Schema.Struct({ // Error schemas with HTTP status annotations // --------------------------------------------------------------------------- -const ToolNotFound = ToolNotFoundError.annotations( - HttpApiSchema.annotations({ status: 404 }), -); +const ToolNotFound = ToolNotFoundError.annotations(HttpApiSchema.annotations({ status: 404 })); // --------------------------------------------------------------------------- // Group @@ -51,12 +45,12 @@ const ToolNotFound = ToolNotFoundError.annotations( export class ToolsApi extends HttpApiGroup.make("tools") .add( - HttpApiEndpoint.get("list")`/scopes/${scopeIdParam}/tools` - .addSuccess(Schema.Array(ToolMetadataResponse)), + HttpApiEndpoint.get("list")`/scopes/${scopeIdParam}/tools`.addSuccess( + Schema.Array(ToolMetadataResponse), + ), ) .add( HttpApiEndpoint.get("schema")`/scopes/${scopeIdParam}/tools/${toolIdParam}/schema` .addSuccess(ToolSchemaResponse) .addError(ToolNotFound), - ) - {} + ) {} diff --git a/packages/core/api/tsconfig.json b/packages/core/api/tsconfig.json index 9f78810fe..2e35d220b 100644 --- a/packages/core/api/tsconfig.json +++ b/packages/core/api/tsconfig.json @@ -14,8 +14,7 @@ "plugins": [ { "name": "@effect/language-service", - "diagnosticSeverity": { - } + "diagnosticSeverity": {} } ] }, diff --git a/packages/core/config/package.json b/packages/core/config/package.json index 55d5aca31..41d13c2dc 100644 --- a/packages/core/config/package.json +++ b/packages/core/config/package.json @@ -19,7 +19,7 @@ "devDependencies": { "@effect/platform-node": "catalog:", "@effect/vitest": "catalog:", - "vitest": "catalog:", - "typescript": "catalog:" + "typescript": "catalog:", + "vitest": "catalog:" } } diff --git a/packages/core/config/src/config-store.ts b/packages/core/config/src/config-store.ts index 18fdbcb41..37776f4ae 100644 --- a/packages/core/config/src/config-store.ts +++ b/packages/core/config/src/config-store.ts @@ -9,10 +9,7 @@ import { Effect } from "effect"; import { FileSystem } from "@effect/platform"; import type { Layer } from "effect"; -import { - addSourceToConfig, - removeSourceFromConfig, -} from "./write"; +import { addSourceToConfig, removeSourceFromConfig } from "./write"; import { SECRET_REF_PREFIX } from "./schema"; import type { SourceConfig } from "./schema"; @@ -58,7 +55,12 @@ const openApiToSourceConfig = (source: { const graphqlToSourceConfig = (source: { namespace: string; - config: { endpoint: string; introspectionJson?: string; namespace?: string; headers?: Record }; + config: { + endpoint: string; + introspectionJson?: string; + namespace?: string; + headers?: Record; + }; }): SourceConfig => ({ kind: "graphql" as const, endpoint: source.config.endpoint, @@ -115,12 +117,13 @@ const mcpToSourceConfig = (source: { // Core wrapper logic // --------------------------------------------------------------------------- -const wrapPutSource = ( - innerPut: (source: TSource) => Effect.Effect, - configPath: string, - toSourceConfig: (source: TSource) => SourceConfig, - fsLayer: Layer.Layer, -) => +const wrapPutSource = + ( + innerPut: (source: TSource) => Effect.Effect, + configPath: string, + toSourceConfig: (source: TSource) => SourceConfig, + fsLayer: Layer.Layer, + ) => (source: TSource) => Effect.gen(function* () { yield* innerPut(source); @@ -130,11 +133,12 @@ const wrapPutSource = ( ); }); -const wrapRemoveSource = ( - innerRemove: (namespace: string) => Effect.Effect, - configPath: string, - fsLayer: Layer.Layer, -) => +const wrapRemoveSource = + ( + innerRemove: (namespace: string) => Effect.Effect, + configPath: string, + fsLayer: Layer.Layer, + ) => (namespace: string) => Effect.gen(function* () { yield* innerRemove(namespace); @@ -162,29 +166,32 @@ export const withConfigFile = { inner: TStore, configPath: string, fsLayer: Layer.Layer, - ): TStore => ({ - ...inner, - putSource: wrapPutSource(inner.putSource, configPath, openApiToSourceConfig as any, fsLayer), - removeSource: wrapRemoveSource(inner.removeSource, configPath, fsLayer), - }) as TStore, + ): TStore => + ({ + ...inner, + putSource: wrapPutSource(inner.putSource, configPath, openApiToSourceConfig as any, fsLayer), + removeSource: wrapRemoveSource(inner.removeSource, configPath, fsLayer), + }) as TStore, graphql: >( inner: TStore, configPath: string, fsLayer: Layer.Layer, - ): TStore => ({ - ...inner, - putSource: wrapPutSource(inner.putSource, configPath, graphqlToSourceConfig as any, fsLayer), - removeSource: wrapRemoveSource(inner.removeSource, configPath, fsLayer), - }) as TStore, + ): TStore => + ({ + ...inner, + putSource: wrapPutSource(inner.putSource, configPath, graphqlToSourceConfig as any, fsLayer), + removeSource: wrapRemoveSource(inner.removeSource, configPath, fsLayer), + }) as TStore, mcp: >( inner: TStore, configPath: string, fsLayer: Layer.Layer, - ): TStore => ({ - ...inner, - putSource: wrapPutSource(inner.putSource, configPath, mcpToSourceConfig as any, fsLayer), - removeSource: wrapRemoveSource(inner.removeSource, configPath, fsLayer), - }) as TStore, + ): TStore => + ({ + ...inner, + putSource: wrapPutSource(inner.putSource, configPath, mcpToSourceConfig as any, fsLayer), + removeSource: wrapRemoveSource(inner.removeSource, configPath, fsLayer), + }) as TStore, }; diff --git a/packages/core/config/src/config.test.ts b/packages/core/config/src/config.test.ts index 6e2225eca..b1852b0fd 100644 --- a/packages/core/config/src/config.test.ts +++ b/packages/core/config/src/config.test.ts @@ -14,9 +14,7 @@ import { removeSecretFromConfig, } from "./write"; -const withTmpDir = ( - fn: (dir: string) => Effect.Effect, -) => +const withTmpDir = (fn: (dir: string) => Effect.Effect) => Effect.gen(function* () { const fs = yield* FileSystem.FileSystem; const dir = yield* fs.makeTempDirectoryScoped({ @@ -82,9 +80,7 @@ describe("ExecutorFileConfig schema", () => { const raw = { sources: [{ kind: "invalid", endpoint: "http://example.com" }], }; - expect(() => - Schema.decodeUnknownSync(ExecutorFileConfig)(raw), - ).toThrow(); + expect(() => Schema.decodeUnknownSync(ExecutorFileConfig)(raw)).toThrow(); }); }); @@ -243,9 +239,7 @@ describe("write operations", () => { const config = yield* loadConfig(path); // Should have 1, not 2 expect(config!.sources).toHaveLength(1); - expect((config!.sources![0] as { spec: string }).spec).toBe( - "https://example.com/v2.json", - ); + expect((config!.sources![0] as { spec: string }).spec).toBe("https://example.com/v2.json"); }), ), ); diff --git a/packages/core/config/src/load.ts b/packages/core/config/src/load.ts index f2e08b7a2..fb3c65dc1 100644 --- a/packages/core/config/src/load.ts +++ b/packages/core/config/src/load.ts @@ -36,20 +36,13 @@ export const loadConfig = ( if (errors.length > 0) { const msg = errors - .map( - (e) => - `offset ${e.offset}: ${jsonc.printParseErrorCode(e.error)}`, - ) + .map((e) => `offset ${e.offset}: ${jsonc.printParseErrorCode(e.error)}`) .join("; "); return yield* Effect.fail(new ConfigParseError(path, msg)); } - const decoded = yield* Schema.decodeUnknown(ExecutorFileConfig)( - parsed, - ).pipe( - Effect.mapError( - (e) => new ConfigParseError(path, String(e)), - ), + const decoded = yield* Schema.decodeUnknown(ExecutorFileConfig)(parsed).pipe( + Effect.mapError((e) => new ConfigParseError(path, String(e))), ); return decoded; diff --git a/packages/core/config/src/schema.ts b/packages/core/config/src/schema.ts index 9f9995998..62e583522 100644 --- a/packages/core/config/src/schema.ts +++ b/packages/core/config/src/schema.ts @@ -71,9 +71,7 @@ export const McpRemoteSourceConfig = Schema.Struct({ transport: Schema.Literal("remote"), name: Schema.String, endpoint: Schema.String, - remoteTransport: Schema.optional( - Schema.Literal("streamable-http", "sse", "auto"), - ), + remoteTransport: Schema.optional(Schema.Literal("streamable-http", "sse", "auto")), namespace: Schema.optional(Schema.String), queryParams: Schema.optional(StringMap), headers: Schema.optional(StringMap), @@ -120,8 +118,6 @@ export const ExecutorFileConfig = Schema.Struct({ $schema: Schema.optional(Schema.String), name: Schema.optional(Schema.String), sources: Schema.optional(Schema.Array(SourceConfig)), - secrets: Schema.optional( - Schema.Record({ key: Schema.String, value: SecretMetadata }), - ), + secrets: Schema.optional(Schema.Record({ key: Schema.String, value: SecretMetadata })), }); export type ExecutorFileConfig = typeof ExecutorFileConfig.Type; diff --git a/packages/core/config/src/write.ts b/packages/core/config/src/write.ts index 63c886f5b..ee91b1035 100644 --- a/packages/core/config/src/write.ts +++ b/packages/core/config/src/write.ts @@ -41,9 +41,7 @@ export const addSourceToConfig = ( // Ensure "sources" array exists let tree = jsonc.parseTree(text); - let sourcesNode = tree - ? jsonc.findNodeAtLocation(tree, ["sources"]) - : undefined; + let sourcesNode = tree ? jsonc.findNodeAtLocation(tree, ["sources"]) : undefined; if (!sourcesNode) { const edits = jsonc.modify(text, ["sources"], [source], { @@ -66,9 +64,7 @@ export const addSourceToConfig = ( } // Re-parse after removals tree = jsonc.parseTree(text); - sourcesNode = tree - ? jsonc.findNodeAtLocation(tree, ["sources"]) - : undefined; + sourcesNode = tree ? jsonc.findNodeAtLocation(tree, ["sources"]) : undefined; } const count = sourcesNode?.children?.length ?? 0; diff --git a/packages/core/config/tsconfig.json b/packages/core/config/tsconfig.json index 9f78810fe..2e35d220b 100644 --- a/packages/core/config/tsconfig.json +++ b/packages/core/config/tsconfig.json @@ -14,8 +14,7 @@ "plugins": [ { "name": "@effect/language-service", - "diagnosticSeverity": { - } + "diagnosticSeverity": {} } ] }, diff --git a/packages/core/env/package.json b/packages/core/env/package.json index 5dcf1c51a..55b994e64 100644 --- a/packages/core/env/package.json +++ b/packages/core/env/package.json @@ -1,8 +1,8 @@ { "name": "@executor/env", + "version": "1.4.0", "private": true, "type": "module", - "version": "1.4.0", "exports": { ".": "./src/index.ts" }, diff --git a/packages/core/env/src/index.ts b/packages/core/env/src/index.ts index 0a6f40463..f5d2b4e47 100644 --- a/packages/core/env/src/index.ts +++ b/packages/core/env/src/index.ts @@ -110,14 +110,16 @@ type UndefinedOptional = Partial>> & type Mutable = T extends Readonly ? U : T; -type Reduce[], TAcc = object> = - TArr extends readonly [] - ? TAcc - : TArr extends readonly [infer Head, ...infer Tail] - ? Tail extends readonly Record[] - ? Mutable & Omit, keyof Head> - : never - : never; +type Reduce< + TArr extends readonly Record[], + TAcc = object, +> = TArr extends readonly [] + ? TAcc + : TArr extends readonly [infer Head, ...infer Tail] + ? Tail extends readonly Record[] + ? Mutable & Omit, keyof Head> + : never + : never; export type RuntimeEnvValue = string | number | boolean | undefined; export type RuntimeEnv = Record; @@ -158,10 +160,7 @@ export const flattenConfigError = ( return issues; }; -type EnforcePrefixedKeys< - TPrefix extends string | undefined, - TShape extends ConfigShape, -> = { +type EnforcePrefixedKeys = { [TKey in keyof TShape]: TPrefix extends undefined ? TShape[TKey] : TPrefix extends "" @@ -242,7 +241,9 @@ const toRuntimeMap = (runtimeEnv: RuntimeEnv): Map => { return map; }; -const mergeExtended = (extendsEnvs: ReadonlyArray>): Record => +const mergeExtended = ( + extendsEnvs: ReadonlyArray>, +): Record => extendsEnvs.reduce>((acc, current) => Object.assign(acc, current), {}); export function createEnv< diff --git a/packages/core/execution/package.json b/packages/core/execution/package.json index 55d91ded5..b5ff9e197 100644 --- a/packages/core/execution/package.json +++ b/packages/core/execution/package.json @@ -1,8 +1,8 @@ { "name": "@executor/execution", + "version": "1.4.2", "private": true, "type": "module", - "version": "1.4.2", "exports": { ".": "./src/index.ts" }, @@ -11,9 +11,9 @@ "test": "vitest run" }, "dependencies": { - "@executor/sdk": "workspace:*", "@executor/codemode-core": "workspace:*", "@executor/runtime-quickjs": "workspace:*", + "@executor/sdk": "workspace:*", "effect": "catalog:" }, "devDependencies": { diff --git a/packages/core/execution/src/description.ts b/packages/core/execution/src/description.ts index 563b9edb5..0f8c42e88 100644 --- a/packages/core/execution/src/description.ts +++ b/packages/core/execution/src/description.ts @@ -8,9 +8,7 @@ import type { Executor, ToolMetadata, Source } from "@executor/sdk"; * 1. Workflow (top — critical, least likely to be truncated) * 2. Available namespaces (bottom) */ -export const buildExecuteDescription = ( - executor: Executor, -): Effect.Effect => +export const buildExecuteDescription = (executor: Executor): Effect.Effect => Effect.gen(function* () { const sources: readonly Source[] = yield* executor.sources.list(); const tools: readonly ToolMetadata[] = yield* executor.tools.list(); @@ -21,10 +19,7 @@ export const buildExecuteDescription = ( return formatDescription([...namespaces], sources); }); -const formatDescription = ( - namespaces: readonly string[], - sources: readonly Source[], -): string => { +const formatDescription = (namespaces: readonly string[], sources: readonly Source[]): string => { const lines: string[] = [ "Execute TypeScript in a sandboxed runtime with access to configured API tools.", "", @@ -40,11 +35,11 @@ const formatDescription = ( "## Rules", "", "- `tools.search()` returns ranked matches, best-first. Use short intent phrases like `github issues`, `repo details`, or `create calendar event`.", - "- When you already know the namespace, narrow with `tools.search({ namespace: \"github\", query: \"issues\" })`.", + '- When you already know the namespace, narrow with `tools.search({ namespace: "github", query: "issues" })`.', "- Use `tools.executor.sources.list()` to inspect configured sources and their tool counts. Returns `[{ id, toolCount, ... }]`.", "- Always use the namespace prefix when calling tools: `tools..(args)`. Example: `tools.home_assistant_rest_api.states.getState(...)` — not `tools.states.getState(...)`.", "- The `tools` object is a lazy proxy — `Object.keys(tools)` won't work. Use `tools.search()` or `tools.executor.sources.list()` instead.", - "- Pass an object to system tools, e.g. `tools.search({ query: \"...\" })`, `tools.executor.sources.list()`, and `tools.describe.tool({ path })`.", + '- Pass an object to system tools, e.g. `tools.search({ query: "..." })`, `tools.executor.sources.list()`, and `tools.describe.tool({ path })`.', "- `tools.describe.tool()` returns compact TypeScript shapes. Use `inputTypeScript`, `outputTypeScript`, and `typeScriptDefinitions`.", "- For tools that return large collections (e.g. `getStates`, `getAll`), filter results in code rather than calling per-item tools.", "- Do not use `fetch` — all API calls go through `tools.*`.", diff --git a/packages/core/execution/src/engine.ts b/packages/core/execution/src/engine.ts index 381650545..522325027 100644 --- a/packages/core/execution/src/engine.ts +++ b/packages/core/execution/src/engine.ts @@ -60,7 +60,9 @@ const truncate = (value: string, max: number): string => ? `${value.slice(0, max)}\n... [truncated ${value.length - max} chars]` : value; -export const formatExecuteResult = (result: ExecuteResult): { +export const formatExecuteResult = ( + result: ExecuteResult, +): { text: string; structured: Record; isError: boolean; @@ -72,8 +74,7 @@ export const formatExecuteResult = (result: ExecuteResult): { : JSON.stringify(result.result, null, 2) : null; - const logText = - result.logs && result.logs.length > 0 ? result.logs.join("\n") : null; + const logText = result.logs && result.logs.length > 0 ? result.logs.join("\n") : null; if (result.error) { const parts = [`Error: ${result.error}`, ...(logText ? [`\nLogs:\n${logText}`] : [])]; @@ -95,7 +96,9 @@ export const formatExecuteResult = (result: ExecuteResult): { }; }; -export const formatPausedExecution = (paused: PausedExecution): { +export const formatPausedExecution = ( + paused: PausedExecution, +): { text: string; structured: Record; } => { @@ -124,7 +127,9 @@ export const formatPausedExecution = (paused: PausedExecution): { kind: req._tag === "UrlElicitation" ? "url" : "form", message: (req as any).message, ...(req._tag === "UrlElicitation" ? { url: (req as any).url } : {}), - ...(req._tag === "FormElicitation" ? { requestedSchema: (req as any).requestedSchema } : {}), + ...(req._tag === "FormElicitation" + ? { requestedSchema: (req as any).requestedSchema } + : {}), }, }, }; @@ -137,10 +142,7 @@ export const formatPausedExecution = (paused: PausedExecution): { const isRecord = (value: unknown): value is Record => typeof value === "object" && value !== null && !Array.isArray(value); -const readOptionalLimit = ( - value: unknown, - toolName: string, -): number | ExecutionToolError => { +const readOptionalLimit = (value: unknown, toolName: string): number | ExecutionToolError => { if (value === undefined) { return 12; } @@ -154,10 +156,7 @@ const readOptionalLimit = ( return Math.floor(value); }; -const makeFullInvoker = ( - executor: Executor, - invokeOptions: InvokeOptions, -): SandboxToolInvoker => { +const makeFullInvoker = (executor: Executor, invokeOptions: InvokeOptions): SandboxToolInvoker => { const base = makeExecutorToolInvoker(executor, { invokeOptions }); return { invoke: ({ path, args }) => { @@ -165,7 +164,8 @@ const makeFullInvoker = ( if (!isRecord(args)) { return Effect.fail( new ExecutionToolError({ - message: "tools.search expects an object: { query?: string; namespace?: string; limit?: number }", + message: + "tools.search expects an object: { query?: string; namespace?: string; limit?: number }", }), ); } @@ -199,7 +199,8 @@ const makeFullInvoker = ( if (args !== undefined && !isRecord(args)) { return Effect.fail( new ExecutionToolError({ - message: "tools.executor.sources.list expects an object: { query?: string; limit?: number }", + message: + "tools.executor.sources.list expects an object: { query?: string; limit?: number }", }), ); } @@ -212,7 +213,10 @@ const makeFullInvoker = ( ); } - const limit = readOptionalLimit(isRecord(args) ? args.limit : undefined, "tools.executor.sources.list"); + const limit = readOptionalLimit( + isRecord(args) ? args.limit : undefined, + "tools.executor.sources.list", + ); if (limit instanceof ExecutionToolError) { return Effect.fail(limit); } @@ -275,7 +279,10 @@ export type ExecutionEngine = { * Resume a paused execution. Returns a completed result, a new pause, or * null if the executionId was not found. */ - readonly resume: (executionId: string, response: ResumeResponse) => Promise; + readonly resume: ( + executionId: string, + response: ResumeResponse, + ) => Promise; /** * Get the dynamic tool description (workflow + namespaces). @@ -321,9 +328,7 @@ export const createExecutionEngine = (config: ExecutionEngineConfig): ExecutionE // Ref holds the current pause signal. The elicitation handler reads // it each time it fires, so resume() can swap in a fresh Deferred // before unblocking the fiber. - const pauseSignalRef = yield* Ref.make( - yield* Deferred.make(), - ); + const pauseSignalRef = yield* Ref.make(yield* Deferred.make()); // Will be set once the fiber is forked. let fiber: Fiber.Fiber; diff --git a/packages/core/execution/src/tool-invoker.test.ts b/packages/core/execution/src/tool-invoker.test.ts index 345510579..1dd0cb6d7 100644 --- a/packages/core/execution/src/tool-invoker.test.ts +++ b/packages/core/execution/src/tool-invoker.test.ts @@ -72,22 +72,26 @@ const makeSearchExecutor = () => ] as const, }); - yield* config.sources.registerRuntime(new Source({ - id: "github", - name: "GitHub", - kind: "in-memory", - runtime: true, - canRemove: false, - canRefresh: false, - })); - yield* config.sources.registerRuntime(new Source({ - id: "crm", - name: "CRM", - kind: "in-memory", - runtime: true, - canRemove: false, - canRefresh: false, - })); + yield* config.sources.registerRuntime( + new Source({ + id: "github", + name: "GitHub", + kind: "in-memory", + runtime: true, + canRemove: false, + canRefresh: false, + }), + ); + yield* config.sources.registerRuntime( + new Source({ + id: "crm", + name: "CRM", + kind: "in-memory", + runtime: true, + canRemove: false, + canRefresh: false, + }), + ); return yield* createExecutor(config); }); @@ -98,9 +102,7 @@ describe("tool discovery", () => { const executor = yield* makeSearchExecutor(); const githubMatches = yield* searchTools(executor, "github issues", 5); - expect(githubMatches.map((match) => match.path)).toEqual([ - "github.listRepositoryIssues", - ]); + expect(githubMatches.map((match) => match.path)).toEqual(["github.listRepositoryIssues"]); expect(githubMatches[0]?.score ?? 0).toBeGreaterThan(0); const repoMatches = yield* searchTools(executor, "repo details", 5); @@ -127,16 +129,12 @@ describe("tool discovery", () => { const githubOnly = yield* searchTools(executor, "list", 5, { namespace: "github", }); - expect(githubOnly.map((match) => match.path)).toEqual([ - "github.listRepositoryIssues", - ]); + expect(githubOnly.map((match) => match.path)).toEqual(["github.listRepositoryIssues"]); const crmOnly = yield* searchTools(executor, "list", 5, { namespace: "crm", }); - expect(crmOnly.map((match) => match.path)).toEqual([ - "crm.listContacts", - ]); + expect(crmOnly.map((match) => match.path)).toEqual(["crm.listContacts"]); const sandboxResult = yield* Effect.promise(() => createExecutionEngine({ executor }).execute( @@ -156,10 +154,9 @@ describe("tool discovery", () => { const executor = yield* makeSearchExecutor(); const listed = yield* Effect.promise(() => - createExecutionEngine({ executor }).execute( - "return await tools.executor.sources.list();", - { onElicitation: acceptAll }, - ), + createExecutionEngine({ executor }).execute("return await tools.executor.sources.list();", { + onElicitation: acceptAll, + }), ); expect(listed.error).toBeUndefined(); expect(listed.result).toEqual( @@ -176,9 +173,7 @@ describe("tool discovery", () => { ), ); expect(searched.error).toBeUndefined(); - expect(searched.result).toEqual([ - expect.objectContaining({ path: "crm.listContacts" }), - ]); + expect(searched.result).toEqual([expect.objectContaining({ path: "crm.listContacts" })]); }), ); @@ -186,10 +181,7 @@ describe("tool discovery", () => { Effect.gen(function* () { const executor = yield* makeSearchExecutor(); - const withoutSchemas = yield* describeTool( - executor, - "github.listRepositoryIssues", - ); + const withoutSchemas = yield* describeTool(executor, "github.listRepositoryIssues"); expect(withoutSchemas).toEqual({ path: "github.listRepositoryIssues", name: "listRepositoryIssues", @@ -199,14 +191,9 @@ describe("tool discovery", () => { typeScriptDefinitions: undefined, }); - const withSchemas = yield* describeTool( - executor, - "github.listRepositoryIssues", - ); + const withSchemas = yield* describeTool(executor, "github.listRepositoryIssues"); expect(withSchemas.path).toBe("github.listRepositoryIssues"); - expect(withSchemas.inputTypeScript).toBe( - "{ owner: string; repo: string }", - ); + expect(withSchemas.inputTypeScript).toBe("{ owner: string; repo: string }"); expect(withSchemas.typeScriptDefinitions).toBeUndefined(); expect(withSchemas.outputTypeScript).toBeUndefined(); }), @@ -221,8 +208,8 @@ describe("tool discovery", () => { engine.execute( [ "try {", - " await tools.search(\"github issues\");", - " return \"unexpected\";", + ' await tools.search("github issues");', + ' return "unexpected";', "} catch (error) {", " return error instanceof Error ? error.message : String(error);", "}", @@ -236,10 +223,9 @@ describe("tool discovery", () => { ); const emptyQuery = yield* Effect.promise(() => - engine.execute( - "return await tools.search({ query: \"\", limit: 5 });", - { onElicitation: acceptAll }, - ), + engine.execute('return await tools.search({ query: "", limit: 5 });', { + onElicitation: acceptAll, + }), ); expect(emptyQuery.error).toBeUndefined(); expect(emptyQuery.result).toEqual([]); @@ -248,8 +234,8 @@ describe("tool discovery", () => { engine.execute( [ "try {", - " await tools.describe.tool({ path: \"github.listRepositoryIssues\", includeSchemas: true });", - " return \"unexpected\";", + ' await tools.describe.tool({ path: "github.listRepositoryIssues", includeSchemas: true });', + ' return "unexpected";', "} catch (error) {", " return error instanceof Error ? error.message : String(error);", "}", @@ -269,9 +255,7 @@ describe("tool discovery", () => { ), ); expect(invalidSearch.error).toBeUndefined(); - expect(String(invalidSearch.result)).toContain( - "tools.search expects an object", - ); + expect(String(invalidSearch.result)).toContain("tools.search expects an object"); }), ); }); @@ -335,17 +319,13 @@ describe("pause/resume with multiple elicitations", () => { const executor = yield* makeElicitingExecutor(); const engine = createExecutionEngine({ executor }); - const code = 'return await tools.api.multiApproval({});'; + const code = "return await tools.api.multiApproval({});"; // First executeWithPause — should pause on first elicitation - const outcome1 = yield* Effect.promise(() => - engine.executeWithPause(code), - ); + const outcome1 = yield* Effect.promise(() => engine.executeWithPause(code)); expect(outcome1.status).toBe("paused"); const paused1 = outcome1 as Extract; - expect(paused1.execution.elicitationContext.request.message).toBe( - "First approval", - ); + expect(paused1.execution.elicitationContext.request.message).toBe("First approval"); // Resume first pause — execution continues to second elicitation. // resume() must not hang; it should return (either a new paused @@ -355,12 +335,7 @@ describe("pause/resume with multiple elicitations", () => { engine.resume(paused1.execution.id, { action: "accept" }), new Promise((_, reject) => setTimeout( - () => - reject( - new Error( - "resume hung — second elicitation not surfaced", - ), - ), + () => reject(new Error("resume hung — second elicitation not surfaced")), 5000, ), ), diff --git a/packages/core/execution/src/tool-invoker.ts b/packages/core/execution/src/tool-invoker.ts index 677d889f4..61902034c 100644 --- a/packages/core/execution/src/tool-invoker.ts +++ b/packages/core/execution/src/tool-invoker.ts @@ -1,5 +1,12 @@ import { Effect } from "effect"; -import type { Executor, ToolId, ToolMetadata, ToolSchema, InvokeOptions, Source } from "@executor/sdk"; +import type { + Executor, + ToolId, + ToolMetadata, + ToolSchema, + InvokeOptions, + Source, +} from "@executor/sdk"; import type { SandboxToolInvoker } from "@executor/codemode-core"; import { ExecutionToolError } from "./errors"; @@ -13,16 +20,11 @@ export const makeExecutorToolInvoker = ( ): SandboxToolInvoker => ({ invoke: ({ path, args }) => Effect.gen(function* () { - const result = yield* executor.tools.invoke( - path as ToolId, - args, - options.invokeOptions, - ).pipe( + const result = yield* executor.tools.invoke(path as ToolId, args, options.invokeOptions).pipe( Effect.catchTag("ElicitationDeclinedError", (err) => Effect.fail( new ExecutionToolError({ - message: - `Tool "${err.toolId}" requires approval but the request was ${err.action === "cancel" ? "cancelled" : "declined"} by the user.`, + message: `Tool "${err.toolId}" requires approval but the request was ${err.action === "cancel" ? "cancelled" : "declined"} by the user.`, cause: err, }), ), @@ -124,7 +126,9 @@ const scorePreparedField = ( continue; } - if (field.tokens.some((candidate) => candidate.startsWith(token) || token.startsWith(candidate))) { + if ( + field.tokens.some((candidate) => candidate.startsWith(token) || token.startsWith(candidate)) + ) { score += weight * 2; matchedTokens.add(token); continue; @@ -143,10 +147,7 @@ const scorePreparedField = ( }; }; -const matchesNamespace = ( - tool: SearchableTool, - namespace?: string, -): boolean => { +const matchesNamespace = (tool: SearchableTool, namespace?: string): boolean => { if (!namespace || normalizeSearchText(namespace).length === 0) { return true; } @@ -165,10 +166,7 @@ const matchesNamespace = ( return isPrefixMatch(sourceTokens) || isPrefixMatch(pathTokens); }; -const scoreToolMatch = ( - tool: SearchableTool, - query: string, -): ToolDiscoveryResult | null => { +const scoreToolMatch = (tool: SearchableTool, query: string): ToolDiscoveryResult | null => { const normalizedQuery = normalizeSearchText(query); const queryTokens = tokenizeSearchText(query); @@ -221,7 +219,10 @@ const scoreToolMatch = ( score += 8; } - if (normalizeSearchText(tool.id) === normalizedQuery || normalizeSearchText(tool.name) === normalizedQuery) { + if ( + normalizeSearchText(tool.id) === normalizedQuery || + normalizeSearchText(tool.name) === normalizedQuery + ) { score += 20; } @@ -265,30 +266,30 @@ export const listExecutorSources = ( const limit = options?.limit ?? 200; const sources = yield* executor.sources.list(); - const filtered = normalizedQuery.length === 0 - ? sources - : sources.filter((source: Source) => { - const haystack = normalizeSearchText([ - source.id, - source.name, - source.kind, - ].join(" ")); - return tokenizeSearchText(normalizedQuery).every((token) => haystack.includes(token)); - }); + const filtered = + normalizedQuery.length === 0 + ? sources + : sources.filter((source: Source) => { + const haystack = normalizeSearchText([source.id, source.name, source.kind].join(" ")); + return tokenizeSearchText(normalizedQuery).every((token) => haystack.includes(token)); + }); const withCounts = yield* Effect.forEach( filtered, (source: Source) => executor.tools.list({ sourceId: source.id }).pipe( - Effect.map((tools) => ({ - id: source.id, - name: source.name, - kind: source.kind, - runtime: source.runtime, - canRemove: source.canRemove, - canRefresh: source.canRefresh, - toolCount: tools.length, - } satisfies ExecutorSourceListItem)), + Effect.map( + (tools) => + ({ + id: source.id, + name: source.name, + kind: source.kind, + runtime: source.runtime, + canRemove: source.canRemove, + canRefresh: source.canRefresh, + toolCount: tools.length, + }) satisfies ExecutorSourceListItem, + ), ), { concurrency: "unbounded" }, ); @@ -314,9 +315,7 @@ export const describeTool = ( unknown > => Effect.gen(function* () { - const metadata = (yield* executor.tools.list()).find( - (t: ToolMetadata) => t.id === path, - ); + const metadata = (yield* executor.tools.list()).find((t: ToolMetadata) => t.id === path); const base = { path, diff --git a/packages/core/sdk/README.md b/packages/core/sdk/README.md index 9c0edc284..3b377c6ae 100644 --- a/packages/core/sdk/README.md +++ b/packages/core/sdk/README.md @@ -15,7 +15,13 @@ npm install @executor/sdk ## Quick start ```ts -import { createExecutor, definePlugin, ToolRegistration, ToolId, ToolInvocationResult } from "@executor/sdk"; +import { + createExecutor, + definePlugin, + ToolRegistration, + ToolId, + ToolInvocationResult, +} from "@executor/sdk"; // Define a custom plugin with async/await. const weatherPlugin = definePlugin({ @@ -97,8 +103,15 @@ const executor = await createExecutor({ plugins: [mcpPlugin(), openApiPlugin(), graphqlPlugin()] as const, }); -await executor.mcp.addSource({ transport: "remote", name: "Context7", endpoint: "https://mcp.context7.com/mcp" }); -await executor.openapi.addSpec({ spec: "https://petstore3.swagger.io/api/v3/openapi.json", namespace: "petstore" }); +await executor.mcp.addSource({ + transport: "remote", + name: "Context7", + endpoint: "https://mcp.context7.com/mcp", +}); +await executor.openapi.addSpec({ + spec: "https://petstore3.swagger.io/api/v3/openapi.json", + namespace: "petstore", +}); await executor.graphql.addSource({ endpoint: "https://graphql.anilist.co", namespace: "anilist" }); const tools = await executor.tools.list(); diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index 40b746753..cfc264759 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -1,17 +1,20 @@ { "name": "@executor/sdk", "version": "0.0.1-beta.5", - "type": "module", + "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/core/sdk", + "bugs": { + "url": "https://github.com/RhysSullivan/executor/issues" + }, "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/RhysSullivan/executor.git", "directory": "packages/core/sdk" }, - "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/core/sdk", - "bugs": { - "url": "https://github.com/RhysSullivan/executor/issues" - }, + "files": [ + "dist" + ], + "type": "module", "exports": { ".": "./src/index.ts", "./promise": "./src/promise.ts" @@ -33,9 +36,6 @@ } } }, - "files": [ - "dist" - ], "scripts": { "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", "typecheck": "tsc --noEmit", @@ -48,7 +48,7 @@ "@effect/vitest": "catalog:", "@types/node": "catalog:", "tsup": "catalog:", - "vitest": "catalog:", - "typescript": "catalog:" + "typescript": "catalog:", + "vitest": "catalog:" } } diff --git a/packages/core/sdk/src/__fixtures__/stripe-get-balance-transactions-id.json b/packages/core/sdk/src/__fixtures__/stripe-get-balance-transactions-id.json index 92b2019e2..a60bea139 100644 --- a/packages/core/sdk/src/__fixtures__/stripe-get-balance-transactions-id.json +++ b/packages/core/sdk/src/__fixtures__/stripe-get-balance-transactions-id.json @@ -1 +1,36648 @@ -{"source":"https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.sdk.json","operationId":"GetBalanceTransactionsId","schema":{"$ref":"#/$defs/balance_transaction"},"defs":{"account":{"description":"For new integrations, we recommend using the [Accounts v2 API](/api/v2/core/accounts), in place of /v1/accounts and /v1/customers to represent a user.\n\nThis 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":"#/$defs/account_business_profile"}],"description":"Business information about the account.","nullable":true},"business_type":{"description":"The business type.","enum":["company","government_entity","individual","non_profit"],"nullable":true,"type":"string","x-stripeBypassValidation":true},"capabilities":{"$ref":"#/$defs/account_capabilities"},"charges_enabled":{"description":"Whether the account can process charges.","type":"boolean"},"company":{"$ref":"#/$defs/legal_entity_company"},"controller":{"$ref":"#/$defs/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":{"$ref":"#/$defs/external_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":"ExternalAccountList","type":"object","x-expandableFields":["data"],"x-stripeMostCommon":["data","has_more","object","url"]},"future_requirements":{"$ref":"#/$defs/account_future_requirements"},"groups":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/person"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/account_requirements"},"settings":{"anyOf":[{"$ref":"#/$defs/account_settings"}],"description":"Options for customizing how the account functions within Stripe.","nullable":true},"tos_acceptance":{"$ref":"#/$defs/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","x-stripeMostCommon":["business_type","capabilities","company","country","email","id","individual","metadata","requirements","tos_acceptance","type"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/accounts/{account}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/account"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/accounts"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/accounts/{account}"},{"method_name":"capabilities","method_on":"service","method_type":"custom","operation":"get","path":"/v1/accounts/{account}/capabilities"},{"method_name":"persons","method_on":"service","method_type":"custom","operation":"get","path":"/v1/accounts/{account}/persons"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/accounts"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/accounts/{account}"},{"method_name":"reject","method_on":"service","method_type":"custom","operation":"post","path":"/v1/accounts/{account}/reject"}],"x-stripeResource":{"class_name":"Account","has_collection_class":true,"in_package":"","polymorphic_groups":["deleted_payment_source","payment_source"]}},"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"}},"required":["amount","currency","fiscal_year_end"],"title":"AccountAnnualRevenue","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","currency","fiscal_year_end"]},"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"}},"required":["display_name","service_user_number"],"title":"AccountBacsDebitPaymentsSettings","type":"object","x-expandableFields":[],"x-stripeMostCommon":["display_name","service_user_number"]},"account_branding_settings":{"description":"","properties":{"icon":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/file"}]}},"logo":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["icon","logo","primary_color","secondary_color"],"title":"AccountBrandingSettings","type":"object","x-expandableFields":["icon","logo"],"x-stripeMostCommon":["icon","logo","primary_color","secondary_color"]},"account_business_profile":{"description":"","properties":{"annual_revenue":{"anyOf":[{"$ref":"#/$defs/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"},"minority_owned_business_designation":{"description":"Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.","items":{"enum":["lgbtqi_owned_business","minority_owned_business","none_of_these_apply","prefer_not_to_answer","women_owned_business"],"type":"string"},"nullable":true,"type":"array"},"monthly_estimated_revenue":{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["mcc","minority_owned_business_designation","name","support_address","support_email","support_phone","support_url","url"],"title":"AccountBusinessProfile","type":"object","x-expandableFields":["annual_revenue","monthly_estimated_revenue","support_address"],"x-stripeMostCommon":["annual_revenue","estimated_worker_count","mcc","minority_owned_business_designation","monthly_estimated_revenue","name","product_description","support_address","support_email","support_phone","support_url","url"]},"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"},"billie_payments":{"description":"The status of the Billie capability of the account, or whether the account can directly process Billie payments.","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"},"crypto_payments":{"description":"The status of the Crypto capability of the account, or whether the account can directly process Crypto 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"},"mb_way_payments":{"description":"The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY 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"},"nz_bank_account_becs_debit_payments":{"description":"The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges.","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"},"payto_payments":{"description":"The status of the PayTo capability of the account, or whether the account can directly process PayTo charges.","enum":["active","inactive","pending"],"type":"string"},"pix_payments":{"description":"The status of the pix payments capability of the account, or whether the account can directly process pix 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"},"satispay_payments":{"description":"The status of the Satispay capability of the account, or whether the account can directly process Satispay 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"},"upi_payments":{"description":"The status of the upi payments capability of the account, or whether the account can directly process upi 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":[],"x-stripeMostCommon":["acss_debit_payments","affirm_payments","afterpay_clearpay_payments","alma_payments","amazon_pay_payments","au_becs_debit_payments","bacs_debit_payments","bancontact_payments","bank_transfer_payments","billie_payments","blik_payments","boleto_payments","card_issuing","card_payments","cartes_bancaires_payments","cashapp_payments","crypto_payments","eps_payments","fpx_payments","gb_bank_transfer_payments","giropay_payments","grabpay_payments","ideal_payments","india_international_payments","jcb_payments","jp_bank_transfer_payments","kakao_pay_payments","klarna_payments","konbini_payments","kr_card_payments","legacy_payments","link_payments","mb_way_payments","mobilepay_payments","multibanco_payments","mx_bank_transfer_payments","naver_pay_payments","nz_bank_account_becs_debit_payments","oxxo_payments","p24_payments","pay_by_bank_payments","payco_payments","paynow_payments","payto_payments","pix_payments","promptpay_payments","revolut_pay_payments","samsung_pay_payments","satispay_payments","sepa_bank_transfer_payments","sepa_debit_payments","sofort_payments","swish_payments","tax_reporting_us_1099_k","tax_reporting_us_1099_misc","transfers","treasury","twint_payments","upi_payments","us_bank_account_ach_payments","us_bank_transfer_payments","zip_payments"]},"account_card_issuing_settings":{"description":"","properties":{"tos_acceptance":{"$ref":"#/$defs/card_issuing_account_terms_of_service"}},"title":"AccountCardIssuingSettings","type":"object","x-expandableFields":["tos_acceptance"],"x-stripeMostCommon":["tos_acceptance"]},"account_card_payments_settings":{"description":"","properties":{"decline_on":{"$ref":"#/$defs/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"}},"required":["statement_descriptor_prefix","statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji"],"title":"AccountCardPaymentsSettings","type":"object","x-expandableFields":["decline_on"],"x-stripeMostCommon":["decline_on","statement_descriptor_prefix","statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji"]},"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"}},"required":["display_name","timezone"],"title":"AccountDashboardSettings","type":"object","x-expandableFields":[],"x-stripeMostCommon":["display_name","timezone"]},"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":[],"x-stripeMostCommon":["avs_failure","cvc_failure"]},"account_future_requirements":{"description":"","properties":{"alternatives":{"description":"Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.","items":{"$ref":"#/$defs/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 resolved to keep the account enabled. If not resolved 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":"Details about validation and verification failures for `due` requirements that must be resolved.","items":{"$ref":"#/$defs/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 haven't been resolved by `requirements.current_deadline`. These fields need to be resolved to enable the capability on the account. `future_requirements.past_due` is a subset of `requirements.past_due`.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"},"pending_verification":{"description":"Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"}},"required":["alternatives","current_deadline","currently_due","disabled_reason","errors","eventually_due","past_due","pending_verification"],"title":"AccountFutureRequirements","type":"object","x-expandableFields":["alternatives","errors"],"x-stripeMostCommon":["alternatives","current_deadline","currently_due","disabled_reason","errors","eventually_due","past_due","pending_verification"]},"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://docs.stripe.com/connect/platform-pricing-tools) for details.","maxLength":5000,"nullable":true,"type":"string"}},"required":["payments_pricing"],"title":"AccountGroupMembership","type":"object","x-expandableFields":[],"x-stripeMostCommon":["payments_pricing"]},"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":"#/$defs/tax_id"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_id"}]}},"nullable":true,"type":"array"},"hosted_payment_method_save":{"description":"Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.","enum":["always","never","offer"],"nullable":true,"type":"string"}},"required":["default_account_tax_ids","hosted_payment_method_save"],"title":"AccountInvoicesSettings","type":"object","x-expandableFields":["default_account_tax_ids"],"x-stripeMostCommon":["default_account_tax_ids","hosted_payment_method_save"]},"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":[],"x-stripeMostCommon":["amount","currency"]},"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"},"statement_descriptor_prefix_kana":{"description":"The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).","maxLength":5000,"nullable":true,"type":"string"},"statement_descriptor_prefix_kanji":{"description":"The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).","maxLength":5000,"nullable":true,"type":"string"}},"required":["statement_descriptor","statement_descriptor_kana","statement_descriptor_kanji","statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji"],"title":"AccountPaymentsSettings","type":"object","x-expandableFields":[],"x-stripeMostCommon":["statement_descriptor","statement_descriptor_kana","statement_descriptor_kanji","statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji"]},"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":"#/$defs/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","statement_descriptor"],"title":"AccountPayoutSettings","type":"object","x-expandableFields":["schedule"],"x-stripeMostCommon":["debit_negative_balances","schedule","statement_descriptor"]},"account_requirements":{"description":"","properties":{"alternatives":{"description":"Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.","items":{"$ref":"#/$defs/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 resolved to keep the account enabled. If not resolved by `current_deadline`, these fields will 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://docs.stripe.com/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":"Details about validation and verification failures for `due` requirements that must be resolved.","items":{"$ref":"#/$defs/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 haven't been resolved by `current_deadline`. These fields need to be resolved to enable the account.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"},"pending_verification":{"description":"Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"}},"required":["alternatives","current_deadline","currently_due","disabled_reason","errors","eventually_due","past_due","pending_verification"],"title":"AccountRequirements","type":"object","x-expandableFields":["alternatives","errors"],"x-stripeMostCommon":["alternatives","current_deadline","currently_due","disabled_reason","errors","eventually_due","past_due","pending_verification"]},"account_requirements_alternative":{"description":"","properties":{"alternative_fields_due":{"description":"Fields that can be provided to resolve all fields in `original_fields_due`.","items":{"maxLength":5000,"type":"string"},"type":"array"},"original_fields_due":{"description":"Fields that are due and can be resolved 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":[],"x-stripeMostCommon":["alternative_fields_due","original_fields_due"]},"account_requirements_error":{"description":"","properties":{"code":{"description":"The code for the type of error.","enum":["external_request","information_missing","invalid_address_city_state_postal_code","invalid_address_highway_contract_box","invalid_address_private_mailbox","invalid_business_profile_name","invalid_business_profile_name_denylisted","invalid_company_name_denylisted","invalid_dob_age_over_maximum","invalid_dob_age_under_18","invalid_dob_age_under_minimum","invalid_product_description_length","invalid_product_description_url_match","invalid_representative_country","invalid_signator","invalid_statement_descriptor_business_mismatch","invalid_statement_descriptor_denylisted","invalid_statement_descriptor_length","invalid_statement_descriptor_prefix_denylisted","invalid_statement_descriptor_prefix_mismatch","invalid_street_address","invalid_tax_id","invalid_tax_id_format","invalid_tos_acceptance","invalid_url_denylisted","invalid_url_format","invalid_url_length","invalid_url_web_presence_detected","invalid_url_website_business_information_mismatch","invalid_url_website_empty","invalid_url_website_inaccessible","invalid_url_website_inaccessible_geoblocked","invalid_url_website_inaccessible_password_protected","invalid_url_website_incomplete","invalid_url_website_incomplete_cancellation_policy","invalid_url_website_incomplete_customer_service_details","invalid_url_website_incomplete_legal_restrictions","invalid_url_website_incomplete_refund_policy","invalid_url_website_incomplete_return_policy","invalid_url_website_incomplete_terms_and_conditions","invalid_url_website_incomplete_under_construction","invalid_url_website_other","invalid_value_other","unsupported_business_type","verification_directors_mismatch","verification_document_address_mismatch","verification_document_address_missing","verification_document_corrupt","verification_document_country_not_supported","verification_document_directors_mismatch","verification_document_dob_mismatch","verification_document_duplicate_type","verification_document_expired","verification_document_failed_copy","verification_document_failed_greyscale","verification_document_failed_other","verification_document_failed_test_mode","verification_document_fraudulent","verification_document_id_number_mismatch","verification_document_id_number_missing","verification_document_incomplete","verification_document_invalid","verification_document_issue_or_expiry_date_missing","verification_document_manipulated","verification_document_missing_back","verification_document_missing_front","verification_document_name_mismatch","verification_document_name_missing","verification_document_nationality_mismatch","verification_document_not_readable","verification_document_not_signed","verification_document_not_uploaded","verification_document_photo_mismatch","verification_document_too_large","verification_document_type_not_supported","verification_extraneous_directors","verification_failed_address_match","verification_failed_authorizer_authority","verification_failed_business_iec_number","verification_failed_document_match","verification_failed_id_number_match","verification_failed_keyed_identity","verification_failed_keyed_match","verification_failed_name_match","verification_failed_other","verification_failed_representative_authority","verification_failed_residential_address","verification_failed_tax_id_match","verification_failed_tax_id_not_issued","verification_legal_entity_structure_mismatch","verification_missing_directors","verification_missing_executives","verification_missing_owners","verification_rejected_ownership_exemption_reason","verification_requires_additional_memorandum_of_associations","verification_requires_additional_proof_of_registration","verification_supportability"],"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":[],"x-stripeMostCommon":["code","reason","requirement"]},"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":[],"x-stripeMostCommon":["creditor_id"]},"account_settings":{"description":"","properties":{"bacs_debit_payments":{"$ref":"#/$defs/account_bacs_debit_payments_settings"},"branding":{"$ref":"#/$defs/account_branding_settings"},"card_issuing":{"$ref":"#/$defs/account_card_issuing_settings"},"card_payments":{"$ref":"#/$defs/account_card_payments_settings"},"dashboard":{"$ref":"#/$defs/account_dashboard_settings"},"invoices":{"$ref":"#/$defs/account_invoices_settings"},"payments":{"$ref":"#/$defs/account_payments_settings"},"payouts":{"$ref":"#/$defs/account_payout_settings"},"sepa_debit_payments":{"$ref":"#/$defs/account_sepa_debit_payments_settings"},"treasury":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["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"}},"required":["date","ip"],"title":"AccountTermsOfService","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"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":[],"x-stripeMostCommon":["date","ip","service_agreement","user_agent"]},"account_treasury_settings":{"description":"","properties":{"tos_acceptance":{"$ref":"#/$defs/account_terms_of_service"}},"title":"AccountTreasurySettings","type":"object","x-expandableFields":["tos_acceptance"],"x-stripeMostCommon":["tos_acceptance"]},"account_unification_account_controller":{"description":"","properties":{"fees":{"$ref":"#/$defs/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://docs.stripe.com/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.","type":"boolean"},"losses":{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["fees","is_controller","losses","requirement_collection","stripe_dashboard","type"]},"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":[],"x-stripeMostCommon":["payer"]},"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":[],"x-stripeMostCommon":["payments"]},"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":[],"x-stripeMostCommon":["type"]},"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, such as the street, PO Box, or company name.","maxLength":5000,"nullable":true,"type":"string"},"line2":{"description":"Address line 2, such as the 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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).","maxLength":5000,"nullable":true,"type":"string"}},"required":["city","country","line1","line2","postal_code","state"],"title":"Address","type":"object","x-expandableFields":[],"x-stripeMostCommon":["city","country","line1","line2","postal_code","state"],"x-stripeResource":{"class_name":"Address","in_package":""}},"alma_installments":{"description":"","properties":{"count":{"description":"The number of installments.","type":"integer"}},"required":["count"],"title":"alma_installments","type":"object","x-expandableFields":[],"x-stripeMostCommon":["count"]},"amazon_pay_underlying_payment_method_funding_details":{"description":"","properties":{"card":{"$ref":"#/$defs/payment_method_details_passthrough_card"},"type":{"description":"funding type of the underlying payment method.","enum":["card"],"nullable":true,"type":"string"}},"required":["type"],"title":"amazon_pay_underlying_payment_method_funding_details","type":"object","x-expandableFields":["card"],"x-stripeMostCommon":["card","type"]},"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://docs.stripe.com/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://docs.stripe.com/error-codes) reported.","enum":["account_closed","account_country_invalid_address","account_error_country_change_requires_additional_steps","account_information_mismatch","account_invalid","account_number_invalid","account_token_required_for_v2_account","acss_debit_session_incomplete","alipay_upgrade_required","amount_too_large","amount_too_small","api_key_expired","application_fees_not_allowed","authentication_required","balance_insufficient","balance_invalid_parameter","bank_account_bad_routing_numbers","bank_account_declined","bank_account_exists","bank_account_restricted","bank_account_unusable","bank_account_unverified","bank_account_verification_failed","billing_invalid_mandate","bitcoin_upgrade_required","capture_charge_authorization_expired","capture_unauthorized_payment","card_decline_rate_limit_exceeded","card_declined","cardholder_phone_number_required","charge_already_captured","charge_already_refunded","charge_disputed","charge_exceeds_source_limit","charge_exceeds_transaction_limit","charge_expired_for_capture","charge_invalid_parameter","charge_not_refundable","clearing_code_unsupported","country_code_invalid","country_unsupported","coupon_expired","customer_max_payment_methods","customer_max_subscriptions","customer_session_expired","customer_tax_location_invalid","debit_not_authorized","email_invalid","expired_card","financial_connections_account_inactive","financial_connections_account_pending_account_numbers","financial_connections_account_unavailable_account_numbers","financial_connections_no_successful_transaction_refresh","forwarding_api_inactive","forwarding_api_invalid_parameter","forwarding_api_retryable_upstream_error","forwarding_api_upstream_connection_error","forwarding_api_upstream_connection_timeout","forwarding_api_upstream_error","idempotency_key_in_use","incorrect_address","incorrect_cvc","incorrect_number","incorrect_zip","india_recurring_payment_mandate_canceled","instant_payouts_config_disabled","instant_payouts_currency_disabled","instant_payouts_limit_exceeded","instant_payouts_unsupported","insufficient_funds","intent_invalid_state","intent_verification_method_missing","invalid_card_type","invalid_characters","invalid_charge_amount","invalid_cvc","invalid_expiry_month","invalid_expiry_year","invalid_mandate_reference_prefix_format","invalid_number","invalid_source_usage","invalid_tax_location","invoice_no_customer_line_items","invoice_no_payment_method_types","invoice_no_subscription_line_items","invoice_not_editable","invoice_on_behalf_of_not_editable","invoice_payment_intent_requires_action","invoice_upcoming_none","livemode_mismatch","lock_timeout","missing","no_account","not_allowed_on_standard_account","out_of_inventory","ownership_declaration_not_allowed","parameter_invalid_empty","parameter_invalid_integer","parameter_invalid_string_blank","parameter_invalid_string_empty","parameter_missing","parameter_unknown","parameters_exclusive","payment_intent_action_required","payment_intent_authentication_failure","payment_intent_incompatible_payment_method","payment_intent_invalid_parameter","payment_intent_konbini_rejected_confirmation_number","payment_intent_mandate_invalid","payment_intent_payment_attempt_expired","payment_intent_payment_attempt_failed","payment_intent_rate_limit_exceeded","payment_intent_unexpected_state","payment_method_bank_account_already_verified","payment_method_bank_account_blocked","payment_method_billing_details_address_missing","payment_method_configuration_failures","payment_method_currency_mismatch","payment_method_customer_decline","payment_method_invalid_parameter","payment_method_invalid_parameter_testmode","payment_method_microdeposit_failed","payment_method_microdeposit_verification_amounts_invalid","payment_method_microdeposit_verification_amounts_mismatch","payment_method_microdeposit_verification_attempts_exceeded","payment_method_microdeposit_verification_descriptor_code_mismatch","payment_method_microdeposit_verification_timeout","payment_method_not_available","payment_method_provider_decline","payment_method_provider_timeout","payment_method_unactivated","payment_method_unexpected_state","payment_method_unsupported_type","payout_reconciliation_not_ready","payouts_limit_exceeded","payouts_not_allowed","platform_account_required","platform_api_key_expired","postal_code_invalid","processing_error","product_inactive","progressive_onboarding_limit_exceeded","rate_limit","refer_to_customer","refund_disputed_payment","request_blocked","resource_already_exists","resource_missing","return_intent_already_processed","routing_number_invalid","secret_key_required","sepa_unsupported_account","service_period_coupon_with_metered_tiered_item_unsupported","setup_attempt_failed","setup_intent_authentication_failure","setup_intent_invalid_parameter","setup_intent_mandate_invalid","setup_intent_mobile_wallet_unsupported","setup_intent_setup_attempt_expired","setup_intent_unexpected_state","shipping_address_invalid","shipping_calculation_failed","sku_inactive","state_unsupported","status_transition_invalid","storer_capability_missing","storer_capability_not_active","stripe_tax_inactive","tax_id_invalid","tax_id_prohibited","taxes_calculation_failed","terminal_location_country_unsupported","terminal_reader_busy","terminal_reader_hardware_fault","terminal_reader_invalid_location_for_activation","terminal_reader_invalid_location_for_payment","terminal_reader_offline","terminal_reader_timeout","testmode_charges_only","tls_version_unsupported","token_already_used","token_card_network_invalid","token_in_use","transfer_source_balance_parameters_mismatch","transfers_not_allowed","url_invalid"],"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://docs.stripe.com/declines#issuer-declines) if they provide one.","maxLength":5000,"type":"string"},"doc_url":{"description":"A URL to more information about the [error code](https://docs.stripe.com/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 payments declined by the network, an alphanumeric code which indicates the reason the payment 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":"#/$defs/payment_intent"},"payment_method":{"$ref":"#/$defs/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":"#/$defs/setup_intent"},"source":{"$ref":"#/$defs/payment_source"},"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"],"x-stripeMostCommon":["code","decline_code","message","param","payment_intent","type"],"x-stripeResource":{"class_name":"StripeError","in_package":""}},"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","name","object"],"title":"Application","type":"object","x-expandableFields":[],"x-stripeMostCommon":["id","name","object"],"x-stripeResource":{"class_name":"Application","in_package":""}},"application_fee":{"description":"","properties":{"account":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/account"}],"description":"ID of the Stripe account this fee was taken from.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/application"}],"description":"ID of the Connect application that earned the fee.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application"}]}},"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/balance_transaction"}]}},"charge":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/charge"}],"description":"ID of the charge that the application fee was taken from.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/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":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]}},"required":["account","amount","amount_refunded","application","balance_transaction","charge","created","currency","fee_source","id","livemode","object","originating_transaction","refunded","refunds"],"title":"PlatformFee","type":"object","x-expandableFields":["account","application","balance_transaction","charge","fee_source","originating_transaction","refunds"],"x-resourceId":"application_fee","x-stripeMostCommon":["account","amount","amount_refunded","application","balance_transaction","charge","created","currency","fee_source","id","livemode","object","originating_transaction","refunded","refunds"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/application_fees"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/application_fees/{id}"}],"x-stripeResource":{"class_name":"ApplicationFee","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.","type":"boolean"},"liability":{"anyOf":[{"$ref":"#/$defs/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},"provider":{"description":"The tax provider powering automatic tax.","maxLength":5000,"nullable":true,"type":"string"},"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":["disabled_reason","enabled","liability","provider","status"],"title":"AutomaticTax","type":"object","x-expandableFields":["liability"],"x-stripeMostCommon":["disabled_reason","enabled","liability","provider","status"]},"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://docs.stripe.com/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"},"balance_type":{"description":"The balance that this transaction impacts.","enum":["issuing","payments","refund_and_dispute_prefunding","risk_reserved"],"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"},"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":"#/$defs/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":"#/$defs/balance_transaction_source"}],"description":"This transaction relates to the Stripe object.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/balance_transaction_source"}]}},"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`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.","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_hold","reserve_release","reserve_transaction","reserved_funds","stripe_balance_payment_debit","stripe_balance_payment_debit_reversal","stripe_fee","stripe_fx_fee","tax_fee","topup","topup_reversal","transfer","transfer_cancel","transfer_failure","transfer_refund"],"type":"string"}},"required":["amount","available_on","balance_type","created","currency","description","exchange_rate","fee","fee_details","id","net","object","reporting_category","source","status","type"],"title":"BalanceTransaction","type":"object","x-expandableFields":["fee_details","source"],"x-resourceId":"balance_transaction","x-stripeMostCommon":["amount","currency","description","fee","fee_details","id","net","source","status","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/balance_transactions"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/balance_transactions/{id}"}],"x-stripeResource":{"class_name":"BalanceTransaction","has_collection_class":true,"in_package":""}},"balance_transaction_source":{"anyOf":[{"$ref":"#/$defs/application_fee"},{"$ref":"#/$defs/charge"},{"$ref":"#/$defs/connect_collection_transfer"},{"$ref":"#/$defs/customer_cash_balance_transaction"},{"$ref":"#/$defs/dispute"},{"$ref":"#/$defs/fee_refund"},{"$ref":"#/$defs/issuing.authorization"},{"$ref":"#/$defs/issuing.dispute"},{"$ref":"#/$defs/issuing.transaction"},{"$ref":"#/$defs/payout"},{"$ref":"#/$defs/refund"},{"$ref":"#/$defs/reserve_transaction"},{"$ref":"#/$defs/tax_deducted_at_source"},{"$ref":"#/$defs/topup"},{"$ref":"#/$defs/transfer"},{"$ref":"#/$defs/transfer_reversal"}],"title":"Polymorphic","x-stripeBypassValidation":true,"x-stripeResource":{"class_name":"BalanceTransactionSource"}},"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":"#/$defs/account"}],"description":"The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"The ID of the customer that the bank account is associated with.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/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":"#/$defs/external_account_requirements"}],"description":"Information about the [upcoming new requirements for the bank account](https://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/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`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.\n\nFor external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.","maxLength":5000,"type":"string"}},"required":["account_holder_name","account_holder_type","account_type","bank_name","country","currency","fingerprint","id","last4","object","routing_number","status"],"title":"BankAccount","type":"object","x-expandableFields":["account","customer","future_requirements","requirements"],"x-resourceId":"bank_account","x-stripeMostCommon":["account_holder_name","account_holder_type","bank_name","country","currency","customer","fingerprint","id","last4","metadata","routing_number"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/customers/{customer}/sources/{id}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/customers/{customer}/sources/{id}"},{"method_name":"verify","method_on":"service","method_type":"custom","operation":"post","path":"/v1/customers/{customer}/sources/{id}/verify"}],"x-stripeResource":{"class_name":"BankAccount","in_package":"","polymorphic_groups":["deleted_external_account","deleted_payment_source","external_account","payment_source"]}},"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":"#/$defs/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":"#/$defs/billing.credit_grant"}],"description":"The credit grant associated with this credit balance transaction.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/billing.credit_grant"}]}},"debit":{"anyOf":[{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/test_helpers.test_clock"}],"description":"ID of the test clock this credit balance transaction belongs to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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","credit_grant","debit","effective_at","id","livemode","object","test_clock","type"],"title":"CreditBalanceTransaction","type":"object","x-expandableFields":["credit","credit_grant","debit","test_clock"],"x-resourceId":"billing.credit_balance_transaction","x-stripeMostCommon":["created","credit","credit_grant","debit","effective_at","id","livemode","object","test_clock","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/billing/credit_balance_transactions"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/billing/credit_balance_transactions/{id}"}],"x-stripeResource":{"class_name":"CreditBalanceTransaction","has_collection_class":true,"in_package":"Billing"}},"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":"#/$defs/billing_credit_grants_resource_amount"},"applicability_config":{"$ref":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"ID of the customer receiving the billing credits.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"ID of the account representing the customer receiving the billing credits","maxLength":5000,"nullable":true,"type":"string"},"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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/test_helpers.test_clock"}],"description":"ID of the test clock this credit grant belongs to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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","customer_account","effective_at","expires_at","id","livemode","metadata","name","object","test_clock","updated","voided_at"],"title":"CreditGrant","type":"object","x-expandableFields":["amount","applicability_config","customer","test_clock"],"x-resourceId":"billing.credit_grant","x-stripeMostCommon":["amount","applicability_config","category","created","customer","customer_account","effective_at","expires_at","id","livemode","metadata","name","object","priority","test_clock","updated","voided_at"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/billing/credit_grants"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/billing/credit_grants/{id}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/billing/credit_grants"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/billing/credit_grants/{id}"},{"method_name":"expire","method_on":"service","method_type":"custom","operation":"post","path":"/v1/billing/credit_grants/{id}/expire"},{"method_name":"void_grant","method_on":"service","method_type":"custom","operation":"post","path":"/v1/billing/credit_grants/{id}/void"}],"x-stripeResource":{"class_name":"CreditGrant","has_collection_class":true,"in_package":"Billing"}},"billing_bill_resource_invoicing_lines_common_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":"BillingBillResourceInvoicingLinesCommonCreditedItems","type":"object","x-expandableFields":[],"x-stripeMostCommon":["invoice","invoice_line_items"]},"billing_bill_resource_invoicing_lines_common_proration_details":{"description":"","properties":{"credited_items":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_lines_common_credited_items"}],"description":"For a credit proration `line_item`, the original debit line_items to which the credit proration applies.","nullable":true}},"required":["credited_items"],"title":"BillingBillResourceInvoicingLinesCommonProrationDetails","type":"object","x-expandableFields":["credited_items"],"x-stripeMostCommon":["credited_items"]},"billing_bill_resource_invoicing_lines_parents_invoice_line_item_invoice_item_parent":{"description":"","properties":{"invoice_item":{"description":"The invoice item that generated this line item","maxLength":5000,"type":"string"},"proration":{"description":"Whether this is a proration","type":"boolean"},"proration_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_lines_common_proration_details"}],"description":"Additional details for proration line items","nullable":true},"subscription":{"description":"The subscription that the invoice item belongs to","maxLength":5000,"nullable":true,"type":"string"}},"required":["invoice_item","proration","proration_details","subscription"],"title":"BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParent","type":"object","x-expandableFields":["proration_details"],"x-stripeMostCommon":["invoice_item","proration","proration_details","subscription"]},"billing_bill_resource_invoicing_lines_parents_invoice_line_item_parent":{"description":"","properties":{"invoice_item_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_lines_parents_invoice_line_item_invoice_item_parent"}],"description":"Details about the invoice item that generated this line item","nullable":true},"subscription_item_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_lines_parents_invoice_line_item_subscription_item_parent"}],"description":"Details about the subscription item that generated this line item","nullable":true},"type":{"description":"The type of parent that generated this line item","enum":["invoice_item_details","subscription_item_details"],"type":"string","x-stripeBypassValidation":true}},"required":["invoice_item_details","subscription_item_details","type"],"title":"BillingBillResourceInvoicingLinesParentsInvoiceLineItemParent","type":"object","x-expandableFields":["invoice_item_details","subscription_item_details"],"x-stripeMostCommon":["invoice_item_details","subscription_item_details","type"]},"billing_bill_resource_invoicing_lines_parents_invoice_line_item_subscription_item_parent":{"description":"","properties":{"invoice_item":{"description":"The invoice item that generated this line item","maxLength":5000,"nullable":true,"type":"string"},"proration":{"description":"Whether this is a proration","type":"boolean"},"proration_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_lines_common_proration_details"}],"description":"Additional details for proration line items","nullable":true},"subscription":{"description":"The subscription that the subscription item belongs to","maxLength":5000,"nullable":true,"type":"string"},"subscription_item":{"description":"The subscription item that generated this line item","maxLength":5000,"type":"string"}},"required":["invoice_item","proration","proration_details","subscription","subscription_item"],"title":"BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParent","type":"object","x-expandableFields":["proration_details"],"x-stripeMostCommon":["invoice_item","proration","proration_details","subscription","subscription_item"]},"billing_bill_resource_invoicing_parents_invoice_parent":{"description":"","properties":{"quote_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_parents_invoice_quote_parent"}],"description":"Details about the quote that generated this invoice","nullable":true},"subscription_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_parents_invoice_subscription_parent"}],"description":"Details about the subscription that generated this invoice","nullable":true},"type":{"description":"The type of parent that generated this invoice","enum":["quote_details","subscription_details"],"type":"string","x-stripeBypassValidation":true}},"required":["quote_details","subscription_details","type"],"title":"BillingBillResourceInvoicingParentsInvoiceParent","type":"object","x-expandableFields":["quote_details","subscription_details"],"x-stripeMostCommon":["quote_details","subscription_details","type"]},"billing_bill_resource_invoicing_parents_invoice_quote_parent":{"description":"","properties":{"quote":{"description":"The quote that generated this invoice","maxLength":5000,"type":"string"}},"required":["quote"],"title":"BillingBillResourceInvoicingParentsInvoiceQuoteParent","type":"object","x-expandableFields":[],"x-stripeMostCommon":["quote"]},"billing_bill_resource_invoicing_parents_invoice_subscription_parent":{"description":"","properties":{"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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"},"subscription":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/subscription"}],"description":"The subscription that generated this invoice","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/subscription"}]}},"subscription_proration_date":{"description":"Only set for upcoming invoices that preview prorations. The time used to calculate prorations.","format":"unix-time","type":"integer"}},"required":["metadata","subscription"],"title":"BillingBillResourceInvoicingParentsInvoiceSubscriptionParent","type":"object","x-expandableFields":["subscription"],"x-stripeMostCommon":["metadata","subscription","subscription_proration_date"]},"billing_bill_resource_invoicing_pricing_pricing":{"description":"","properties":{"price_details":{"$ref":"#/$defs/billing_bill_resource_invoicing_pricing_pricing_price_details"},"type":{"description":"The type of the pricing details.","enum":["price_details"],"type":"string","x-stripeBypassValidation":true},"unit_amount_decimal":{"description":"The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.","format":"decimal","nullable":true,"type":"string"}},"required":["type","unit_amount_decimal"],"title":"BillingBillResourceInvoicingPricingPricing","type":"object","x-expandableFields":["price_details"],"x-stripeMostCommon":["price_details","type","unit_amount_decimal"]},"billing_bill_resource_invoicing_pricing_pricing_price_details":{"description":"","properties":{"price":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/price"}],"description":"The ID of the price this item is associated with.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/price"}]}},"product":{"description":"The ID of the product this item is associated with.","maxLength":5000,"type":"string"}},"required":["price","product"],"title":"BillingBillResourceInvoicingPricingPricingPriceDetails","type":"object","x-expandableFields":["price"],"x-stripeMostCommon":["price","product"]},"billing_bill_resource_invoicing_taxes_tax":{"description":"","properties":{"amount":{"description":"The amount of the tax, in cents (or local equivalent).","type":"integer"},"tax_behavior":{"description":"Whether this tax is inclusive or exclusive.","enum":["exclusive","inclusive"],"type":"string"},"tax_rate_details":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_taxes_tax_rate_details"}],"description":"Additional details about the tax rate. Only present when `type` is `tax_rate_details`.","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_available","not_collecting","not_subject_to_tax","not_supported","portion_product_exempt","portion_reduced_rated","portion_standard_rated","product_exempt","product_exempt_holiday","proportionally_rated","reduced_rated","reverse_charge","standard_rated","taxable_basis_reduced","zero_rated"],"type":"string","x-stripeBypassValidation":true},"taxable_amount":{"description":"The amount on which tax is calculated, in cents (or local equivalent).","nullable":true,"type":"integer"},"type":{"description":"The type of tax information.","enum":["tax_rate_details"],"type":"string"}},"required":["amount","tax_behavior","tax_rate_details","taxability_reason","taxable_amount","type"],"title":"BillingBillResourceInvoicingTaxesTax","type":"object","x-expandableFields":["tax_rate_details"],"x-stripeMostCommon":["amount","tax_behavior","tax_rate_details","taxability_reason","taxable_amount","type"]},"billing_bill_resource_invoicing_taxes_tax_rate_details":{"description":"","properties":{"tax_rate":{"description":"ID of the tax rate","maxLength":5000,"type":"string"}},"required":["tax_rate"],"title":"BillingBillResourceInvoicingTaxesTaxRateDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["tax_rate"]},"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":[],"x-stripeMostCommon":["target_frozen_time"]},"billing_clocks_resource_status_details_status_details":{"description":"","properties":{"advancing":{"$ref":"#/$defs/billing_clocks_resource_status_details_advancing_status_details"}},"title":"BillingClocksResourceStatusDetailsStatusDetails","type":"object","x-expandableFields":["advancing"],"x-stripeMostCommon":["advancing"]},"billing_credit_grants_resource_amount":{"description":"","properties":{"monetary":{"anyOf":[{"$ref":"#/$defs/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","x-stripeBypassValidation":true}},"required":["monetary","type"],"title":"BillingCreditGrantsResourceAmount","type":"object","x-expandableFields":["monetary"],"x-stripeMostCommon":["monetary","type"]},"billing_credit_grants_resource_applicability_config":{"description":"","properties":{"scope":{"$ref":"#/$defs/billing_credit_grants_resource_scope"}},"required":["scope"],"title":"BillingCreditGrantsResourceApplicabilityConfig","type":"object","x-expandableFields":["scope"],"x-stripeMostCommon":["scope"]},"billing_credit_grants_resource_applicable_price":{"description":"","properties":{"id":{"description":"Unique identifier for the object.","maxLength":5000,"nullable":true,"type":"string"}},"required":["id"],"title":"BillingCreditGrantsResourceApplicablePrice","type":"object","x-expandableFields":[],"x-stripeMostCommon":["id"]},"billing_credit_grants_resource_balance_credit":{"description":"","properties":{"amount":{"$ref":"#/$defs/billing_credit_grants_resource_amount"},"credits_application_invoice_voided":{"anyOf":[{"$ref":"#/$defs/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","credits_application_invoice_voided","type"],"title":"BillingCreditGrantsResourceBalanceCredit","type":"object","x-expandableFields":["amount","credits_application_invoice_voided"],"x-stripeMostCommon":["amount","credits_application_invoice_voided","type"]},"billing_credit_grants_resource_balance_credits_application_invoice_voided":{"description":"","properties":{"invoice":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/invoice"}],"description":"The invoice to which the reinstated billing credits were originally applied.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"],"x-stripeMostCommon":["invoice","invoice_line_item"]},"billing_credit_grants_resource_balance_credits_applied":{"description":"","properties":{"invoice":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/invoice"}],"description":"The invoice to which the billing credits were applied.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"],"x-stripeMostCommon":["invoice","invoice_line_item"]},"billing_credit_grants_resource_balance_debit":{"description":"","properties":{"amount":{"$ref":"#/$defs/billing_credit_grants_resource_amount"},"credits_applied":{"anyOf":[{"$ref":"#/$defs/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","credits_applied","type"],"title":"BillingCreditGrantsResourceBalanceDebit","type":"object","x-expandableFields":["amount","credits_applied"],"x-stripeMostCommon":["amount","credits_applied","type"]},"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":[],"x-stripeMostCommon":["currency","value"]},"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. Cannot be used in combination with `prices`.","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. Cannot be used in combination with `price_type`.","items":{"$ref":"#/$defs/billing_credit_grants_resource_applicable_price"},"type":"array"}},"title":"BillingCreditGrantsResourceScope","type":"object","x-expandableFields":["prices"],"x-stripeMostCommon":["price_type","prices"]},"billing_details":{"description":"","properties":{"address":{"anyOf":[{"$ref":"#/$defs/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"},"tax_id":{"description":"Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.","maxLength":5000,"nullable":true,"type":"string"}},"required":["address","email","name","phone","tax_id"],"title":"billing_details","type":"object","x-expandableFields":["address"],"x-stripeMostCommon":["address","email","name","phone","tax_id"]},"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":["canceled_by_retention_policy","cancellation_requested","payment_disputed","payment_failed"],"nullable":true,"type":"string"}},"required":["comment","feedback","reason"],"title":"CancellationDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["comment","feedback","reason"]},"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://docs.stripe.com/sources/cards)","properties":{"account":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/account"}],"nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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`, `Cartes Bancaires`, `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 when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.","format":"currency","nullable":true,"type":"string"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/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"},"description":{"description":"A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"type":"string"},"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. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"type":"string"},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","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://docs.stripe.com/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":"#/$defs/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":["address_city","address_country","address_line1","address_line1_check","address_line2","address_state","address_zip","address_zip_check","brand","country","cvc_check","dynamic_last4","exp_month","exp_year","funding","id","last4","metadata","name","object","regulated_status","tokenization_method"],"title":"Card","type":"object","x-expandableFields":["account","customer","networks"],"x-resourceId":"card","x-stripeMostCommon":["address_city","address_country","address_line1","address_line2","address_state","address_zip","address_zip_check","brand","country","customer","cvc_check","exp_month","exp_year","fingerprint","funding","id","last4","metadata","name"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/customers/{customer}/sources/{id}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/customers/{customer}/sources/{id}"}],"x-stripeResource":{"class_name":"Card","in_package":"","polymorphic_groups":["deleted_external_account","deleted_payment_source","external_account","payment_source"]}},"card_generated_from_payment_method_details":{"description":"","properties":{"card_present":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["card_present","type"]},"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"}},"required":["date","ip"],"title":"CardIssuingAccountTermsOfService","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"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://docs.stripe.com/currencies#zero-decimal).","nullable":true,"type":"object"},"customer":{"description":"The ID of the customer whose cash balance this object represents.","maxLength":5000,"type":"string"},"customer_account":{"description":"The ID of an Account representing a customer whose cash balance this object represents.","maxLength":5000,"nullable":true,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/customer_balance_customer_balance_settings"}},"required":["available","customer","customer_account","livemode","object","settings"],"title":"cash_balance","type":"object","x-expandableFields":["settings"],"x-resourceId":"cash_balance","x-stripeMostCommon":["available","customer","customer_account","livemode","object","settings"],"x-stripeOperations":[{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/cash_balance"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/customers/{customer}/cash_balance"}],"x-stripeResource":{"class_name":"CashBalance","in_package":""}},"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 [Account Debits](https://docs.stripe.com/connect/account-debits) may also create 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://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/application"}],"description":"ID of the Connect application that created the charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application"}]}},"application_fee":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/application_fee"}],"description":"The application fee (if any) for the charge. [See the Connect documentation](https://docs.stripe.com/connect/direct-charges#collect-fees) for details.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application_fee"}]}},"application_fee_amount":{"description":"The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://docs.stripe.com/connect/direct-charges#collect-fees) for details.","nullable":true,"type":"integer"},"authorization_code":{"description":"Authorization code on the charge.","maxLength":5000,"type":"string"},"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/balance_transaction"}]}},"billing_details":{"$ref":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"ID of the customer this charge is for if one exists.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/balance_transaction"}]}},"failure_code":{"description":"Error code explaining reason for charge failure if available (see [the errors section](https://docs.stripe.com/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":"#/$defs/charge_fraud_details"}],"description":"Information on fraud assessments for the charge.","nullable":true},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"level3":{"$ref":"#/$defs/level3"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/account"}],"description":"The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://docs.stripe.com/connect/separate-charges-and-transfers) for details.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"outcome":{"anyOf":[{"$ref":"#/$defs/charge_outcome"}],"description":"Details about whether the payment was accepted, and why. See [understanding declines](https://docs.stripe.com/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":"#/$defs/payment_intent"}],"description":"ID of the PaymentIntent associated with this charge, if one exists.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/payment_method_details"}],"description":"Details about the payment method at the time of the transaction.","nullable":true},"presentment_details":{"$ref":"#/$defs/payment_flows_payment_intent_presentment_details"},"radar_options":{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"review":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/review"}],"description":"ID of the review associated with this charge if one exists.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/review"}]}},"shipping":{"anyOf":[{"$ref":"#/$defs/shipping"}],"description":"Shipping information for the charge.","nullable":true},"source":{"anyOf":[{"$ref":"#/$defs/payment_source"}],"description":"This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.","nullable":true},"source_transfer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/transfer"}]}},"transfer_data":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/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://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options) for details.","maxLength":5000,"nullable":true,"type":"string"}},"required":["amount","amount_captured","amount_refunded","application","application_fee","application_fee_amount","balance_transaction","billing_details","calculated_statement_descriptor","captured","created","currency","customer","description","disputed","failure_balance_transaction","failure_code","failure_message","fraud_details","id","livemode","metadata","object","on_behalf_of","outcome","paid","payment_intent","payment_method","payment_method_details","receipt_email","receipt_number","receipt_url","refunded","review","shipping","source","source_transfer","statement_descriptor","statement_descriptor_suffix","status","transfer_data","transfer_group"],"title":"Charge","type":"object","x-expandableFields":["application","application_fee","balance_transaction","billing_details","customer","failure_balance_transaction","fraud_details","level3","on_behalf_of","outcome","payment_intent","payment_method_details","presentment_details","radar_options","refunds","review","shipping","source","source_transfer","transfer","transfer_data"],"x-resourceId":"charge","x-stripeMostCommon":["amount","balance_transaction","billing_details","currency","customer","description","disputed","id","metadata","payment_intent","payment_method_details","receipt_email","refunded","shipping","statement_descriptor","statement_descriptor_suffix","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/charges"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/charges/{charge}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/charges/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/charges"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/charges/{charge}"},{"method_name":"capture","method_on":"service","method_type":"custom","operation":"post","path":"/v1/charges/{charge}/capture"}],"x-stripeResource":{"class_name":"Charge","has_collection_class":true,"has_search_result_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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":[],"x-stripeMostCommon":["stripe_report","user_report"]},"charge_outcome":{"description":"","properties":{"advice_code":{"description":"An enumerated value providing a more detailed explanation on [how to proceed with an error](https://docs.stripe.com/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, an alphanumeric code which indicates the reason the charge 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://docs.stripe.com/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 blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://docs.stripe.com/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":"#/$defs/rule"}],"description":"The ID of the Radar rule that matched the payment, if applicable.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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://docs.stripe.com/declines) and [Radar reviews](https://docs.stripe.com/radar/reviews) for details.","maxLength":5000,"type":"string"}},"required":["advice_code","network_advice_code","network_decline_code","network_status","reason","seller_message","type"],"title":"ChargeOutcome","type":"object","x-expandableFields":["rule"],"x-stripeMostCommon":["advice_code","network_advice_code","network_decline_code","network_status","reason","risk_level","risk_score","rule","seller_message","type"]},"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":"#/$defs/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":"#/$defs/account"}]}}},"required":["amount","destination"],"title":"ChargeTransferData","type":"object","x-expandableFields":["destination"],"x-stripeMostCommon":["amount","destination"]},"connect_account_reference":{"description":"","properties":{"account":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/account"}],"description":"The connected account being referenced when `type` is `account`.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"type":{"description":"Type of the account referenced.","enum":["account","self"],"type":"string","x-stripeBypassValidation":true}},"required":["type"],"title":"ConnectAccountReference","type":"object","x-expandableFields":["account"],"x-stripeMostCommon":["account","type"]},"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":"#/$defs/account"}],"description":"ID of the account that funds are being collected for.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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"],"x-stripeMostCommon":["amount","currency","destination","id","livemode","object"],"x-stripeResource":{"class_name":"ConnectCollectionTransfer","in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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://api.stripe.com#subscriptions), [invoices](https://api.stripe.com#invoices),\n[checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://api.stripe.com#quotes), and more. Coupons do not work with conventional one-off [charges](/api/charges/create) or [payment intents](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/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`, or `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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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://docs.stripe.com/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":["amount_off","created","currency","duration","duration_in_months","id","livemode","max_redemptions","metadata","name","object","percent_off","redeem_by","times_redeemed","valid"],"title":"Coupon","type":"object","x-expandableFields":["applies_to","currency_options"],"x-resourceId":"coupon","x-stripeMostCommon":["amount_off","currency","duration","id","metadata","name","percent_off"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/coupons/{coupon}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/coupons"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/coupons/{coupon}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/coupons"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/coupons/{coupon}"}],"x-stripeResource":{"class_name":"Coupon","has_collection_class":true,"in_package":""}},"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":[],"x-stripeMostCommon":["products"]},"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":[],"x-stripeMostCommon":["amount_off"]},"currency_option":{"description":"","properties":{"custom_unit_amount":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/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":"#/$defs/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"}},"required":["custom_unit_amount","tax_behavior","unit_amount","unit_amount_decimal"],"title":"CurrencyOption","type":"object","x-expandableFields":["custom_unit_amount","tiers"],"x-stripeMostCommon":["unit_amount"]},"custom_logo":{"description":"","properties":{"content_type":{"description":"Content type of the Dashboard-only CustomPaymentMethodType logo.","maxLength":5000,"nullable":true,"type":"string"},"url":{"description":"URL of the Dashboard-only CustomPaymentMethodType logo.","maxLength":5000,"type":"string"}},"required":["content_type","url"],"title":"custom_logo","type":"object","x-expandableFields":[],"x-stripeMostCommon":["content_type","url"]},"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"}},"required":["maximum","minimum","preset"],"title":"CustomUnitAmount","type":"object","x-expandableFields":[],"x-stripeMostCommon":["maximum","minimum","preset"]},"customer":{"description":"This object represents a customer of your business. Use it to [create recurring charges](https://docs.stripe.com/invoicing/customer), [save payment](https://docs.stripe.com/payments/save-during-payment) and contact information,\nand track payments that belong to the same customer.","properties":{"address":{"anyOf":[{"$ref":"#/$defs/address"}],"description":"The customer's address.","nullable":true},"balance":{"description":"The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance).","type":"integer"},"business_name":{"description":"The customer's business name.","maxLength":150,"type":"string"},"cash_balance":{"anyOf":[{"$ref":"#/$defs/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"},"customer_account":{"description":"The ID of an Account representing a customer. You can use this ID with any v1 API that accepts a customer_account parameter.","maxLength":5000,"nullable":true,"type":"string"},"default_source":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_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://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_source"}]}},"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://docs.stripe.com/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":"#/$defs/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"},"individual_name":{"description":"The customer's individual name.","maxLength":150,"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":"#/$defs/invoice_setting_customer_setting"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":{"$ref":"#/$defs/payment_source"},"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"],"x-stripeMostCommon":["data","has_more","object","url"]},"subscriptions":{"description":"The customer's current subscriptions, if any.","properties":{"data":{"description":"Details about each object.","items":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"tax":{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"test_clock":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/test_helpers.test_clock"}],"description":"ID of the test clock that this customer belongs to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/test_helpers.test_clock"}]}}},"required":["created","default_source","description","email","id","livemode","object","shipping"],"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","x-stripeMostCommon":["address","customer_account","description","email","id","metadata","name","phone","shipping","tax"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/customers/{customer}"},{"method_name":"delete_discount","method_on":"service","method_type":"custom","operation":"delete","path":"/v1/customers/{customer}/discount"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/customers"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}"},{"method_name":"balance_transactions","method_on":"service","method_type":"custom","operation":"get","path":"/v1/customers/{customer}/balance_transactions"},{"method_name":"list_payment_methods","method_on":"service","method_type":"custom","operation":"get","path":"/v1/customers/{customer}/payment_methods"},{"method_name":"retrieve_payment_method","method_on":"service","method_type":"custom","operation":"get","path":"/v1/customers/{customer}/payment_methods/{payment_method}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/customers/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/customers"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/customers/{customer}"},{"method_name":"create_funding_instructions","method_on":"service","method_type":"custom","operation":"post","path":"/v1/customers/{customer}/funding_instructions"},{"method_name":"fund_cash_balance","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/customers/{customer}/fund_cash_balance"}],"x-stripeResource":{"class_name":"Customer","has_collection_class":true,"has_search_result_class":true,"in_package":""}},"customer_acceptance":{"description":"","properties":{"accepted_at":{"description":"The time that the customer accepts the mandate.","format":"unix-time","nullable":true,"type":"integer"},"offline":{"$ref":"#/$defs/offline_acceptance"},"online":{"$ref":"#/$defs/online_acceptance"},"type":{"description":"The mandate includes the type of customer acceptance information, such as: `online` or `offline`.","enum":["offline","online"],"type":"string"}},"required":["accepted_at","type"],"title":"customer_acceptance","type":"object","x-expandableFields":["offline","online"],"x-stripeMostCommon":["accepted_at","offline","online","type"]},"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":[],"x-stripeMostCommon":["reconciliation_mode","using_merchant_default"]},"customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft":{"description":"","properties":{"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/balance_transaction"}],"description":"The [Balance Transaction](https://docs.stripe.com/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/balance_transaction"}]}},"linked_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer_cash_balance_transaction"}],"description":"The [Cash Balance Transaction](https://docs.stripe.com/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer_cash_balance_transaction"}]}}},"required":["balance_transaction","linked_transaction"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft","type":"object","x-expandableFields":["balance_transaction","linked_transaction"],"x-stripeMostCommon":["balance_transaction","linked_transaction"],"x-stripeResource":{"class_name":"AdjustedForOverdraft","in_package":""}},"customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction":{"description":"","properties":{"payment_intent":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_intent"}],"description":"The [Payment Intent](https://docs.stripe.com/api/payment_intents/object) that funds were applied to.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_intent"}]}}},"required":["payment_intent"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction","type":"object","x-expandableFields":["payment_intent"],"x-stripeMostCommon":["payment_intent"]},"customer_balance_resource_cash_balance_transaction_resource_funded_transaction":{"description":"","properties":{"bank_transfer":{"$ref":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer"}},"required":["bank_transfer"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction","type":"object","x-expandableFields":["bank_transfer"],"x-stripeMostCommon":["bank_transfer"]},"customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer":{"description":"","properties":{"eu_bank_transfer":{"$ref":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer"},"gb_bank_transfer":{"$ref":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer"},"jp_bank_transfer":{"$ref":"#/$defs/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":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer"}},"required":["reference","type"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer","type":"object","x-expandableFields":["eu_bank_transfer","gb_bank_transfer","jp_bank_transfer","us_bank_transfer"],"x-stripeMostCommon":["eu_bank_transfer","gb_bank_transfer","jp_bank_transfer","reference","type","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"}},"required":["bic","iban_last4","sender_name"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bic","iban_last4","sender_name"]},"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"}},"required":["account_number_last4","sender_name","sort_code"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_number_last4","sender_name","sort_code"]},"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"}},"required":["sender_bank","sender_branch","sender_name"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["sender_bank","sender_branch","sender_name"]},"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"}},"required":["sender_name"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["network","sender_name"]},"customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction":{"description":"","properties":{"refund":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/refund"}],"description":"The [Refund](https://docs.stripe.com/api/refunds/object) that moved these funds into the customer's cash balance.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/refund"}]}}},"required":["refund"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction","type":"object","x-expandableFields":["refund"],"x-stripeMostCommon":["refund"],"x-stripeResource":{"class_name":"RefundedFromPayment","in_package":""}},"customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance":{"description":"","properties":{"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/balance_transaction"}],"description":"The [Balance Transaction](https://docs.stripe.com/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/balance_transaction"}]}}},"required":["balance_transaction"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance","type":"object","x-expandableFields":["balance_transaction"],"x-stripeMostCommon":["balance_transaction"],"x-stripeResource":{"class_name":"TransferredToBalance","in_package":""}},"customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction":{"description":"","properties":{"payment_intent":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_intent"}],"description":"The [Payment Intent](https://docs.stripe.com/api/payment_intents/object) that funds were unapplied from.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_intent"}]}}},"required":["payment_intent"],"title":"CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction","type":"object","x-expandableFields":["payment_intent"],"x-stripeMostCommon":["payment_intent"],"x-stripeResource":{"class_name":"UnappliedFromPayment","in_package":""}},"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":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft"},"applied_to_payment":{"$ref":"#/$defs/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":"#/$defs/customer"}],"description":"The customer whose available cash balance changed as a result of this transaction.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"}]}},"customer_account":{"description":"The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.","maxLength":5000,"nullable":true,"type":"string"},"ending_balance":{"description":"The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).","type":"integer"},"funded":{"$ref":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"net_amount":{"description":"The amount by which the cash balance changed, represented in the [smallest currency unit](https://docs.stripe.com/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":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction"},"transferred_to_balance":{"$ref":"#/$defs/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://docs.stripe.com/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":"#/$defs/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction"}},"required":["created","currency","customer","customer_account","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","x-stripeMostCommon":["adjusted_for_overdraft","applied_to_payment","created","currency","customer","customer_account","ending_balance","funded","id","livemode","net_amount","object","refunded_from_payment","transferred_to_balance","type","unapplied_from_payment"],"x-stripeOperations":[{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/customers/{customer}/cash_balance_transactions"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/customers/{customer}/cash_balance_transactions"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/cash_balance_transactions/{transaction}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}],"x-stripeResource":{"class_name":"CustomerCashBalanceTransaction","has_collection_class":true,"in_package":"","parent":"customer","polymorphic_groups":["balance_transaction_source"]}},"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":"#/$defs/customer_tax_location"}],"description":"The identified tax location of the customer.","nullable":true},"provider":{"description":"The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps).","enum":["anrok","avalara","sphere","stripe"],"type":"string"}},"required":["automatic_tax","ip_address","location","provider"],"title":"CustomerTax","type":"object","x-expandableFields":["location"],"x-stripeMostCommon":["automatic_tax","ip_address","location","provider"]},"customer_tax_location":{"description":"","properties":{"country":{"description":"The identified tax country of the customer.","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 identified tax state, county, province, or region of the customer.","maxLength":5000,"nullable":true,"type":"string"}},"required":["country","source","state"],"title":"CustomerTaxLocation","type":"object","x-expandableFields":[],"x-stripeMostCommon":["country","source","state"]},"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","name","object"],"title":"DeletedApplication","type":"object","x-expandableFields":[],"x-stripeMostCommon":["deleted","id","name","object"],"x-stripeResource":{"class_name":"DeletedApplication","in_package":""}},"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":[],"x-stripeMostCommon":["currency","deleted","id","object"],"x-stripeResource":{"class_name":"DeletedBankAccount","in_package":""}},"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":[],"x-stripeMostCommon":["currency","deleted","id","object"],"x-stripeResource":{"class_name":"DeletedCard","in_package":""}},"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","x-stripeMostCommon":["deleted","id","object"],"x-stripeResource":{"class_name":"DeletedCustomer","in_package":""}},"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"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"The ID of the customer associated with this discount.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"The ID of the account representing the customer associated with this discount.","maxLength":5000,"nullable":true,"type":"string"},"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":"#/$defs/promotion_code"}],"description":"The promotion code applied to create this discount.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/promotion_code"}]}},"source":{"$ref":"#/$defs/discount_source"},"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":["checkout_session","customer","customer_account","deleted","id","invoice","invoice_item","object","promotion_code","source","start","subscription","subscription_item"],"title":"DeletedDiscount","type":"object","x-expandableFields":["customer","promotion_code","source"],"x-resourceId":"deleted_discount","x-stripeMostCommon":["customer","customer_account","deleted","id","source","start","subscription"],"x-stripeResource":{"class_name":"DeletedDiscount","in_package":""}},"deleted_external_account":{"anyOf":[{"$ref":"#/$defs/deleted_bank_account"},{"$ref":"#/$defs/deleted_card"}],"title":"Polymorphic","x-resourceId":"deleted_external_account","x-stripeBypassValidation":true,"x-stripeResource":{"class_name":"DeletedExternalAccount"}},"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","x-stripeMostCommon":["deleted","id","object"],"x-stripeResource":{"class_name":"DeletedInvoice","in_package":""}},"deleted_payment_source":{"anyOf":[{"$ref":"#/$defs/deleted_bank_account"},{"$ref":"#/$defs/deleted_card"}],"title":"Polymorphic","x-resourceId":"deleted_payment_source","x-stripeBypassValidation":true,"x-stripeResource":{"class_name":"DeletedPaymentSource"}},"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","x-stripeMostCommon":["deleted","id","object"],"x-stripeResource":{"class_name":"DeletedPlan","in_package":""}},"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":[],"x-stripeMostCommon":["deleted","id","object"],"x-stripeResource":{"class_name":"DeletedPrice","in_package":""}},"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","x-stripeMostCommon":["deleted","id","object"],"x-stripeResource":{"class_name":"DeletedProduct","in_package":""}},"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","x-stripeMostCommon":["deleted","id","object"],"x-stripeResource":{"class_name":"DeletedTaxId","in_package":""}},"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://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#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://docs.stripe.com/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"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"The ID of the customer associated with this discount.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"The ID of the account representing the customer associated with this discount.","maxLength":5000,"nullable":true,"type":"string"},"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":"#/$defs/promotion_code"}],"description":"The promotion code applied to create this discount.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/promotion_code"}]}},"source":{"$ref":"#/$defs/discount_source"},"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":["checkout_session","customer","customer_account","end","id","invoice","invoice_item","object","promotion_code","source","start","subscription","subscription_item"],"title":"Discount","type":"object","x-expandableFields":["customer","promotion_code","source"],"x-stripeMostCommon":["customer","customer_account","end","id","source","start","subscription"],"x-stripeResource":{"class_name":"Discount","in_package":""}},"discount_source":{"description":"","properties":{"coupon":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/coupon"}],"description":"The coupon that was redeemed to create this discount.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/coupon"}]}},"type":{"description":"The source type of the discount.","enum":["coupon"],"type":"string"}},"required":["coupon","type"],"title":"DiscountSource","type":"object","x-expandableFields":["coupon"],"x-stripeMostCommon":["coupon","type"]},"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":"#/$defs/discount"},{"$ref":"#/$defs/deleted_discount"}],"description":"The discount that was applied to get this discount amount.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/discount"},{"$ref":"#/$defs/deleted_discount"}]}}},"required":["amount","discount"],"title":"DiscountsResourceDiscountAmount","type":"object","x-expandableFields":["discount"],"x-stripeMostCommon":["amount","discount"]},"discounts_resource_stackable_discount_with_discount_end":{"description":"","properties":{"coupon":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/coupon"}],"description":"ID of the coupon to create a new discount for.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/coupon"}]}},"discount":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/discount"}],"description":"ID of an existing discount on the object (or one of its ancestors) to reuse.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/discount"}]}},"promotion_code":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/promotion_code"}],"description":"ID of the promotion code to create a new discount for.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/promotion_code"}]}}},"required":["coupon","discount","promotion_code"],"title":"DiscountsResourceStackableDiscountWithDiscountEnd","type":"object","x-expandableFields":["coupon","discount","promotion_code"],"x-stripeMostCommon":["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://docs.stripe.com/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":"#/$defs/balance_transaction"},"type":"array"},"charge":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/charge"}],"description":"ID of the charge that's disputed.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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","visa_compliance"],"type":"string"},"type":"array"},"evidence":{"$ref":"#/$defs/dispute_evidence"},"evidence_details":{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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_reason_code":{"description":"Network-dependent reason code for the dispute.","maxLength":5000,"nullable":true,"type":"string"},"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":"#/$defs/payment_intent"}],"description":"ID of the PaymentIntent that's disputed.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_intent"}]}},"payment_method_details":{"$ref":"#/$defs/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`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://docs.stripe.com/disputes/categories).","maxLength":5000,"type":"string"},"status":{"description":"The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`.","enum":["lost","needs_response","prevented","under_review","warning_closed","warning_needs_response","warning_under_review","won"],"type":"string","x-stripeBypassValidation":true}},"required":["amount","balance_transactions","charge","created","currency","enhanced_eligibility_types","evidence","evidence_details","id","is_charge_refundable","livemode","metadata","object","payment_intent","reason","status"],"title":"Dispute","type":"object","x-expandableFields":["balance_transactions","charge","evidence","evidence_details","payment_intent","payment_method_details"],"x-resourceId":"dispute","x-stripeMostCommon":["amount","charge","currency","evidence","id","metadata","payment_intent","reason","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/disputes"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/disputes/{dispute}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/disputes/{dispute}"},{"method_name":"close","method_on":"service","method_type":"custom","operation":"post","path":"/v1/disputes/{dispute}/close"}],"x-stripeResource":{"class_name":"Dispute","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"dispute_enhanced_eligibility":{"description":"","properties":{"visa_compelling_evidence_3":{"$ref":"#/$defs/dispute_enhanced_eligibility_visa_compelling_evidence3"},"visa_compliance":{"$ref":"#/$defs/dispute_enhanced_eligibility_visa_compliance"}},"title":"DisputeEnhancedEligibility","type":"object","x-expandableFields":["visa_compelling_evidence_3","visa_compliance"],"x-stripeMostCommon":["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":[],"x-stripeMostCommon":["required_actions","status"]},"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":[],"x-stripeMostCommon":["status"]},"dispute_enhanced_evidence":{"description":"","properties":{"visa_compelling_evidence_3":{"$ref":"#/$defs/dispute_enhanced_evidence_visa_compelling_evidence3"},"visa_compliance":{"$ref":"#/$defs/dispute_enhanced_evidence_visa_compliance"}},"title":"DisputeEnhancedEvidence","type":"object","x-expandableFields":["visa_compelling_evidence_3","visa_compliance"],"x-stripeMostCommon":["visa_compelling_evidence_3","visa_compliance"]},"dispute_enhanced_evidence_visa_compelling_evidence3":{"description":"","properties":{"disputed_transaction":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/dispute_visa_compelling_evidence3_prior_undisputed_transaction"},"type":"array"}},"required":["disputed_transaction","prior_undisputed_transactions"],"title":"DisputeEnhancedEvidenceVisaCompellingEvidence3","type":"object","x-expandableFields":["disputed_transaction","prior_undisputed_transactions"],"x-stripeMostCommon":["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":[],"x-stripeMostCommon":["fee_acknowledged"]},"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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/file"}]}},"duplicate_charge_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/file"}]}},"refund_policy":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/file"}]}},"uncategorized_text":{"description":"Any additional evidence or statements.","maxLength":150000,"nullable":true,"type":"string"}},"required":["access_activity_log","billing_address","cancellation_policy","cancellation_policy_disclosure","cancellation_rebuttal","customer_communication","customer_email_address","customer_name","customer_purchase_ip","customer_signature","duplicate_charge_documentation","duplicate_charge_explanation","duplicate_charge_id","enhanced_evidence","product_description","receipt","refund_policy","refund_policy_disclosure","refund_refusal_explanation","service_date","service_documentation","shipping_address","shipping_carrier","shipping_date","shipping_documentation","shipping_tracking_number","uncategorized_file","uncategorized_text"],"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"],"x-stripeMostCommon":["access_activity_log","billing_address","cancellation_policy","cancellation_policy_disclosure","cancellation_rebuttal","customer_communication","customer_email_address","customer_name","customer_purchase_ip","customer_signature","duplicate_charge_documentation","duplicate_charge_explanation","duplicate_charge_id","enhanced_evidence","product_description","receipt","refund_policy","refund_policy_disclosure","refund_refusal_explanation","service_date","service_documentation","shipping_address","shipping_carrier","shipping_date","shipping_documentation","shipping_tracking_number","uncategorized_file","uncategorized_text"]},"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":"#/$defs/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":["due_by","enhanced_eligibility","has_evidence","past_due","submission_count"],"title":"DisputeEvidenceDetails","type":"object","x-expandableFields":["enhanced_eligibility"],"x-stripeMostCommon":["due_by","enhanced_eligibility","has_evidence","past_due","submission_count"]},"dispute_payment_method_details":{"description":"","properties":{"amazon_pay":{"$ref":"#/$defs/dispute_payment_method_details_amazon_pay"},"card":{"$ref":"#/$defs/dispute_payment_method_details_card"},"klarna":{"$ref":"#/$defs/dispute_payment_method_details_klarna"},"paypal":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["amazon_pay","card","klarna","paypal","type"]},"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"}},"required":["dispute_type"],"title":"DisputePaymentMethodDetailsAmazonPay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["dispute_type"]},"dispute_payment_method_details_card":{"description":"","properties":{"brand":{"description":"Card brand. Can be `amex`, `cartes_bancaires`, `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":["block","chargeback","compliance","inquiry","resolution"],"type":"string"},"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","network_reason_code"],"title":"DisputePaymentMethodDetailsCard","type":"object","x-expandableFields":[],"x-stripeMostCommon":["brand","case_type","network_reason_code"]},"dispute_payment_method_details_klarna":{"description":"","properties":{"chargeback_loss_reason_code":{"description":"Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason","maxLength":5000,"type":"string"},"reason_code":{"description":"The reason for the dispute as defined by Klarna","maxLength":5000,"nullable":true,"type":"string"}},"required":["reason_code"],"title":"DisputePaymentMethodDetailsKlarna","type":"object","x-expandableFields":[],"x-stripeMostCommon":["chargeback_loss_reason_code","reason_code"]},"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"}},"required":["case_id","reason_code"],"title":"DisputePaymentMethodDetailsPaypal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["case_id","reason_code"]},"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, such as the street, PO Box, or company name.","maxLength":5000,"nullable":true,"type":"string"},"line2":{"description":"Address line 2, such as the 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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).","maxLength":5000,"nullable":true,"type":"string"}},"required":["city","country","line1","line2","postal_code","state"],"title":"DisputeTransactionShippingAddress","type":"object","x-expandableFields":[],"x-stripeMostCommon":["city","country","line1","line2","postal_code","state"]},"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":"#/$defs/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":["customer_account_id","customer_device_fingerprint","customer_device_id","customer_email_address","customer_purchase_ip","merchandise_or_services","product_description","shipping_address"],"title":"DisputeVisaCompellingEvidence3DisputedTransaction","type":"object","x-expandableFields":["shipping_address"],"x-stripeMostCommon":["customer_account_id","customer_device_fingerprint","customer_device_id","customer_email_address","customer_purchase_ip","merchandise_or_services","product_description","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":"#/$defs/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","customer_account_id","customer_device_fingerprint","customer_device_id","customer_email_address","customer_purchase_ip","product_description","shipping_address"],"title":"DisputeVisaCompellingEvidence3PriorUndisputedTransaction","type":"object","x-expandableFields":["shipping_address"],"x-stripeMostCommon":["charge","customer_account_id","customer_device_fingerprint","customer_device_id","customer_email_address","customer_purchase_ip","product_description","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":[],"x-stripeMostCommon":["email_sent_at","email_sent_to"]},"external_account":{"anyOf":[{"$ref":"#/$defs/bank_account"},{"$ref":"#/$defs/card"}],"title":"Polymorphic","x-resourceId":"external_account","x-stripeBypassValidation":true,"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/accounts/{account}/external_accounts"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/accounts/{account}/external_accounts"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/accounts/{account}/external_accounts/{id}"},{"method_name":"create","method_on":"collection","method_type":"create","operation":"post","path":"/v1/accounts/{account}/external_accounts"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/accounts/{account}/external_accounts"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/accounts/{account}/external_accounts/{id}"}],"x-stripeResource":{"class_name":"ExternalAccount","has_collection_class":true}},"external_account_requirements":{"description":"","properties":{"currently_due":{"description":"Fields that need to be resolved to keep the external account enabled. If not resolved by `current_deadline`, these fields will appear in `past_due` as well, and the account is disabled.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"},"errors":{"description":"Details about validation and verification failures for `due` requirements that must be resolved.","items":{"$ref":"#/$defs/account_requirements_error"},"nullable":true,"type":"array"},"past_due":{"description":"Fields that haven't been resolved by `current_deadline`. These fields need to be resolved to enable the external account.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"},"pending_verification":{"description":"Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.","items":{"maxLength":5000,"type":"string"},"nullable":true,"type":"array"}},"required":["currently_due","errors","past_due","pending_verification"],"title":"ExternalAccountRequirements","type":"object","x-expandableFields":["errors"],"x-stripeMostCommon":["currently_due","errors","past_due","pending_verification"]},"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","application","currency","description","type"],"title":"Fee","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","application","currency","description","type"]},"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://docs.stripe.com/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":"#/$defs/balance_transaction"}],"description":"Balance transaction that describes the impact on your account balance.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/application_fee"}],"description":"ID of the application fee that was refunded.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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://docs.stripe.com/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","balance_transaction","created","currency","fee","id","metadata","object"],"title":"FeeRefund","type":"object","x-expandableFields":["balance_transaction","fee"],"x-resourceId":"fee_refund","x-stripeMostCommon":["amount","currency","fee","id","metadata"],"x-stripeOperations":[{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/application_fees/{fee}/refunds/{id}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/application_fees/{fee}/refunds/{id}"},{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/application_fees/{id}/refunds"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/application_fees/{id}/refunds"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/application_fees/{fee}/refunds/{id}"},{"method_name":"create","method_on":"collection","method_type":"create","operation":"post","path":"/v1/application_fees/{id}/refunds"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/application_fees/{id}/refunds"}],"x-stripeResource":{"class_name":"FeeRefund","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"file":{"description":"This object represents files hosted on Stripe's servers. You can upload\nfiles with the [create file](https://api.stripe.com#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://docs.stripe.com/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://api.stripe.com#file_links) that point at this file.","nullable":true,"properties":{"data":{"description":"Details about each object.","items":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"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://docs.stripe.com/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","platform_terms_of_service","selfie","sigma_scheduled_query","tax_document_user_upload","terminal_android_apk","terminal_reader_splashscreen","terminal_wifi_certificate","terminal_wifi_private_key"],"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","expires_at","filename","id","object","purpose","size","title","type","url"],"title":"File","type":"object","x-expandableFields":["links"],"x-resourceId":"file","x-stripeMostCommon":["id","purpose","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/files"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/files/{file}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/files"}],"x-stripeResource":{"class_name":"File","has_collection_class":true,"in_package":""}},"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":"#/$defs/file"}],"description":"The file object this link points to.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/file"}]}},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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","expires_at","file","id","livemode","metadata","object","url"],"title":"FileLink","type":"object","x-expandableFields":["file"],"x-resourceId":"file_link","x-stripeMostCommon":["expires_at","file","id","metadata","url"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/file_links"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/file_links/{link}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/file_links"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/file_links/{link}"}],"x-stripeResource":{"class_name":"FileLink","has_collection_class":true,"in_package":""}},"funding_instructions_bank_transfer_aba_record":{"description":"ABA Records contain U.S. bank account details per the ABA format.","properties":{"account_holder_address":{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["account_holder_address","account_holder_name","account_number","account_type","bank_address","bank_name","routing_number"],"x-stripeResource":{"class_name":"Aba","in_package":""}},"funding_instructions_bank_transfer_financial_address":{"description":"FinancialAddresses contain identifying information that resolves to a FinancialAccount.","properties":{"aba":{"$ref":"#/$defs/funding_instructions_bank_transfer_aba_record"},"iban":{"$ref":"#/$defs/funding_instructions_bank_transfer_iban_record"},"sort_code":{"$ref":"#/$defs/funding_instructions_bank_transfer_sort_code_record"},"spei":{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/funding_instructions_bank_transfer_zengin_record"}},"required":["type"],"title":"FundingInstructionsBankTransferFinancialAddress","type":"object","x-expandableFields":["aba","iban","sort_code","spei","swift","zengin"],"x-stripeMostCommon":["aba","iban","sort_code","spei","supported_networks","swift","type","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":"#/$defs/address"},"account_holder_name":{"description":"The name of the person or business that owns the bank account","maxLength":5000,"type":"string"},"bank_address":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["account_holder_address","account_holder_name","bank_address","bic","country","iban"]},"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":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["account_holder_address","account_holder_name","account_number","bank_address","sort_code"],"x-stripeResource":{"class_name":"SortCodeRecords","in_package":""}},"funding_instructions_bank_transfer_spei_record":{"description":"SPEI Records contain Mexico bank account details per the SPEI format.","properties":{"account_holder_address":{"$ref":"#/$defs/address"},"account_holder_name":{"description":"The account holder name","maxLength":5000,"type":"string"},"bank_address":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["account_holder_address","account_holder_name","bank_address","bank_code","bank_name","clabe"]},"funding_instructions_bank_transfer_swift_record":{"description":"SWIFT Records contain U.S. bank account details per the SWIFT format.","properties":{"account_holder_address":{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["account_holder_address","account_holder_name","account_number","account_type","bank_address","bank_name","swift_code"]},"funding_instructions_bank_transfer_zengin_record":{"description":"Zengin Records contain Japan bank account details per the Zengin format.","properties":{"account_holder_address":{"$ref":"#/$defs/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":"#/$defs/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","account_holder_name","account_number","account_type","bank_address","bank_code","bank_name","branch_code","branch_name"],"title":"FundingInstructionsBankTransferZenginRecord","type":"object","x-expandableFields":["account_holder_address","bank_address"],"x-stripeMostCommon":["account_holder_address","account_holder_name","account_number","account_type","bank_address","bank_code","bank_name","branch_code","branch_name"]},"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"}},"required":["brand","country","exp_month","exp_year","last4"],"title":"internal_card","type":"object","x-expandableFields":[],"x-stripeMostCommon":["brand","country","exp_month","exp_year","last4"]},"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://api.stripe.com#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://docs.stripe.com/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://docs.stripe.com/billing/customer/balance).\n\nRelated guide: [Send invoices to customers](https://docs.stripe.com/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":"#/$defs/tax_id"},{"$ref":"#/$defs/deleted_tax_id"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_id"},{"$ref":"#/$defs/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_overpaid":{"description":"Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.","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":"#/$defs/application"},{"$ref":"#/$defs/deleted_application"}],"description":"ID of the Connect Application that created the invoice.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application"},{"$ref":"#/$defs/deleted_application"}]}},"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://docs.stripe.com/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":"#/$defs/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 upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription.","enum":["automatic_pending_invoice_item_invoice","manual","quote_accept","subscription","subscription_create","subscription_cycle","subscription_threshold","subscription_update","upcoming"],"nullable":true,"type":"string"},"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"},"confirmation_secret":{"anyOf":[{"$ref":"#/$defs/invoices_resource_confirmation_secret"}],"description":"The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.","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","type":"string"},"custom_fields":{"description":"Custom fields displayed on the invoice.","items":{"$ref":"#/$defs/invoice_setting_custom_field"},"nullable":true,"type":"array"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"The ID of the customer to bill.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"The ID of the account representing the customer to bill.","maxLength":5000,"nullable":true,"type":"string"},"customer_address":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/invoices_resource_invoice_tax_id"},"nullable":true,"type":"array"},"default_payment_method":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/payment_method"}]}},"default_source":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_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":"#/$defs/payment_source"}]}},"default_tax_rates":{"description":"The tax rates applied to this invoice, if any.","items":{"$ref":"#/$defs/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"},"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":"#/$defs/discount"},{"$ref":"#/$defs/deleted_discount"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/discount"},{"$ref":"#/$defs/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":"#/$defs/invoices_resource_from_invoice"}],"description":"Details of the invoice that was cloned. See the [revision documentation](https://docs.stripe.com/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. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.","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":"#/$defs/connect_account_reference"},"last_finalization_error":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/invoice"}],"description":"The ID of the most recent non-draft revision of this invoice","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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://docs.stripe.com/billing/invoices/connect) documentation for details.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"parent":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_parents_invoice_parent"}],"description":"The parent that generated this invoice","nullable":true},"payment_settings":{"$ref":"#/$defs/invoices_payment_settings"},"payments":{"description":"Payments for this invoice. Use [invoice payment](/api/invoice-payment) to get more details.","properties":{"data":{"description":"Details about each object.","items":{"$ref":"#/$defs/invoice_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,"type":"string"}},"required":["data","has_more","object","url"],"title":"InvoicesPaymentsListInvoicePayments","type":"object","x-expandableFields":["data"],"x-stripeMostCommon":["data","has_more","object","url"]},"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"},"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":"#/$defs/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":"#/$defs/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":"#/$defs/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://docs.stripe.com/billing/invoices/workflow#workflow-overview)","enum":["draft","open","paid","uncollectible","void"],"nullable":true,"type":"string","x-stripeBypassValidation":true},"status_transitions":{"$ref":"#/$defs/invoices_resource_status_transitions"},"subscription":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/subscription"}],"nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/subscription"}]}},"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"},"test_clock":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/test_helpers.test_clock"}],"description":"ID of the test clock this invoice belongs to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/test_helpers.test_clock"}]}},"threshold_reason":{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/invoices_resource_pretax_credit_amount"},"nullable":true,"type":"array"},"total_taxes":{"description":"The aggregate tax information of all line items.","items":{"$ref":"#/$defs/billing_bill_resource_invoicing_taxes_tax"},"nullable":true,"type":"array"},"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://docs.stripe.com/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":["account_country","account_name","account_tax_ids","amount_due","amount_overpaid","amount_paid","amount_remaining","amount_shipping","application","attempt_count","attempted","automatic_tax","automatically_finalizes_at","billing_reason","collection_method","created","currency","custom_fields","customer","customer_account","customer_address","customer_email","customer_name","customer_phone","customer_shipping","customer_tax_exempt","default_payment_method","default_source","default_tax_rates","description","discounts","due_date","effective_at","ending_balance","footer","from_invoice","issuer","last_finalization_error","latest_revision","lines","livemode","metadata","next_payment_attempt","number","object","on_behalf_of","parent","payment_settings","period_end","period_start","post_payment_credit_notes_amount","pre_payment_credit_notes_amount","receipt_number","rendering","shipping_cost","shipping_details","starting_balance","statement_descriptor","status","status_transitions","subtotal","subtotal_excluding_tax","test_clock","total","total_discount_amounts","total_excluding_tax","total_pretax_credit_amounts","total_taxes","webhooks_delivered_at"],"title":"Invoice","type":"object","x-expandableFields":["account_tax_ids","application","automatic_tax","confirmation_secret","custom_fields","customer","customer_address","customer_shipping","customer_tax_ids","default_payment_method","default_source","default_tax_rates","discounts","from_invoice","issuer","last_finalization_error","latest_revision","lines","on_behalf_of","parent","payment_settings","payments","rendering","shipping_cost","shipping_details","status_transitions","subscription","test_clock","threshold_reason","total_discount_amounts","total_pretax_credit_amounts","total_taxes"],"x-resourceId":"invoice","x-stripeMostCommon":["auto_advance","automatic_tax","collection_method","confirmation_secret","currency","customer","customer_account","description","hosted_invoice_url","id","lines","metadata","parent","payments","period_end","period_start","status","total"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/invoices/{invoice}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/invoices"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/invoices/{invoice}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/invoices/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/invoices"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/invoices/{invoice}"},{"method_name":"add_lines","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/add_lines"},{"method_name":"attach_payment","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/attach_payment"},{"method_name":"finalize_invoice","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/finalize"},{"method_name":"mark_uncollectible","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/mark_uncollectible"},{"method_name":"pay","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/pay"},{"method_name":"remove_lines","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/remove_lines"},{"method_name":"send_invoice","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/send"},{"method_name":"update_lines","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/update_lines"},{"method_name":"void_invoice","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/{invoice}/void"},{"method_name":"create_preview","method_on":"service","method_type":"custom","operation":"post","path":"/v1/invoices/create_preview"}],"x-stripeResource":{"class_name":"Invoice","has_collection_class":true,"has_search_result_class":true,"in_package":""}},"invoice_installments_card":{"description":"","properties":{"enabled":{"description":"Whether Installments are enabled for this Invoice.","nullable":true,"type":"boolean"}},"required":["enabled"],"title":"invoice_installments_card","type":"object","x-expandableFields":[],"x-stripeMostCommon":["enabled"]},"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":[],"x-stripeMostCommon":["line_item_ids","usage_gte"]},"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":[],"x-stripeMostCommon":["end","start"]},"invoice_mandate_options_card":{"description":"","properties":{"amount":{"description":"Amount to be charged for future payments, specified in the presentment currency.","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"}},"required":["amount","amount_type","description"],"title":"invoice_mandate_options_card","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","description"]},"invoice_mandate_options_payto":{"description":"","properties":{"amount":{"description":"The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit.","nullable":true,"type":"integer"},"amount_type":{"description":"Only `maximum` is supported.","enum":["fixed","maximum"],"nullable":true,"type":"string"},"purpose":{"description":"The purpose for which payments are made. Has a default value based on your merchant category code.","enum":["dependant_support","government","loan","mortgage","other","pension","personal","retail","salary","tax","utility"],"nullable":true,"type":"string"}},"required":["amount","amount_type","purpose"],"title":"invoice_mandate_options_payto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","purpose"]},"invoice_payment":{"description":"Invoice Payments represent payments made against invoices. Invoice Payments can\nbe accessed in two ways:\n1. By expanding the `payments` field on the [Invoice](https://api.stripe.com#invoice) resource.\n2. By using the Invoice Payment retrieve and list endpoints.\n\nInvoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices.\nThis resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and\nmonitor the allocation details of the payments.","properties":{"amount_paid":{"description":"Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.","nullable":true,"type":"integer"},"amount_requested":{"description":"Amount intended to be paid toward this invoice, in cents (or local equivalent)","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).","maxLength":5000,"type":"string"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"invoice":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/invoice"},{"$ref":"#/$defs/deleted_invoice"}],"description":"The invoice that was paid.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/invoice"},{"$ref":"#/$defs/deleted_invoice"}]}},"is_default":{"description":"Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.","type":"boolean"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["invoice_payment"],"type":"string"},"payment":{"$ref":"#/$defs/invoices_payments_invoice_payment_associated_payment"},"status":{"description":"The status of the payment, one of `open`, `paid`, or `canceled`.","maxLength":5000,"type":"string"},"status_transitions":{"$ref":"#/$defs/invoices_payments_invoice_payment_status_transitions"}},"required":["amount_paid","amount_requested","created","currency","id","invoice","is_default","livemode","object","payment","status","status_transitions"],"title":"InvoicesInvoicePayment","type":"object","x-expandableFields":["invoice","payment","status_transitions"],"x-resourceId":"invoice_payment","x-stripeMostCommon":["amount_paid","amount_requested","id","invoice","is_default","payment","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/invoice_payments"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/invoice_payments/{invoice_payment}"}],"x-stripeResource":{"class_name":"InvoicePayment","has_collection_class":true,"in_package":""}},"invoice_payment_method_options_acss_debit":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/invoice_payment_method_options_acss_debit_mandate_options"},"verification_method":{"description":"Bank account verification method. The default value is `automatic`.","enum":["automatic","instant","microdeposits"],"type":"string","x-stripeBypassValidation":true}},"title":"invoice_payment_method_options_acss_debit","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options","verification_method"]},"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"}},"required":["transaction_type"],"title":"invoice_payment_method_options_acss_debit_mandate_options","type":"object","x-expandableFields":[],"x-stripeMostCommon":["transaction_type"]},"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":[],"x-stripeMostCommon":["preferred_language"]},"invoice_payment_method_options_card":{"description":"","properties":{"installments":{"$ref":"#/$defs/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://docs.stripe.com/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://docs.stripe.com/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"}},"required":["request_three_d_secure"],"title":"invoice_payment_method_options_card","type":"object","x-expandableFields":["installments"],"x-stripeMostCommon":["installments","request_three_d_secure"]},"invoice_payment_method_options_customer_balance":{"description":"","properties":{"bank_transfer":{"$ref":"#/$defs/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"}},"required":["funding_type"],"title":"invoice_payment_method_options_customer_balance","type":"object","x-expandableFields":["bank_transfer"],"x-stripeMostCommon":["bank_transfer","funding_type"]},"invoice_payment_method_options_customer_balance_bank_transfer":{"description":"","properties":{"eu_bank_transfer":{"$ref":"#/$defs/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"}},"required":["type"],"title":"invoice_payment_method_options_customer_balance_bank_transfer","type":"object","x-expandableFields":["eu_bank_transfer"],"x-stripeMostCommon":["eu_bank_transfer","type"]},"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: `DE`, `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":[],"x-stripeMostCommon":["country"]},"invoice_payment_method_options_konbini":{"description":"","properties":{},"title":"invoice_payment_method_options_konbini","type":"object","x-expandableFields":[]},"invoice_payment_method_options_payto":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/invoice_mandate_options_payto"}},"title":"invoice_payment_method_options_payto","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options"]},"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":"#/$defs/invoice_payment_method_options_us_bank_account_linked_account_options"},"verification_method":{"description":"Bank account verification method. The default value is `automatic`.","enum":["automatic","instant","microdeposits"],"type":"string","x-stripeBypassValidation":true}},"title":"invoice_payment_method_options_us_bank_account","type":"object","x-expandableFields":["financial_connections"],"x-stripeMostCommon":["financial_connections","verification_method"]},"invoice_payment_method_options_us_bank_account_linked_account_options":{"description":"","properties":{"filters":{"$ref":"#/$defs/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"}},"required":["prefetch"],"title":"invoice_payment_method_options_us_bank_account_linked_account_options","type":"object","x-expandableFields":["filters"],"x-stripeMostCommon":["filters","permissions","prefetch"]},"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":[],"x-stripeMostCommon":["account_subcategories"]},"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"}},"required":["page_size"],"title":"InvoiceRenderingPdf","type":"object","x-expandableFields":[],"x-stripeMostCommon":["page_size"]},"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":[],"x-stripeMostCommon":["name","value"]},"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"}},"required":["amount_tax_display","template"],"title":"InvoiceSettingCustomerRenderingOptions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount_tax_display","template"]},"invoice_setting_customer_setting":{"description":"","properties":{"custom_fields":{"description":"Default custom fields to be displayed on invoices for this customer.","items":{"$ref":"#/$defs/invoice_setting_custom_field"},"nullable":true,"type":"array"},"default_payment_method":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/payment_method"}]}},"footer":{"description":"Default footer to be displayed on invoices for this customer.","maxLength":5000,"nullable":true,"type":"string"},"rendering_options":{"anyOf":[{"$ref":"#/$defs/invoice_setting_customer_rendering_options"}],"description":"Default options for invoice PDF rendering for this customer.","nullable":true}},"required":["custom_fields","default_payment_method","footer","rendering_options"],"title":"InvoiceSettingCustomerSetting","type":"object","x-expandableFields":["custom_fields","default_payment_method","rendering_options"],"x-stripeMostCommon":["custom_fields","default_payment_method","footer","rendering_options"]},"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":"#/$defs/tax_id"},{"$ref":"#/$defs/deleted_tax_id"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_id"},{"$ref":"#/$defs/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":"#/$defs/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}},"required":["account_tax_ids","days_until_due","issuer"],"title":"InvoiceSettingSubscriptionSchedulePhaseSetting","type":"object","x-expandableFields":["account_tax_ids","issuer"],"x-stripeMostCommon":["account_tax_ids","days_until_due","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":"#/$defs/tax_id"},{"$ref":"#/$defs/deleted_tax_id"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_id"},{"$ref":"#/$defs/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":"#/$defs/connect_account_reference"}},"required":["account_tax_ids","days_until_due","issuer"],"title":"InvoiceSettingSubscriptionScheduleSetting","type":"object","x-expandableFields":["account_tax_ids","issuer"],"x-stripeMostCommon":["account_tax_ids","days_until_due","issuer"]},"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":"#/$defs/invoice_item_threshold_reason"},"type":"array"}},"required":["amount_gte","item_reasons"],"title":"InvoiceThresholdReason","type":"object","x-expandableFields":["item_reasons"],"x-stripeMostCommon":["amount_gte","item_reasons"]},"invoices_payment_method_options":{"description":"","properties":{"acss_debit":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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},"payto":{"anyOf":[{"$ref":"#/$defs/invoice_payment_method_options_payto"}],"description":"If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent.","nullable":true},"sepa_debit":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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}},"required":["acss_debit","bancontact","card","customer_balance","konbini","payto","sepa_debit","us_bank_account"],"title":"InvoicesPaymentMethodOptions","type":"object","x-expandableFields":["acss_debit","bancontact","card","customer_balance","konbini","payto","sepa_debit","us_bank_account"],"x-stripeMostCommon":["acss_debit","bancontact","card","customer_balance","konbini","payto","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":"#/$defs/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","affirm","amazon_pay","au_becs_debit","bacs_debit","bancontact","boleto","card","cashapp","crypto","custom","customer_balance","eps","fpx","giropay","grabpay","ideal","jp_credit_transfer","kakao_pay","klarna","konbini","kr_card","link","multibanco","naver_pay","nz_bank_account","p24","pay_by_bank","payco","paynow","paypal","payto","promptpay","revolut_pay","sepa_credit_transfer","sepa_debit","sofort","swish","us_bank_account","wechat_pay"],"type":"string","x-stripeBypassValidation":true},"nullable":true,"type":"array"}},"required":["default_mandate","payment_method_options","payment_method_types"],"title":"InvoicesPaymentSettings","type":"object","x-expandableFields":["payment_method_options"],"x-stripeMostCommon":["default_mandate","payment_method_options","payment_method_types"]},"invoices_payments_invoice_payment_associated_payment":{"description":"","properties":{"charge":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/charge"}],"description":"ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/charge"}]}},"payment_intent":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_intent"}],"description":"ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_intent"}]}},"payment_record":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_record"}],"description":"ID of the PaymentRecord associated with this payment when `type` is `payment_record`.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_record"}]}},"type":{"description":"Type of payment object associated with this invoice payment.","enum":["charge","payment_intent","payment_record"],"type":"string"}},"required":["type"],"title":"InvoicesPaymentsInvoicePaymentAssociatedPayment","type":"object","x-expandableFields":["charge","payment_intent","payment_record"],"x-stripeMostCommon":["payment_intent","payment_record","type"]},"invoices_payments_invoice_payment_status_transitions":{"description":"","properties":{"canceled_at":{"description":"The time that the payment was canceled.","format":"unix-time","nullable":true,"type":"integer"},"paid_at":{"description":"The time that the payment succeeded.","format":"unix-time","nullable":true,"type":"integer"}},"required":["canceled_at","paid_at"],"title":"InvoicesPaymentsInvoicePaymentStatusTransitions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["canceled_at","paid_at"]},"invoices_resource_confirmation_secret":{"description":"","properties":{"client_secret":{"description":"The client_secret of the payment that Stripe creates for the invoice after finalization.","maxLength":5000,"type":"string"},"type":{"description":"The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization","maxLength":5000,"type":"string"}},"required":["client_secret","type"],"title":"InvoicesResourceConfirmationSecret","type":"object","x-expandableFields":[],"x-stripeMostCommon":["client_secret","type"]},"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":"#/$defs/invoice"}],"description":"The invoice that was cloned.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/invoice"}]}}},"required":["action","invoice"],"title":"InvoicesResourceFromInvoice","type":"object","x-expandableFields":["invoice"],"x-stripeMostCommon":["action","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":"#/$defs/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"}},"required":["amount_tax_display","pdf","template","template_version"],"title":"InvoicesResourceInvoiceRendering","type":"object","x-expandableFields":["pdf"],"x-stripeMostCommon":["amount_tax_display","pdf","template","template_version"]},"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`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`","enum":["ad_nrt","ae_trn","al_tin","am_tin","ao_tin","ar_cuit","au_abn","au_arn","aw_tin","az_tin","ba_tin","bb_tin","bd_bin","bf_ifu","bg_uic","bh_vat","bj_ifu","bo_tin","br_cnpj","br_cpf","bs_tin","by_tin","ca_bn","ca_gst_hst","ca_pst_bc","ca_pst_mb","ca_pst_sk","ca_qst","cd_nif","ch_uid","ch_vat","cl_tin","cm_niu","cn_tin","co_nit","cr_tin","cv_nif","de_stn","do_rcn","ec_ruc","eg_tin","es_cif","et_tin","eu_oss_vat","eu_vat","gb_vat","ge_vat","gn_nif","hk_br","hr_oib","hu_tin","id_npwp","il_vat","in_gst","is_vat","jp_cn","jp_rn","jp_trn","ke_pin","kg_tin","kh_tin","kr_brn","kz_bin","la_tin","li_uid","li_vat","lk_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","pl_nip","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","value"],"title":"InvoicesResourceInvoiceTaxID","type":"object","x-expandableFields":[],"x-stripeMostCommon":["type","value"]},"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":"#/$defs/billing.credit_balance_transaction"}],"description":"The credit balance transaction that was applied to get this pretax credit amount.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/billing.credit_balance_transaction"}]}},"discount":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/discount"},{"$ref":"#/$defs/deleted_discount"}],"description":"The discount that was applied to get this pretax credit amount.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/discount"},{"$ref":"#/$defs/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"],"x-stripeMostCommon":["amount","credit_balance_transaction","discount","type"]},"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":"#/$defs/shipping_rate"}],"description":"The ID of the ShippingRate for this invoice.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/shipping_rate"}]}},"taxes":{"description":"The taxes applied to the shipping rate.","items":{"$ref":"#/$defs/line_items_tax_amount"},"type":"array"}},"required":["amount_subtotal","amount_tax","amount_total","shipping_rate"],"title":"InvoicesResourceShippingCost","type":"object","x-expandableFields":["shipping_rate","taxes"],"x-stripeMostCommon":["amount_subtotal","amount_tax","amount_total","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"}},"required":["finalized_at","marked_uncollectible_at","paid_at","voided_at"],"title":"InvoicesResourceStatusTransitions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["finalized_at","marked_uncollectible_at","paid_at","voided_at"]},"issuing.authorization":{"description":"When an [issued card](https://docs.stripe.com/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://docs.stripe.com/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued card authorizations](https://docs.stripe.com/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":"#/$defs/issuing_authorization_amount_details"}],"description":"Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/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":"#/$defs/balance_transaction"},"type":"array"},"card":{"$ref":"#/$defs/issuing.card"},"cardholder":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.cardholder"}],"description":"The cardholder to whom this authorization belongs.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/issuing_authorization_fraud_challenge"},"nullable":true,"type":"array"},"fuel":{"anyOf":[{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/issuing_authorization_merchant_data"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/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":"#/$defs/issuing_authorization_request"},"type":"array"},"status":{"description":"The current status of the authorization in its lifecycle.","enum":["closed","expired","pending","reversed"],"type":"string"},"token":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.token"}],"description":"[Token](https://docs.stripe.com/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":"#/$defs/issuing.token"}]}},"transactions":{"description":"List of [transactions](https://docs.stripe.com/api/issuing/transactions) associated with this authorization.","items":{"$ref":"#/$defs/issuing.transaction"},"type":"array"},"treasury":{"anyOf":[{"$ref":"#/$defs/issuing_authorization_treasury"}],"description":"[Treasury](https://docs.stripe.com/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://docs.stripe.com/api/treasury/financial_accounts).","nullable":true},"verification_data":{"$ref":"#/$defs/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","amount_details","approved","authorization_method","balance_transactions","card","cardholder","created","currency","fleet","fuel","id","livemode","merchant_amount","merchant_currency","merchant_data","metadata","network_data","object","pending_request","request_history","status","transactions","verification_data","verified_by_fraud_challenge","wallet"],"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","x-stripeMostCommon":["amount","approved","card","cardholder","currency","id","metadata","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/authorizations"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/authorizations/{authorization}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/authorizations/{authorization}"},{"method_name":"approve","method_on":"service","method_type":"custom","operation":"post","path":"/v1/issuing/authorizations/{authorization}/approve"},{"method_name":"decline","method_on":"service","method_type":"custom","operation":"post","path":"/v1/issuing/authorizations/{authorization}/decline"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/test_helpers/issuing/authorizations"},{"method_name":"capture","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/authorizations/{authorization}/capture"},{"method_name":"expire","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/authorizations/{authorization}/expire"},{"method_name":"finalize_amount","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount"},{"method_name":"respond","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond"},{"method_name":"increment","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/authorizations/{authorization}/increment"},{"method_name":"reverse","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/authorizations/{authorization}/reverse"}],"x-stripeResource":{"class_name":"Authorization","has_collection_class":true,"in_package":"Issuing","polymorphic_groups":["balance_transaction_source"]}},"issuing.card":{"description":"You can [create physical or virtual cards](https://docs.stripe.com/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":"#/$defs/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://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://docs.stripe.com/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"},"latest_fraud_warning":{"anyOf":[{"$ref":"#/$defs/issuing_card_fraud_warning"}],"description":"Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.","nullable":true},"lifecycle_controls":{"anyOf":[{"$ref":"#/$defs/issuing_card_lifecycle_controls"}],"description":"Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our [documentation](/issuing/controls/lifecycle-controls) for more details.","nullable":true},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://docs.stripe.com/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":"#/$defs/issuing.personalization_design"}],"description":"The personalization design object belonging to this card.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.personalization_design"}]}},"replaced_by":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.card"}],"description":"The latest card that replaces this card, if any.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.card"}]}},"replacement_for":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.card"}],"description":"The card this card replaces, if any.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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},"second_line":{"description":"Text separate from cardholder name, printed on the card.","maxLength":5000,"nullable":true,"type":"string"},"shipping":{"anyOf":[{"$ref":"#/$defs/issuing_card_shipping"}],"description":"Where and how the card will be shipped.","nullable":true},"spending_controls":{"$ref":"#/$defs/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":"#/$defs/issuing_card_wallets"}],"description":"Information relating to digital wallets (like Apple Pay and Google Pay).","nullable":true}},"required":["brand","cancellation_reason","cardholder","created","currency","exp_month","exp_year","id","last4","latest_fraud_warning","lifecycle_controls","livemode","metadata","object","personalization_design","replaced_by","replacement_for","replacement_reason","second_line","shipping","spending_controls","status","type","wallets"],"title":"IssuingCard","type":"object","x-expandableFields":["cardholder","latest_fraud_warning","lifecycle_controls","personalization_design","replaced_by","replacement_for","shipping","spending_controls","wallets"],"x-resourceId":"issuing.card","x-stripeMostCommon":["cancellation_reason","cardholder","currency","exp_month","exp_year","id","last4","metadata","status","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/cards"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/cards/{card}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/issuing/cards"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/cards/{card}"},{"method_name":"deliver_card","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"},{"method_name":"fail_card","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/cards/{card}/shipping/fail"},{"method_name":"return_card","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/cards/{card}/shipping/return"},{"method_name":"ship_card","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/cards/{card}/shipping/ship"},{"method_name":"submit_card","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/cards/{card}/shipping/submit"}],"x-stripeResource":{"class_name":"Card","has_collection_class":true,"in_package":"Issuing"}},"issuing.cardholder":{"description":"An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://docs.stripe.com/issuing) cards.\n\nRelated guide: [How to create a cardholder](https://docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder)","properties":{"billing":{"$ref":"#/$defs/issuing_cardholder_address"},"company":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/issuing_cardholder_individual"}],"description":"Additional information about an `individual` cardholder.","nullable":true},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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://docs.stripe.com/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 `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`.\n This changes the language of the [3D Secure flow](https://docs.stripe.com/issuing/3d-secure) and one-time password messages sent to the cardholder.","items":{"enum":["de","en","es","fr","it"],"type":"string","x-stripeBypassValidation":true},"nullable":true,"type":"array"},"requirements":{"$ref":"#/$defs/issuing_cardholder_requirements"},"spending_controls":{"anyOf":[{"$ref":"#/$defs/issuing_cardholder_authorization_controls"}],"description":"Rules that control spending across this cardholder's cards. Refer to our [documentation](https://docs.stripe.com/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://docs.stripe.com/issuing/other/choose-cardholder) for more details.","enum":["company","individual"],"type":"string","x-stripeBypassValidation":true}},"required":["billing","company","created","email","id","individual","livemode","metadata","name","object","phone_number","preferred_locales","requirements","spending_controls","status","type"],"title":"IssuingCardholder","type":"object","x-expandableFields":["billing","company","individual","requirements","spending_controls"],"x-resourceId":"issuing.cardholder","x-stripeMostCommon":["billing","email","id","metadata","name","phone_number"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/cardholders"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/cardholders/{cardholder}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/issuing/cardholders"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/cardholders/{cardholder}"}],"x-stripeResource":{"class_name":"Cardholder","has_collection_class":true,"in_package":"Issuing"}},"issuing.dispute":{"description":"As a [card issuer](https://docs.stripe.com/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://docs.stripe.com/issuing/purchases/disputes)","properties":{"amount":{"description":"Disputed amount in the card's currency and in the [smallest currency unit](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/issuing_dispute_evidence"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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://docs.stripe.com/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":"#/$defs/issuing.transaction"}],"description":"The transaction being disputed.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.transaction"}]}},"treasury":{"anyOf":[{"$ref":"#/$defs/issuing_dispute_treasury"}],"description":"[Treasury](https://docs.stripe.com/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","x-stripeMostCommon":["amount","balance_transactions","currency","evidence","id","metadata","status","transaction"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/disputes"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/disputes/{dispute}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/issuing/disputes"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/disputes/{dispute}"},{"method_name":"submit","method_on":"service","method_type":"custom","operation":"post","path":"/v1/issuing/disputes/{dispute}/submit"}],"x-stripeResource":{"class_name":"Dispute","has_collection_class":true,"in_package":"Issuing","polymorphic_groups":["balance_transaction_source"]}},"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":"#/$defs/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":"#/$defs/file"}]}},"carrier_text":{"anyOf":[{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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://docs.stripe.com/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":"#/$defs/issuing.physical_bundle"}],"description":"The physical bundle object belonging to this personalization design.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.physical_bundle"}]}},"preferences":{"$ref":"#/$defs/issuing_personalization_design_preferences"},"rejection_reasons":{"$ref":"#/$defs/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":["card_logo","carrier_text","created","id","livemode","lookup_key","metadata","name","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","x-stripeMostCommon":["card_logo","carrier_text","created","id","livemode","lookup_key","metadata","name","object","physical_bundle","preferences","rejection_reasons","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/personalization_designs"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/personalization_designs/{personalization_design}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/issuing/personalization_designs"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/personalization_designs/{personalization_design}"},{"method_name":"activate","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"},{"method_name":"deactivate","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"},{"method_name":"reject","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"}],"x-stripeResource":{"class_name":"PersonalizationDesign","has_collection_class":true,"in_package":"Issuing"}},"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":"#/$defs/issuing_physical_bundle_features"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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","x-stripeMostCommon":["features","id","livemode","name","object","status","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/physical_bundles"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/physical_bundles/{physical_bundle}"}],"x-stripeResource":{"class_name":"PhysicalBundle","has_collection_class":true,"in_package":"Issuing"}},"issuing.token":{"description":"An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://docs.stripe.com/issuing), you can [view and manage these tokens](https://docs.stripe.com/issuing/controls/token-management) through Stripe.","properties":{"card":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.card"}],"description":"Card associated with this token.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"network":{"description":"The token service provider / card network associated with the token.","enum":["mastercard","visa"],"type":"string"},"network_data":{"$ref":"#/$defs/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","device_fingerprint","id","livemode","network","network_updated_at","object","status"],"title":"IssuingNetworkToken","type":"object","x-expandableFields":["card","network_data"],"x-resourceId":"issuing.token","x-stripeMostCommon":["card","created","device_fingerprint","id","last4","livemode","network","network_data","network_updated_at","object","status","wallet_provider"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/tokens"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/tokens/{token}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/tokens/{token}"}],"x-stripeResource":{"class_name":"Token","has_collection_class":true,"in_package":"Issuing"}},"issuing.transaction":{"description":"Any use of an [issued card](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/currencies#zero-decimal).","type":"integer"},"amount_details":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_amount_details"}],"description":"Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).","nullable":true},"authorization":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.authorization"}],"description":"The `Authorization` object that led to this transaction.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.authorization"}]}},"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/balance_transaction"}],"description":"ID of the [balance transaction](https://docs.stripe.com/api/balance_transactions) associated with this transaction.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/balance_transaction"}]}},"card":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.card"}],"description":"The card used to make this transaction.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.card"}]}},"cardholder":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.cardholder"}],"description":"The cardholder to whom this transaction belongs.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/issuing.dispute"}],"description":"If you've disputed the transaction, the ID of the dispute.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/issuing.dispute"}]}},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"merchant_amount":{"description":"The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://docs.stripe.com/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":"#/$defs/issuing_authorization_merchant_data"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/issuing_transaction_purchase_details"}],"description":"Additional purchase information that is optionally provided by the merchant.","nullable":true},"token":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/issuing.token"}],"description":"[Token](https://docs.stripe.com/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":"#/$defs/issuing.token"}]}},"treasury":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_treasury"}],"description":"[Treasury](https://docs.stripe.com/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","amount_details","authorization","balance_transaction","card","cardholder","created","currency","dispute","id","livemode","merchant_amount","merchant_currency","merchant_data","metadata","network_data","object","type","wallet"],"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","x-stripeMostCommon":["amount","authorization","card","cardholder","currency","id","metadata","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/issuing/transactions"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/issuing/transactions/{transaction}"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/issuing/transactions/{transaction}"},{"method_name":"refund","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/transactions/{transaction}/refund"},{"method_name":"create_force_capture","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/transactions/create_force_capture"},{"method_name":"create_unlinked_refund","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/issuing/transactions/create_unlinked_refund"}],"x-stripeResource":{"class_name":"Transaction","has_collection_class":true,"in_package":"Issuing","polymorphic_groups":["balance_transaction_source"]}},"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"}},"required":["atm_fee","cashback_amount"],"title":"IssuingAuthorizationAmountDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["atm_fee","cashback_amount"]},"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":[],"x-stripeMostCommon":["claimed_by","type"]},"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"}},"required":["alphanumeric_id","driver_id","odometer","unspecified_id","user_id","vehicle_number"],"title":"IssuingAuthorizationFleetCardholderPromptData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["alphanumeric_id","driver_id","odometer","unspecified_id","user_id","vehicle_number"]},"issuing_authorization_fleet_data":{"description":"","properties":{"cardholder_prompt_data":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["cardholder_prompt_data","purchase_type","reported_breakdown","service_type"],"title":"IssuingAuthorizationFleetData","type":"object","x-expandableFields":["cardholder_prompt_data","reported_breakdown"],"x-stripeMostCommon":["cardholder_prompt_data","purchase_type","reported_breakdown","service_type"]},"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"}},"required":["gross_amount_decimal"],"title":"IssuingAuthorizationFleetFuelPriceData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["gross_amount_decimal"]},"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"}},"required":["gross_amount_decimal"],"title":"IssuingAuthorizationFleetNonFuelPriceData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["gross_amount_decimal"]},"issuing_authorization_fleet_reported_breakdown":{"description":"","properties":{"fuel":{"anyOf":[{"$ref":"#/$defs/issuing_authorization_fleet_fuel_price_data"}],"description":"Breakdown of fuel portion of the purchase.","nullable":true},"non_fuel":{"anyOf":[{"$ref":"#/$defs/issuing_authorization_fleet_non_fuel_price_data"}],"description":"Breakdown of non-fuel portion of the purchase.","nullable":true},"tax":{"anyOf":[{"$ref":"#/$defs/issuing_authorization_fleet_tax_data"}],"description":"Information about tax included in this transaction.","nullable":true}},"required":["fuel","non_fuel","tax"],"title":"IssuingAuthorizationFleetReportedBreakdown","type":"object","x-expandableFields":["fuel","non_fuel","tax"],"x-stripeMostCommon":["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"}},"required":["local_amount_decimal","national_amount_decimal"],"title":"IssuingAuthorizationFleetTaxData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["local_amount_decimal","national_amount_decimal"]},"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","undeliverable_reason"],"title":"IssuingAuthorizationFraudChallenge","type":"object","x-expandableFields":[],"x-stripeMostCommon":["channel","status","undeliverable_reason"]},"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"}},"required":["industry_product_code","quantity_decimal","type","unit","unit_cost_decimal"],"title":"IssuingAuthorizationFuelData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["industry_product_code","quantity_decimal","type","unit","unit_cost_decimal"]},"issuing_authorization_merchant_data":{"description":"","properties":{"category":{"description":"A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/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","city","country","name","network_id","postal_code","state","tax_id","terminal_id","url"],"title":"IssuingAuthorizationMerchantData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["category","category_code","city","country","name","network_id","postal_code","state","tax_id","terminal_id","url"]},"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"}},"required":["acquiring_institution_id","system_trace_audit_number","transaction_id"],"title":"IssuingAuthorizationNetworkData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["acquiring_institution_id","system_trace_audit_number","transaction_id"]},"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://docs.stripe.com/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).","type":"integer"},"amount_details":{"anyOf":[{"$ref":"#/$defs/issuing_authorization_amount_details"}],"description":"Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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","amount_details","currency","is_amount_controllable","merchant_amount","merchant_currency","network_risk_score"],"title":"IssuingAuthorizationPendingRequest","type":"object","x-expandableFields":["amount_details"],"x-stripeMostCommon":["amount","amount_details","currency","is_amount_controllable","merchant_amount","merchant_currency","network_risk_score"]},"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://docs.stripe.com/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":"#/$defs/issuing_authorization_amount_details"}],"description":"Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/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://docs.stripe.com/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","network_fallback","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","amount_details","approved","authorization_code","created","currency","merchant_amount","merchant_currency","network_risk_score","reason","reason_message","requested_at"],"title":"IssuingAuthorizationRequest","type":"object","x-expandableFields":["amount_details"],"x-stripeMostCommon":["amount","amount_details","approved","authorization_code","created","currency","merchant_amount","merchant_currency","network_risk_score","reason","reason_message","requested_at"]},"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":[],"x-stripeMostCommon":["result"]},"issuing_authorization_treasury":{"description":"","properties":{"received_credits":{"description":"The array of [ReceivedCredits](https://docs.stripe.com/api/treasury/received_credits) associated with this authorization","items":{"maxLength":5000,"type":"string"},"type":"array"},"received_debits":{"description":"The array of [ReceivedDebits](https://docs.stripe.com/api/treasury/received_debits) associated with this authorization","items":{"maxLength":5000,"type":"string"},"type":"array"},"transaction":{"description":"The Treasury [Transaction](https://docs.stripe.com/api/treasury/transactions) associated with this authorization","maxLength":5000,"nullable":true,"type":"string"}},"required":["received_credits","received_debits","transaction"],"title":"IssuingAuthorizationTreasury","type":"object","x-expandableFields":[],"x-stripeMostCommon":["received_credits","received_debits","transaction"]},"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":"#/$defs/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":"#/$defs/issuing_authorization_three_d_secure"}],"description":"3D Secure details.","nullable":true}},"required":["address_line1_check","address_postal_code_check","authentication_exemption","cvc_check","expiry_check","postal_code","three_d_secure"],"title":"IssuingAuthorizationVerificationData","type":"object","x-expandableFields":["authentication_exemption","three_d_secure"],"x-stripeMostCommon":["address_line1_check","address_postal_code_check","authentication_exemption","cvc_check","expiry_check","postal_code","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","ineligible_reason"],"title":"IssuingCardApplePay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["eligible","ineligible_reason"]},"issuing_card_authorization_controls":{"description":"","properties":{"allowed_categories":{"description":"Array of strings containing [categories](https://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/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"}},"required":["allowed_categories","allowed_merchant_countries","blocked_categories","blocked_merchant_countries","spending_limits","spending_limits_currency"],"title":"IssuingCardAuthorizationControls","type":"object","x-expandableFields":["spending_limits"],"x-stripeMostCommon":["allowed_categories","allowed_merchant_countries","blocked_categories","blocked_merchant_countries","spending_limits","spending_limits_currency"]},"issuing_card_fraud_warning":{"description":"","properties":{"started_at":{"description":"Timestamp of the most recent fraud warning.","format":"unix-time","nullable":true,"type":"integer"},"type":{"description":"The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card.","enum":["card_testing_exposure","fraud_dispute_filed","third_party_reported","user_indicated_fraud"],"nullable":true,"type":"string"}},"required":["started_at","type"],"title":"IssuingCardFraudWarning","type":"object","x-expandableFields":[],"x-stripeMostCommon":["started_at","type"]},"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","ineligible_reason"],"title":"IssuingCardGooglePay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["eligible","ineligible_reason"]},"issuing_card_lifecycle_conditions":{"description":"","properties":{"payment_count":{"description":"The card is automatically cancelled when it makes this number of non-zero payment authorizations and transactions. The count includes penny authorizations, but doesn't include non-payment actions, such as authorization advice.","type":"integer"}},"required":["payment_count"],"title":"IssuingCardLifecycleConditions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["payment_count"]},"issuing_card_lifecycle_controls":{"description":"","properties":{"cancel_after":{"$ref":"#/$defs/issuing_card_lifecycle_conditions"}},"required":["cancel_after"],"title":"IssuingCardLifecycleControls","type":"object","x-expandableFields":["cancel_after"],"x-stripeMostCommon":["cancel_after"]},"issuing_card_shipping":{"description":"","properties":{"address":{"$ref":"#/$defs/address"},"address_validation":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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","address_validation","carrier","customs","eta","name","phone_number","require_signature","service","status","tracking_number","tracking_url","type"],"title":"IssuingCardShipping","type":"object","x-expandableFields":["address","address_validation","customs"],"x-stripeMostCommon":["address","address_validation","carrier","customs","eta","name","phone_number","require_signature","service","status","tracking_number","tracking_url","type"]},"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":"#/$defs/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","normalized_address","result"],"title":"IssuingCardShippingAddressValidation","type":"object","x-expandableFields":["normalized_address"],"x-stripeMostCommon":["mode","normalized_address","result"]},"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"}},"required":["eori_number"],"title":"IssuingCardShippingCustoms","type":"object","x-expandableFields":[],"x-stripeMostCommon":["eori_number"]},"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://docs.stripe.com/currencies#zero-decimal).","type":"integer"},"categories":{"description":"Array of strings containing [categories](https://docs.stripe.com/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","categories","interval"],"title":"IssuingCardSpendingLimit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","categories","interval"]},"issuing_card_wallets":{"description":"","properties":{"apple_pay":{"$ref":"#/$defs/issuing_card_apple_pay"},"google_pay":{"$ref":"#/$defs/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","primary_account_identifier"],"title":"IssuingCardWallets","type":"object","x-expandableFields":["apple_pay","google_pay"],"x-stripeMostCommon":["apple_pay","google_pay","primary_account_identifier"]},"issuing_cardholder_address":{"description":"","properties":{"address":{"$ref":"#/$defs/address"}},"required":["address"],"title":"IssuingCardholderAddress","type":"object","x-expandableFields":["address"],"x-stripeMostCommon":["address"]},"issuing_cardholder_authorization_controls":{"description":"","properties":{"allowed_categories":{"description":"Array of strings containing [categories](https://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/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"}},"required":["allowed_categories","allowed_merchant_countries","blocked_categories","blocked_merchant_countries","spending_limits","spending_limits_currency"],"title":"IssuingCardholderAuthorizationControls","type":"object","x-expandableFields":["spending_limits"],"x-stripeMostCommon":["allowed_categories","allowed_merchant_countries","blocked_categories","blocked_merchant_countries","spending_limits","spending_limits_currency"]},"issuing_cardholder_card_issuing":{"description":"","properties":{"user_terms_acceptance":{"anyOf":[{"$ref":"#/$defs/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}},"required":["user_terms_acceptance"],"title":"IssuingCardholderCardIssuing","type":"object","x-expandableFields":["user_terms_acceptance"],"x-stripeMostCommon":["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":[],"x-stripeMostCommon":["tax_id_provided"]},"issuing_cardholder_id_document":{"description":"","properties":{"back":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/file"}],"description":"The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/file"}]}},"front":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/file"}],"description":"The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/file"}]}}},"required":["back","front"],"title":"IssuingCardholderIdDocument","type":"object","x-expandableFields":["back","front"],"x-stripeMostCommon":["back","front"]},"issuing_cardholder_individual":{"description":"","properties":{"card_issuing":{"anyOf":[{"$ref":"#/$defs/issuing_cardholder_card_issuing"}],"description":"Information related to the card_issuing program for this cardholder.","nullable":true},"dob":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/issuing_cardholder_verification"}],"description":"Government-issued ID document for this cardholder.","nullable":true}},"required":["dob","first_name","last_name","verification"],"title":"IssuingCardholderIndividual","type":"object","x-expandableFields":["card_issuing","dob","verification"],"x-stripeMostCommon":["card_issuing","dob","first_name","last_name","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"}},"required":["day","month","year"],"title":"IssuingCardholderIndividualDOB","type":"object","x-expandableFields":[],"x-stripeMostCommon":["day","month","year"]},"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"}},"required":["disabled_reason","past_due"],"title":"IssuingCardholderRequirements","type":"object","x-expandableFields":[],"x-stripeMostCommon":["disabled_reason","past_due"]},"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://docs.stripe.com/currencies#zero-decimal).","type":"integer"},"categories":{"description":"Array of strings containing [categories](https://docs.stripe.com/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","categories","interval"],"title":"IssuingCardholderSpendingLimit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","categories","interval"]},"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"}},"required":["date","ip","user_agent"],"title":"IssuingCardholderUserTermsAcceptance","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"issuing_cardholder_verification":{"description":"","properties":{"document":{"anyOf":[{"$ref":"#/$defs/issuing_cardholder_id_document"}],"description":"An identifying document, either a passport or local ID card.","nullable":true}},"required":["document"],"title":"IssuingCardholderVerification","type":"object","x-expandableFields":["document"],"x-stripeMostCommon":["document"]},"issuing_dispute_canceled_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["additional_documentation","canceled_at","cancellation_policy_provided","cancellation_reason","expected_at","explanation","product_description","product_type","return_status","returned_at"],"title":"IssuingDisputeCanceledEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","canceled_at","cancellation_policy_provided","cancellation_reason","expected_at","explanation","product_description","product_type","return_status","returned_at"]},"issuing_dispute_duplicate_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/file"}]}},"card_statement":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/file"}]}},"cash_receipt":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/file"}]}},"check_image":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["additional_documentation","card_statement","cash_receipt","check_image","explanation","original_transaction"],"title":"IssuingDisputeDuplicateEvidence","type":"object","x-expandableFields":["additional_documentation","card_statement","cash_receipt","check_image"],"x-stripeMostCommon":["additional_documentation","card_statement","cash_receipt","check_image","explanation","original_transaction"]},"issuing_dispute_evidence":{"description":"","properties":{"canceled":{"$ref":"#/$defs/issuing_dispute_canceled_evidence"},"duplicate":{"$ref":"#/$defs/issuing_dispute_duplicate_evidence"},"fraudulent":{"$ref":"#/$defs/issuing_dispute_fraudulent_evidence"},"merchandise_not_as_described":{"$ref":"#/$defs/issuing_dispute_merchandise_not_as_described_evidence"},"no_valid_authorization":{"$ref":"#/$defs/issuing_dispute_no_valid_authorization_evidence"},"not_received":{"$ref":"#/$defs/issuing_dispute_not_received_evidence"},"other":{"$ref":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["canceled","duplicate","fraudulent","merchandise_not_as_described","no_valid_authorization","not_received","other","reason","service_not_as_described"]},"issuing_dispute_fraudulent_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/file"}]}},"explanation":{"description":"Explanation of why the cardholder is disputing this transaction.","maxLength":5000,"nullable":true,"type":"string"}},"required":["additional_documentation","explanation"],"title":"IssuingDisputeFraudulentEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","explanation"]},"issuing_dispute_merchandise_not_as_described_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["additional_documentation","explanation","received_at","return_description","return_status","returned_at"],"title":"IssuingDisputeMerchandiseNotAsDescribedEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","explanation","received_at","return_description","return_status","returned_at"]},"issuing_dispute_no_valid_authorization_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/file"}]}},"explanation":{"description":"Explanation of why the cardholder is disputing this transaction.","maxLength":5000,"nullable":true,"type":"string"}},"required":["additional_documentation","explanation"],"title":"IssuingDisputeNoValidAuthorizationEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","explanation"]},"issuing_dispute_not_received_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["additional_documentation","expected_at","explanation","product_description","product_type"],"title":"IssuingDisputeNotReceivedEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","expected_at","explanation","product_description","product_type"]},"issuing_dispute_other_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["additional_documentation","explanation","product_description","product_type"],"title":"IssuingDisputeOtherEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","explanation","product_description","product_type"]},"issuing_dispute_service_not_as_described_evidence":{"description":"","properties":{"additional_documentation":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["additional_documentation","canceled_at","cancellation_reason","explanation","received_at"],"title":"IssuingDisputeServiceNotAsDescribedEvidence","type":"object","x-expandableFields":["additional_documentation"],"x-stripeMostCommon":["additional_documentation","canceled_at","cancellation_reason","explanation","received_at"]},"issuing_dispute_treasury":{"description":"","properties":{"debit_reversal":{"description":"The Treasury [DebitReversal](https://docs.stripe.com/api/treasury/debit_reversals) representing this Issuing dispute","maxLength":5000,"nullable":true,"type":"string"},"received_debit":{"description":"The Treasury [ReceivedDebit](https://docs.stripe.com/api/treasury/received_debits) that is being disputed.","maxLength":5000,"type":"string"}},"required":["debit_reversal","received_debit"],"title":"IssuingDisputeTreasury","type":"object","x-expandableFields":[],"x-stripeMostCommon":["debit_reversal","received_debit"]},"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":[],"x-stripeMostCommon":["line1","postal_code"]},"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":[],"x-stripeMostCommon":["device_fingerprint","ip_address","location","name","phone_number","type"]},"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":[],"x-stripeMostCommon":["card_reference_id","token_reference_id","token_requestor_id","token_requestor_name"]},"issuing_network_token_network_data":{"description":"","properties":{"device":{"$ref":"#/$defs/issuing_network_token_device"},"mastercard":{"$ref":"#/$defs/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":"#/$defs/issuing_network_token_visa"},"wallet_provider":{"$ref":"#/$defs/issuing_network_token_wallet_provider"}},"required":["type"],"title":"IssuingNetworkTokenNetworkData","type":"object","x-expandableFields":["device","mastercard","visa","wallet_provider"],"x-stripeMostCommon":["device","mastercard","type","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,"nullable":true,"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":[],"x-stripeMostCommon":["card_reference_id","token_reference_id","token_requestor_id","token_risk_score"]},"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":"#/$defs/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"],"x-stripeMostCommon":["account_id","account_trust_score","card_number_source","cardholder_address","cardholder_name","device_trust_score","hashed_account_email_address","reason_codes","suggested_decision","suggested_decision_version"]},"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"}},"required":["footer_body","footer_title","header_body","header_title"],"title":"IssuingPersonalizationDesignCarrierText","type":"object","x-expandableFields":[],"x-stripeMostCommon":["footer_body","footer_title","header_body","header_title"]},"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","is_platform_default"],"title":"IssuingPersonalizationDesignPreferences","type":"object","x-expandableFields":[],"x-stripeMostCommon":["is_default","is_platform_default"]},"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"}},"required":["card_logo","carrier_text"],"title":"IssuingPersonalizationDesignRejectionReasons","type":"object","x-expandableFields":[],"x-stripeMostCommon":["card_logo","carrier_text"]},"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":[],"x-stripeMostCommon":["card_logo","carrier_text","second_line"]},"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"}},"required":["atm_fee","cashback_amount"],"title":"IssuingTransactionAmountDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["atm_fee","cashback_amount"]},"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"}},"required":["driver_id","odometer","unspecified_id","user_id","vehicle_number"],"title":"IssuingTransactionFleetCardholderPromptData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["driver_id","odometer","unspecified_id","user_id","vehicle_number"]},"issuing_transaction_fleet_data":{"description":"","properties":{"cardholder_prompt_data":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["cardholder_prompt_data","purchase_type","reported_breakdown","service_type"],"title":"IssuingTransactionFleetData","type":"object","x-expandableFields":["cardholder_prompt_data","reported_breakdown"],"x-stripeMostCommon":["cardholder_prompt_data","purchase_type","reported_breakdown","service_type"]},"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"}},"required":["gross_amount_decimal"],"title":"IssuingTransactionFleetFuelPriceData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["gross_amount_decimal"]},"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"}},"required":["gross_amount_decimal"],"title":"IssuingTransactionFleetNonFuelPriceData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["gross_amount_decimal"]},"issuing_transaction_fleet_reported_breakdown":{"description":"","properties":{"fuel":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_fleet_fuel_price_data"}],"description":"Breakdown of fuel portion of the purchase.","nullable":true},"non_fuel":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_fleet_non_fuel_price_data"}],"description":"Breakdown of non-fuel portion of the purchase.","nullable":true},"tax":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_fleet_tax_data"}],"description":"Information about tax included in this transaction.","nullable":true}},"required":["fuel","non_fuel","tax"],"title":"IssuingTransactionFleetReportedBreakdown","type":"object","x-expandableFields":["fuel","non_fuel","tax"],"x-stripeMostCommon":["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"}},"required":["local_amount_decimal","national_amount_decimal"],"title":"IssuingTransactionFleetTaxData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["local_amount_decimal","national_amount_decimal"]},"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":"#/$defs/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"}},"required":["departure_at","passenger_name","refundable","segments","travel_agency"],"title":"IssuingTransactionFlightData","type":"object","x-expandableFields":["segments"],"x-stripeMostCommon":["departure_at","passenger_name","refundable","segments","travel_agency"]},"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"}},"required":["arrival_airport_code","carrier","departure_airport_code","flight_number","service_class","stopover_allowed"],"title":"IssuingTransactionFlightDataLeg","type":"object","x-expandableFields":[],"x-stripeMostCommon":["arrival_airport_code","carrier","departure_airport_code","flight_number","service_class","stopover_allowed"]},"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":["industry_product_code","quantity_decimal","type","unit","unit_cost_decimal"],"title":"IssuingTransactionFuelData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["industry_product_code","quantity_decimal","type","unit","unit_cost_decimal"]},"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"}},"required":["check_in_at","nights"],"title":"IssuingTransactionLodgingData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["check_in_at","nights"]},"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"}},"required":["authorization_code","processing_date","transaction_id"],"title":"IssuingTransactionNetworkData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["authorization_code","processing_date","transaction_id"]},"issuing_transaction_purchase_details":{"description":"","properties":{"fleet":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_fleet_data"}],"description":"Fleet-specific information for transactions using Fleet cards.","nullable":true},"flight":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_flight_data"}],"description":"Information about the flight that was purchased with this transaction.","nullable":true},"fuel":{"anyOf":[{"$ref":"#/$defs/issuing_transaction_fuel_data"}],"description":"Information about fuel that was purchased with this transaction.","nullable":true},"lodging":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/issuing_transaction_receipt_data"},"nullable":true,"type":"array"},"reference":{"description":"A merchant-specific order number.","maxLength":5000,"nullable":true,"type":"string"}},"required":["fleet","flight","fuel","lodging","receipt","reference"],"title":"IssuingTransactionPurchaseDetails","type":"object","x-expandableFields":["fleet","flight","fuel","lodging","receipt"],"x-stripeMostCommon":["fleet","flight","fuel","lodging","receipt","reference"]},"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"}},"required":["description","quantity","total","unit_cost"],"title":"IssuingTransactionReceiptData","type":"object","x-expandableFields":[],"x-stripeMostCommon":["description","quantity","total","unit_cost"]},"issuing_transaction_treasury":{"description":"","properties":{"received_credit":{"description":"The Treasury [ReceivedCredit](https://docs.stripe.com/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://docs.stripe.com/api/treasury/received_debits) representing this Issuing transaction if it is a capture","maxLength":5000,"nullable":true,"type":"string"}},"required":["received_credit","received_debit"],"title":"IssuingTransactionTreasury","type":"object","x-expandableFields":[],"x-stripeMostCommon":["received_credit","received_debit"]},"klarna_address":{"description":"","properties":{"country":{"description":"The payer address country","maxLength":5000,"nullable":true,"type":"string"}},"required":["country"],"title":"klarna_address","type":"object","x-expandableFields":[],"x-stripeMostCommon":["country"]},"klarna_payer_details":{"description":"","properties":{"address":{"anyOf":[{"$ref":"#/$defs/klarna_address"}],"description":"The payer's address","nullable":true}},"required":["address"],"title":"klarna_payer_details","type":"object","x-expandableFields":["address"],"x-stripeMostCommon":["address"]},"legal_entity_company":{"description":"","properties":{"address":{"$ref":"#/$defs/address"},"address_kana":{"anyOf":[{"$ref":"#/$defs/legal_entity_japan_address"}],"description":"The Kana variation of the company's primary address (Japan only).","nullable":true},"address_kanji":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/api/accounts/update#update_account-company-directors_provided).","type":"boolean"},"directorship_declaration":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/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. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"name_kana":{"description":"The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"name_kanji":{"description":"The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","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://docs.stripe.com/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":"#/$defs/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":{"description":"This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.","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"},"registration_date":{"$ref":"#/$defs/legal_entity_registration_date"},"representative_declaration":{"anyOf":[{"$ref":"#/$defs/legal_entity_representative_declaration"}],"description":"This hash is used to attest that the representative is authorized to act as the representative of their legal entity.","nullable":true},"structure":{"description":"The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://docs.stripe.com/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":"#/$defs/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","registration_date","representative_declaration","verification"],"x-stripeMostCommon":["address","address_kana","address_kanji","directors_provided","directorship_declaration","executives_provided","export_license_id","export_purpose_code","name","name_kana","name_kanji","owners_provided","ownership_declaration","ownership_exemption_reason","phone","registration_date","structure","tax_id_provided","tax_id_registrar","vat_id_provided","verification"]},"legal_entity_company_verification":{"description":"","properties":{"document":{"$ref":"#/$defs/legal_entity_company_verification_document"}},"required":["document"],"title":"LegalEntityCompanyVerification","type":"object","x-expandableFields":["document"],"x-stripeMostCommon":["document"]},"legal_entity_company_verification_document":{"description":"","properties":{"back":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/file"}],"description":"The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file).","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/file"}],"description":"The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file).","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/file"}]}}},"required":["back","details","details_code","front"],"title":"LegalEntityCompanyVerificationDocument","type":"object","x-expandableFields":["back","front"],"x-stripeMostCommon":["back","details","details_code","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"}},"required":["date","ip","user_agent"],"title":"LegalEntityDirectorshipDeclaration","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"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"}},"required":["day","month","year"],"title":"LegalEntityDOB","type":"object","x-expandableFields":[],"x-stripeMostCommon":["day","month","year"]},"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"}},"required":["city","country","line1","line2","postal_code","state","town"],"title":"LegalEntityJapanAddress","type":"object","x-expandableFields":[],"x-stripeMostCommon":["city","country","line1","line2","postal_code","state","town"]},"legal_entity_person_verification":{"description":"","properties":{"additional_document":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/legal_entity_person_verification_document"},"status":{"description":"The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Please refer [guide](https://docs.stripe.com/connect/handling-api-verification) to handle verification updates.","maxLength":5000,"type":"string"}},"required":["status"],"title":"LegalEntityPersonVerification","type":"object","x-expandableFields":["additional_document","document"],"x-stripeMostCommon":["additional_document","details","details_code","document","status"]},"legal_entity_person_verification_document":{"description":"","properties":{"back":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/file"}],"description":"The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/file"}],"description":"The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/file"}]}}},"required":["back","details","details_code","front"],"title":"LegalEntityPersonVerificationDocument","type":"object","x-expandableFields":["back","front"],"x-stripeMostCommon":["back","details","details_code","front"]},"legal_entity_registration_date":{"description":"","properties":{"day":{"description":"The day of registration, between 1 and 31.","nullable":true,"type":"integer"},"month":{"description":"The month of registration, between 1 and 12.","nullable":true,"type":"integer"},"year":{"description":"The four-digit year of registration.","nullable":true,"type":"integer"}},"required":["day","month","year"],"title":"LegalEntityRegistrationDate","type":"object","x-expandableFields":[],"x-stripeMostCommon":["day","month","year"]},"legal_entity_representative_declaration":{"description":"","properties":{"date":{"description":"The Unix timestamp marking when the representative declaration attestation was made.","format":"unix-time","nullable":true,"type":"integer"},"ip":{"description":"The IP address from which the representative declaration attestation was made.","maxLength":5000,"nullable":true,"type":"string"},"user_agent":{"description":"The user-agent string from the browser where the representative declaration attestation was made.","maxLength":5000,"nullable":true,"type":"string"}},"required":["date","ip","user_agent"],"title":"LegalEntityRepresentativeDeclaration","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"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"}},"required":["date","ip","user_agent"],"title":"LegalEntityUBODeclaration","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"level3":{"description":"","properties":{"customer_reference":{"maxLength":5000,"type":"string"},"line_items":{"items":{"$ref":"#/$defs/level3_line_items"},"type":"array"},"merchant_reference":{"maxLength":5000,"type":"string"},"shipping_address_zip":{"maxLength":5000,"type":"string"},"shipping_amount":{"type":"integer"},"shipping_from_zip":{"maxLength":5000,"type":"string"}},"required":["line_items","merchant_reference"],"title":"Level3","type":"object","x-expandableFields":["line_items"],"x-stripeMostCommon":["customer_reference","line_items","merchant_reference","shipping_address_zip","shipping_amount","shipping_from_zip"]},"level3_line_items":{"description":"","properties":{"discount_amount":{"nullable":true,"type":"integer"},"product_code":{"maxLength":5000,"type":"string"},"product_description":{"maxLength":5000,"type":"string"},"quantity":{"nullable":true,"type":"integer"},"tax_amount":{"nullable":true,"type":"integer"},"unit_cost":{"nullable":true,"type":"integer"}},"required":["discount_amount","product_code","product_description","quantity","tax_amount","unit_cost"],"title":"Level3LineItems","type":"object","x-expandableFields":[],"x-stripeMostCommon":["discount_amount","product_code","product_description","quantity","tax_amount","unit_cost"]},"line_item":{"description":"Invoice Line Items represent the individual lines within an [invoice](https://docs.stripe.com/api/invoices) and only exist within the context of an invoice.\n\nEach line item is backed by either an [invoice item](https://docs.stripe.com/api/invoiceitems) or a [subscription item](https://docs.stripe.com/api/subscription_items).","properties":{"amount":{"description":"The amount, 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"},"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":"#/$defs/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":"#/$defs/discount"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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"},"parent":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_lines_parents_invoice_line_item_parent"}],"description":"The parent that generated this line item.","nullable":true},"period":{"$ref":"#/$defs/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":"#/$defs/invoices_resource_pretax_credit_amount"},"nullable":true,"type":"array"},"pricing":{"anyOf":[{"$ref":"#/$defs/billing_bill_resource_invoicing_pricing_pricing"}],"description":"The pricing information of the line item.","nullable":true},"quantity":{"description":"Quantity of units for the invoice line item in integer format, with any decimal precision truncated. For the line item's full-precision decimal quantity, use `quantity_decimal`. This field will be deprecated in favor of `quantity_decimal` in a future version. If the line item is a proration or subscription, the quantity of the subscription that the proration was computed for.","nullable":true,"type":"integer"},"quantity_decimal":{"description":"Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.","format":"decimal","nullable":true,"type":"string"},"subscription":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/subscription"}],"nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/subscription"}]}},"subtotal":{"description":"The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes.","type":"integer"},"taxes":{"description":"The tax information of the line item.","items":{"$ref":"#/$defs/billing_bill_resource_invoicing_taxes_tax"},"nullable":true,"type":"array"}},"required":["amount","currency","description","discount_amounts","discountable","discounts","id","invoice","livemode","metadata","object","parent","period","pretax_credit_amounts","pricing","quantity","quantity_decimal","subscription","subtotal","taxes"],"title":"InvoiceLineItem","type":"object","x-expandableFields":["discount_amounts","discounts","parent","period","pretax_credit_amounts","pricing","subscription","taxes"],"x-resourceId":"line_item","x-stripeMostCommon":["amount","currency","description","id","invoice","metadata","parent","period","pricing","quantity_decimal"],"x-stripeOperations":[{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/invoices/{invoice}/lines"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/invoices/{invoice}/lines"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/invoices/{invoice}/lines/{line_item_id}"}],"x-stripeResource":{"class_name":"InvoiceLineItem","has_collection_class":true,"in_package":""}},"line_items_tax_amount":{"description":"","properties":{"amount":{"description":"Amount of tax applied for this rate.","type":"integer"},"rate":{"$ref":"#/$defs/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","taxability_reason","taxable_amount"],"title":"LineItemsTaxAmount","type":"object","x-expandableFields":["rate"],"x-stripeMostCommon":["amount","rate","taxability_reason","taxable_amount"]},"linked_account_options_common":{"description":"","properties":{"filters":{"$ref":"#/$defs/payment_flows_private_payment_methods_financial_connections_common_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"}},"required":["prefetch"],"title":"linked_account_options_common","type":"object","x-expandableFields":["filters"],"x-stripeMostCommon":["filters","permissions","prefetch","return_url"]},"mandate":{"description":"A Mandate is a record of the permission that your customer gives you to debit their payment method.","properties":{"customer_acceptance":{"$ref":"#/$defs/customer_acceptance"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"multi_use":{"$ref":"#/$defs/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":"#/$defs/payment_method"}],"description":"ID of the payment method associated with this mandate.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"payment_method_details":{"$ref":"#/$defs/mandate_payment_method_details"},"single_use":{"$ref":"#/$defs/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","x-stripeMostCommon":["customer_acceptance","id","payment_method","payment_method_details","status","type"],"x-stripeOperations":[{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/mandates/{mandate}"}],"x-stripeResource":{"class_name":"Mandate","in_package":""}},"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":["interval_description","payment_schedule","transaction_type"],"title":"mandate_acss_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["default_for","interval_description","payment_schedule","transaction_type"],"x-stripeResource":{"class_name":"AcssDebit","in_package":""}},"mandate_amazon_pay":{"description":"","properties":{},"title":"mandate_amazon_pay","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"AmazonPay","in_package":""}},"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":[],"x-stripeMostCommon":["url"]},"mandate_bacs_debit":{"description":"","properties":{"display_name":{"description":"The display name for the account on this mandate.","maxLength":5000,"nullable":true,"type":"string"},"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"},"service_user_number":{"description":"The service user number for the account on this mandate.","maxLength":5000,"nullable":true,"type":"string"},"url":{"description":"The URL that will contain the mandate that the customer has signed.","maxLength":5000,"type":"string"}},"required":["display_name","network_status","reference","revocation_reason","service_user_number","url"],"title":"mandate_bacs_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["display_name","network_status","reference","revocation_reason","service_user_number","url"]},"mandate_cashapp":{"description":"","properties":{},"title":"mandate_cashapp","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"Cashapp","in_package":""}},"mandate_kakao_pay":{"description":"","properties":{},"title":"mandate_kakao_pay","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"KakaoPay","in_package":""}},"mandate_klarna":{"description":"","properties":{},"title":"mandate_klarna","type":"object","x-expandableFields":[]},"mandate_kr_card":{"description":"","properties":{},"title":"mandate_kr_card","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"KrCard","in_package":""}},"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_naver_pay":{"description":"","properties":{},"title":"mandate_naver_pay","type":"object","x-expandableFields":[]},"mandate_nz_bank_account":{"description":"","properties":{},"title":"mandate_nz_bank_account","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"NzBankAccount","in_package":""}},"mandate_payment_method_details":{"description":"","properties":{"acss_debit":{"$ref":"#/$defs/mandate_acss_debit"},"amazon_pay":{"$ref":"#/$defs/mandate_amazon_pay"},"au_becs_debit":{"$ref":"#/$defs/mandate_au_becs_debit"},"bacs_debit":{"$ref":"#/$defs/mandate_bacs_debit"},"card":{"$ref":"#/$defs/card_mandate_payment_method_details"},"cashapp":{"$ref":"#/$defs/mandate_cashapp"},"kakao_pay":{"$ref":"#/$defs/mandate_kakao_pay"},"klarna":{"$ref":"#/$defs/mandate_klarna"},"kr_card":{"$ref":"#/$defs/mandate_kr_card"},"link":{"$ref":"#/$defs/mandate_link"},"naver_pay":{"$ref":"#/$defs/mandate_naver_pay"},"nz_bank_account":{"$ref":"#/$defs/mandate_nz_bank_account"},"paypal":{"$ref":"#/$defs/mandate_paypal"},"payto":{"$ref":"#/$defs/mandate_payto"},"revolut_pay":{"$ref":"#/$defs/mandate_revolut_pay"},"sepa_debit":{"$ref":"#/$defs/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"},"upi":{"$ref":"#/$defs/mandate_upi"},"us_bank_account":{"$ref":"#/$defs/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","klarna","kr_card","link","naver_pay","nz_bank_account","paypal","payto","revolut_pay","sepa_debit","upi","us_bank_account"],"x-stripeMostCommon":["acss_debit","amazon_pay","au_becs_debit","bacs_debit","card","cashapp","kakao_pay","klarna","kr_card","link","naver_pay","nz_bank_account","paypal","payto","revolut_pay","sepa_debit","type","upi","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"}},"required":["billing_agreement_id","payer_id"],"title":"mandate_paypal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["billing_agreement_id","payer_id"]},"mandate_payto":{"description":"","properties":{"amount":{"description":"Amount that will be collected. It is required when `amount_type` is `fixed`.","nullable":true,"type":"integer"},"amount_type":{"description":"The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.","enum":["fixed","maximum"],"type":"string"},"end_date":{"description":"Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.","maxLength":5000,"nullable":true,"type":"string"},"payment_schedule":{"description":"The periodicity at which payments will be collected. Defaults to `adhoc`.","enum":["adhoc","annual","daily","fortnightly","monthly","quarterly","semi_annual","weekly"],"type":"string"},"payments_per_period":{"description":"The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.","nullable":true,"type":"integer"},"purpose":{"description":"The purpose for which payments are made. Has a default value based on your merchant category code.","enum":["dependant_support","government","loan","mortgage","other","pension","personal","retail","salary","tax","utility"],"nullable":true,"type":"string"},"start_date":{"description":"Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.","maxLength":5000,"nullable":true,"type":"string"}},"required":["amount","amount_type","end_date","payment_schedule","payments_per_period","purpose","start_date"],"title":"mandate_payto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","end_date","payment_schedule","payments_per_period","purpose","start_date"],"x-stripeResource":{"class_name":"Payto","in_package":""}},"mandate_revolut_pay":{"description":"","properties":{},"title":"mandate_revolut_pay","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"RevolutPay","in_package":""}},"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":[],"x-stripeMostCommon":["reference","url"],"x-stripeResource":{"class_name":"SepaDebit","in_package":""}},"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":[],"x-stripeMostCommon":["amount","currency"]},"mandate_upi":{"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":20,"nullable":true,"type":"string"},"end_date":{"description":"End date of the mandate or subscription.","format":"unix-time","nullable":true,"type":"integer"}},"required":["amount","amount_type","description","end_date"],"title":"mandate_upi","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","description","end_date"],"x-stripeResource":{"class_name":"UPI","in_package":""}},"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":[],"x-stripeMostCommon":["collection_method"],"x-stripeResource":{"class_name":"UsBankAccount","in_package":""}},"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","preferred"],"title":"networks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["available","preferred"]},"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"}},"required":["ip_address","user_agent"],"title":"online_acceptance","type":"object","x-expandableFields":[],"x-stripeMostCommon":["ip_address","user_agent"]},"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":[],"x-stripeMostCommon":["height","length","weight","width"]},"payment_flows_amount_details":{"description":"","properties":{"discount_amount":{"description":"The total discount applied on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.\n\nThis field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field.","type":"integer"},"error":{"$ref":"#/$defs/payment_flows_amount_details_resource_error"},"line_items":{"description":"A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 200 line items.","properties":{"data":{"description":"Details about each object.","items":{"$ref":"#/$defs/payment_intent_amount_details_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":"PaymentFlowsAmountDetailsResourceLineItemsList","type":"object","x-expandableFields":["data"],"x-stripeMostCommon":["data","has_more","object","url"]},"shipping":{"$ref":"#/$defs/payment_flows_amount_details_resource_shipping"},"tax":{"$ref":"#/$defs/payment_flows_amount_details_resource_tax"},"tip":{"$ref":"#/$defs/payment_flows_amount_details_client_resource_tip"}},"title":"PaymentFlowsAmountDetails","type":"object","x-expandableFields":["error","line_items","shipping","tax","tip"],"x-stripeMostCommon":["discount_amount","error","line_items","shipping","tax","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":[],"x-stripeMostCommon":["amount"]},"payment_flows_amount_details_resource_error":{"description":"","properties":{"code":{"description":"The code of the error that occurred when validating the current amount details.","enum":["amount_details_amount_mismatch","amount_details_tax_shipping_discount_greater_than_amount"],"nullable":true,"type":"string"},"message":{"description":"A message providing more details about the error.","maxLength":5000,"nullable":true,"type":"string"}},"required":["code","message"],"title":"PaymentFlowsAmountDetailsResourceError","type":"object","x-expandableFields":[],"x-stripeMostCommon":["code","message"]},"payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_payment_method_options":{"description":"","properties":{"card":{"$ref":"#/$defs/payment_flows_private_payment_methods_card_payment_intent_amount_details_line_item_payment_method_options"},"card_present":{"$ref":"#/$defs/payment_flows_private_payment_methods_card_present_amount_details_line_item_payment_method_options"},"klarna":{"$ref":"#/$defs/payment_flows_private_payment_methods_klarna_payment_intent_amount_details_line_item_payment_method_options"},"paypal":{"$ref":"#/$defs/payment_flows_private_payment_methods_paypal_amount_details_line_item_payment_method_options"}},"title":"PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptions","type":"object","x-expandableFields":["card","card_present","klarna","paypal"],"x-stripeMostCommon":["card","card_present","klarna","paypal"]},"payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_tax":{"description":"","properties":{"total_tax_amount":{"description":"The total amount of tax on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0.\n\nThis field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field.","type":"integer"}},"required":["total_tax_amount"],"title":"PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTax","type":"object","x-expandableFields":[],"x-stripeMostCommon":["total_tax_amount"]},"payment_flows_amount_details_resource_shipping":{"description":"","properties":{"amount":{"description":"If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than or equal to 0.","nullable":true,"type":"integer"},"from_postal_code":{"description":"If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed.","maxLength":5000,"nullable":true,"type":"string"},"to_postal_code":{"description":"If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed.","maxLength":5000,"nullable":true,"type":"string"}},"required":["amount","from_postal_code","to_postal_code"],"title":"PaymentFlowsAmountDetailsResourceShipping","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","from_postal_code","to_postal_code"]},"payment_flows_amount_details_resource_tax":{"description":"","properties":{"total_tax_amount":{"description":"The total amount of tax on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0.\n\nThis field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field.","nullable":true,"type":"integer"}},"required":["total_tax_amount"],"title":"PaymentFlowsAmountDetailsResourceTax","type":"object","x-expandableFields":[],"x-stripeMostCommon":["total_tax_amount"]},"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://docs.stripe.com/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":[],"x-stripeMostCommon":["allow_redirects","enabled"]},"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://docs.stripe.com/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"}},"required":["enabled"],"title":"PaymentFlowsAutomaticPaymentMethodsSetupIntent","type":"object","x-expandableFields":[],"x-stripeMostCommon":["allow_redirects","enabled"]},"payment_flows_payment_details":{"description":"","properties":{"customer_reference":{"description":"A unique value to identify the customer. This field is available only for card payments.\n\nThis field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.","maxLength":5000,"nullable":true,"type":"string"},"order_reference":{"description":"A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates.\n\nFor Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app.","maxLength":5000,"nullable":true,"type":"string"}},"required":["customer_reference","order_reference"],"title":"PaymentFlowsPaymentDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["customer_reference","order_reference"]},"payment_flows_payment_intent_async_workflows":{"description":"","properties":{"inputs":{"$ref":"#/$defs/payment_flows_payment_intent_async_workflows_resource_inputs"}},"title":"PaymentFlowsPaymentIntentAsyncWorkflows","type":"object","x-expandableFields":["inputs"],"x-stripeMostCommon":["inputs"]},"payment_flows_payment_intent_async_workflows_resource_inputs":{"description":"","properties":{"tax":{"$ref":"#/$defs/payment_flows_payment_intent_async_workflows_resource_inputs_resource_tax"}},"title":"PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputs","type":"object","x-expandableFields":["tax"],"x-stripeMostCommon":["tax"]},"payment_flows_payment_intent_async_workflows_resource_inputs_resource_tax":{"description":"","properties":{"calculation":{"description":"The [TaxCalculation](https://docs.stripe.com/api/tax/calculations) id","maxLength":5000,"type":"string"}},"required":["calculation"],"title":"PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputsResourceTax","type":"object","x-expandableFields":[],"x-stripeMostCommon":["calculation"]},"payment_flows_payment_intent_presentment_details":{"description":"","properties":{"presentment_amount":{"description":"Amount intended to be collected by this payment, denominated in `presentment_currency`.","type":"integer"},"presentment_currency":{"description":"Currency presented to the customer during payment.","maxLength":5000,"type":"string"}},"required":["presentment_amount","presentment_currency"],"title":"PaymentFlowsPaymentIntentPresentmentDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["presentment_amount","presentment_currency"]},"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"}},"required":["fingerprint","transaction_id"],"title":"PaymentFlowsPrivatePaymentMethodsAlipayDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","fingerprint","transaction_id"]},"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":[],"x-stripeMostCommon":["status"]},"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":[],"x-stripeMostCommon":["status"]},"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":[],"x-stripeMostCommon":["maximum_amount_capturable","status"]},"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":[],"x-stripeMostCommon":["status"]},"payment_flows_private_payment_methods_card_payment_intent_amount_details_line_item_payment_method_options":{"description":"","properties":{"commodity_code":{"maxLength":5000,"nullable":true,"type":"string"}},"required":["commodity_code"],"title":"PaymentFlowsPrivatePaymentMethodsCardPaymentIntentAmountDetailsLineItemPaymentMethodOptions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["commodity_code"]},"payment_flows_private_payment_methods_card_present_amount_details_line_item_payment_method_options":{"description":"","properties":{"commodity_code":{"maxLength":5000,"nullable":true,"type":"string"}},"required":["commodity_code"],"title":"PaymentFlowsPrivatePaymentMethodsCardPresentAmountDetailsLineItemPaymentMethodOptions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["commodity_code"]},"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":[],"x-stripeMostCommon":["type"]},"payment_flows_private_payment_methods_financial_connections_common_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":"PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFilters","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_subcategories"]},"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":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"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"}},"required":["day","month","year"],"title":"PaymentFlowsPrivatePaymentMethodsKlarnaDOB","type":"object","x-expandableFields":[],"x-stripeMostCommon":["day","month","year"]},"payment_flows_private_payment_methods_klarna_payment_intent_amount_details_line_item_payment_method_options":{"description":"","properties":{"image_url":{"maxLength":2048,"nullable":true,"type":"string"},"product_url":{"maxLength":2048,"nullable":true,"type":"string"},"reference":{"maxLength":255,"nullable":true,"type":"string"},"subscription_reference":{"maxLength":2048,"nullable":true,"type":"string"}},"required":["image_url","product_url","reference","subscription_reference"],"title":"PaymentFlowsPrivatePaymentMethodsKlarnaPaymentIntentAmountDetailsLineItemPaymentMethodOptions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["image_url","product_url","reference","subscription_reference"]},"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"},"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":"PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"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":[],"x-stripeMostCommon":["capture_method"]},"payment_flows_private_payment_methods_paypal_amount_details_line_item_payment_method_options":{"description":"","properties":{"category":{"description":"Type of the line item.","enum":["digital_goods","donation","physical_goods"],"type":"string"},"description":{"description":"Description of the line item.","maxLength":5000,"type":"string"},"sold_by":{"description":"The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers).","maxLength":5000,"type":"string"}},"title":"PaymentFlowsPrivatePaymentMethodsPaypalAmountDetailsLineItemPaymentMethodOptions","type":"object","x-expandableFields":[],"x-stripeMostCommon":["category","description","sold_by"]},"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":[],"x-stripeMostCommon":["capture_method"]},"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](/payments/paymentintents/lifecycle)\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://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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":{"$ref":"#/$defs/payment_flows_amount_details"},"amount_received":{"description":"Amount that this PaymentIntent collects.","type":"integer"},"application":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/application"}],"description":"ID of the Connect application that created the PaymentIntent.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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 amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts).","nullable":true,"type":"integer"},"automatic_payment_methods":{"anyOf":[{"$ref":"#/$defs/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`, `automatic`, or `expired`).","enum":["abandoned","automatic","duplicate","expired","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://docs.stripe.com/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":"#/$defs/customer"},{"$ref":"#/$defs/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://api.stripe.com#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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"ID of the Account representing the customer that this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Accounts cannot be used with this PaymentIntent.\n\nIf [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead.","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"},"excluded_payment_method_types":{"description":"The list of payment method types to exclude from use with this payment.","items":{"enum":["acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","blik","boleto","card","cashapp","crypto","customer_balance","eps","fpx","giropay","grabpay","ideal","kakao_pay","klarna","konbini","kr_card","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_debit","sofort","swish","twint","upi","us_bank_account","wechat_pay","zip"],"type":"string","x-stripeBypassValidation":true},"nullable":true,"type":"array"},"hooks":{"$ref":"#/$defs/payment_flows_payment_intent_async_workflows"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"last_payment_error":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/charge"}],"description":"ID of the latest [Charge object](https://docs.stripe.com/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/charge"}]}},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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://docs.stripe.com/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).","type":"object"},"next_action":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/account"}],"description":"You can specify the settlement merchant as the\nconnected account using the `on_behalf_of` attribute on the charge. See the PaymentIntents [use case for connected accounts](/payments/connected-accounts) for details.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"payment_details":{"$ref":"#/$defs/payment_flows_payment_details"},"payment_method":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_method"}],"description":"ID of the payment method used in this PaymentIntent.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"payment_method_configuration_details":{"anyOf":[{"$ref":"#/$defs/payment_method_config_biz_payment_method_configuration_details"}],"description":"Information about the [payment method configuration](https://docs.stripe.com/api/payment_method_configurations) used for this PaymentIntent.","nullable":true},"payment_method_options":{"anyOf":[{"$ref":"#/$defs/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. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).","items":{"maxLength":5000,"type":"string"},"type":"array"},"presentment_details":{"$ref":"#/$defs/payment_flows_payment_intent_presentment_details"},"processing":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/review"}],"description":"ID of the review associated with this PaymentIntent, if any.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/shipping"}],"description":"Shipping information for this PaymentIntent.","nullable":true},"source":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_source"},{"$ref":"#/$defs/deleted_payment_source"}],"description":"This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_source"},{"$ref":"#/$defs/deleted_payment_source"}]}},"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://docs.stripe.com/payments/intents#intent-statuses).","enum":["canceled","processing","requires_action","requires_capture","requires_confirmation","requires_payment_method","succeeded"],"type":"string","x-stripeBypassValidation":true},"transfer_data":{"anyOf":[{"$ref":"#/$defs/transfer_data"}],"description":"The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://docs.stripe.com/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://docs.stripe.com/connect/separate-charges-and-transfers).","maxLength":5000,"nullable":true,"type":"string"}},"required":["amount","amount_capturable","amount_received","application","application_fee_amount","automatic_payment_methods","canceled_at","cancellation_reason","capture_method","client_secret","confirmation_method","created","currency","customer","customer_account","description","excluded_payment_method_types","id","last_payment_error","latest_charge","livemode","metadata","next_action","object","on_behalf_of","payment_method","payment_method_configuration_details","payment_method_options","payment_method_types","processing","receipt_email","review","setup_future_usage","shipping","source","statement_descriptor","statement_descriptor_suffix","status","transfer_group"],"title":"PaymentIntent","type":"object","x-expandableFields":["amount_details","application","automatic_payment_methods","customer","hooks","last_payment_error","latest_charge","next_action","on_behalf_of","payment_details","payment_method","payment_method_configuration_details","payment_method_options","presentment_details","processing","review","shipping","source","transfer_data"],"x-resourceId":"payment_intent","x-stripeMostCommon":["amount","automatic_payment_methods","client_secret","currency","customer","customer_account","description","id","last_payment_error","latest_charge","metadata","next_action","payment_method","receipt_email","setup_future_usage","shipping","statement_descriptor","statement_descriptor_suffix","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/payment_intents"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/payment_intents/{intent}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/payment_intents/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/payment_intents"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/payment_intents/{intent}"},{"method_name":"apply_customer_balance","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_intents/{intent}/apply_customer_balance"},{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_intents/{intent}/cancel"},{"method_name":"capture","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_intents/{intent}/capture"},{"method_name":"confirm","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_intents/{intent}/confirm"},{"method_name":"increment_authorization","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_intents/{intent}/increment_authorization"},{"method_name":"verify_microdeposits","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_intents/{intent}/verify_microdeposits"}],"x-stripeResource":{"class_name":"PaymentIntent","has_collection_class":true,"has_search_result_class":true,"in_package":""}},"payment_intent_amount_details_line_item":{"description":"","properties":{"discount_amount":{"description":"The discount applied on this line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.\n\nThis field is mutually exclusive with the `amount_details[discount_amount]` field.","nullable":true,"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":["payment_intent_amount_details_line_item"],"type":"string"},"payment_method_options":{"anyOf":[{"$ref":"#/$defs/payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_payment_method_options"}],"description":"Payment method-specific information for line items.","nullable":true},"product_code":{"description":"The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long.","maxLength":5000,"nullable":true,"type":"string"},"product_name":{"description":"The product name of the line item. Required for L3 rates. At most 1024 characters long.\n\nFor Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For PayPal, this field is truncated to 127 characters.","maxLength":5000,"type":"string"},"quantity":{"description":"The quantity of items. Required for L3 rates. An integer greater than 0.","type":"integer"},"tax":{"anyOf":[{"$ref":"#/$defs/payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_tax"}],"description":"Contains information about the tax on the item.","nullable":true},"unit_cost":{"description":"The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.","type":"integer"},"unit_of_measure":{"description":"A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long.","maxLength":5000,"nullable":true,"type":"string"}},"required":["discount_amount","id","object","payment_method_options","product_code","product_name","quantity","tax","unit_cost","unit_of_measure"],"title":"PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItem","type":"object","x-expandableFields":["payment_method_options","tax"],"x-resourceId":"payment_intent_amount_details_line_item","x-stripeMostCommon":["discount_amount","id","object","payment_method_options","product_code","product_name","quantity","tax","unit_cost","unit_of_measure"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/payment_intents/{intent}/amount_details_line_items","shared_version_of":"payment_intent_amount_details_line_item"}],"x-stripeResource":{"class_name":"PaymentIntentAmountDetailsLineItem","has_collection_class":true,"in_package":""}},"payment_intent_card_processing":{"description":"","properties":{"customer_notification":{"$ref":"#/$defs/payment_intent_processing_customer_notification"}},"title":"PaymentIntentCardProcessing","type":"object","x-expandableFields":["customer_notification"],"x-stripeMostCommon":["customer_notification"],"x-stripeResource":{"class_name":"Card","in_package":""}},"payment_intent_next_action":{"description":"","properties":{"alipay_handle_redirect":{"$ref":"#/$defs/payment_intent_next_action_alipay_handle_redirect"},"boleto_display_details":{"$ref":"#/$defs/payment_intent_next_action_boleto"},"card_await_notification":{"$ref":"#/$defs/payment_intent_next_action_card_await_notification"},"cashapp_handle_redirect_or_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code"},"display_bank_transfer_instructions":{"$ref":"#/$defs/payment_intent_next_action_display_bank_transfer_instructions"},"konbini_display_details":{"$ref":"#/$defs/payment_intent_next_action_konbini"},"multibanco_display_details":{"$ref":"#/$defs/payment_intent_next_action_display_multibanco_details"},"oxxo_display_details":{"$ref":"#/$defs/payment_intent_next_action_display_oxxo_details"},"paynow_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_paynow_display_qr_code"},"pix_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_pix_display_qr_code"},"promptpay_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_promptpay_display_qr_code"},"redirect_to_url":{"$ref":"#/$defs/payment_intent_next_action_redirect_to_url"},"swish_handle_redirect_or_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_swish_handle_redirect_or_display_qr_code"},"type":{"description":"Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.","maxLength":5000,"type":"string"},"upi_handle_redirect_or_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_upi_handle_redirect_or_display_qr_code"},"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":"#/$defs/payment_intent_next_action_verify_with_microdeposits"},"wechat_pay_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_wechat_pay_display_qr_code"},"wechat_pay_redirect_to_android_app":{"$ref":"#/$defs/payment_intent_next_action_wechat_pay_redirect_to_android_app"},"wechat_pay_redirect_to_ios_app":{"$ref":"#/$defs/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","upi_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"],"x-stripeMostCommon":["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","type","upi_handle_redirect_or_display_qr_code","use_stripe_sdk","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"}},"required":["native_data","native_url","return_url","url"],"title":"PaymentIntentNextActionAlipayHandleRedirect","type":"object","x-expandableFields":[],"x-stripeMostCommon":["native_data","native_url","return_url","url"],"x-stripeResource":{"class_name":"NextActionAlipayHandleRedirect","in_package":""}},"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"}},"required":["expires_at","hosted_voucher_url","number","pdf"],"title":"payment_intent_next_action_boleto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["expires_at","hosted_voucher_url","number","pdf"],"x-stripeResource":{"class_name":"NextActionDisplayBoletoDetails","in_package":""}},"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"}},"required":["charge_attempt_at","customer_approval_required"],"title":"PaymentIntentNextActionCardAwaitNotification","type":"object","x-expandableFields":[],"x-stripeMostCommon":["charge_attempt_at","customer_approval_required"],"x-stripeResource":{"class_name":"NextActionCardAwaitNotification","in_package":""}},"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":"#/$defs/payment_intent_next_action_cashapp_qr_code"}},"required":["hosted_instructions_url","mobile_auth_url","qr_code"],"title":"PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode","type":"object","x-expandableFields":["qr_code"],"x-stripeMostCommon":["hosted_instructions_url","mobile_auth_url","qr_code"],"x-stripeResource":{"class_name":"CashappHandleRedirectOrDisplayQrCode","in_package":""}},"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":[],"x-stripeMostCommon":["expires_at","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"CashappQrCode","in_package":""}},"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":"#/$defs/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":["amount_remaining","currency","hosted_instructions_url","reference","type"],"title":"PaymentIntentNextActionDisplayBankTransferInstructions","type":"object","x-expandableFields":["financial_addresses"],"x-stripeMostCommon":["amount_remaining","currency","financial_addresses","hosted_instructions_url","reference","type"],"x-stripeResource":{"class_name":"NextActionDisplayBankTransferInstructions","in_package":""}},"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"}},"required":["entity","expires_at","hosted_voucher_url","reference"],"title":"PaymentIntentNextActionDisplayMultibancoDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["entity","expires_at","hosted_voucher_url","reference"],"x-stripeResource":{"class_name":"NextActionMultibancoDisplayDetails","in_package":""}},"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"}},"required":["expires_after","hosted_voucher_url","number"],"title":"PaymentIntentNextActionDisplayOxxoDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["expires_after","hosted_voucher_url","number"],"x-stripeResource":{"class_name":"NextActionOxxoDisplayDetails","in_package":""}},"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":"#/$defs/payment_intent_next_action_konbini_stores"}},"required":["expires_at","hosted_voucher_url","stores"],"title":"payment_intent_next_action_konbini","type":"object","x-expandableFields":["stores"],"x-stripeMostCommon":["expires_at","hosted_voucher_url","stores"],"x-stripeResource":{"class_name":"NextActionKonbiniDisplayDetails","in_package":""}},"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":[],"x-stripeMostCommon":["confirmation_number","payment_code"],"x-stripeResource":{"class_name":"Familymart","in_package":""}},"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":[],"x-stripeMostCommon":["confirmation_number","payment_code"],"x-stripeResource":{"class_name":"Lawson","in_package":""}},"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":[],"x-stripeMostCommon":["confirmation_number","payment_code"],"x-stripeResource":{"class_name":"Ministop","in_package":""}},"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":[],"x-stripeMostCommon":["confirmation_number","payment_code"],"x-stripeResource":{"class_name":"Seicomart","in_package":""}},"payment_intent_next_action_konbini_stores":{"description":"","properties":{"familymart":{"anyOf":[{"$ref":"#/$defs/payment_intent_next_action_konbini_familymart"}],"description":"FamilyMart instruction details.","nullable":true},"lawson":{"anyOf":[{"$ref":"#/$defs/payment_intent_next_action_konbini_lawson"}],"description":"Lawson instruction details.","nullable":true},"ministop":{"anyOf":[{"$ref":"#/$defs/payment_intent_next_action_konbini_ministop"}],"description":"Ministop instruction details.","nullable":true},"seicomart":{"anyOf":[{"$ref":"#/$defs/payment_intent_next_action_konbini_seicomart"}],"description":"Seicomart instruction details.","nullable":true}},"required":["familymart","lawson","ministop","seicomart"],"title":"payment_intent_next_action_konbini_stores","type":"object","x-expandableFields":["familymart","lawson","ministop","seicomart"],"x-stripeMostCommon":["familymart","lawson","ministop","seicomart"],"x-stripeResource":{"class_name":"Stores","in_package":""}},"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","hosted_instructions_url","image_url_png","image_url_svg"],"title":"PaymentIntentNextActionPaynowDisplayQrCode","type":"object","x-expandableFields":[],"x-stripeMostCommon":["data","hosted_instructions_url","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"PaynowDisplayQrCode","in_package":""}},"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":[],"x-stripeMostCommon":["data","expires_at","hosted_instructions_url","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"PixDisplayQrCode","in_package":""}},"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":[],"x-stripeMostCommon":["data","hosted_instructions_url","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"PromptpayDisplayQrCode","in_package":""}},"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"}},"required":["return_url","url"],"title":"PaymentIntentNextActionRedirectToUrl","type":"object","x-expandableFields":[],"x-stripeMostCommon":["return_url","url"],"x-stripeResource":{"class_name":"NextActionRedirectToUrl","in_package":""}},"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"},"mobile_auth_url":{"description":"The url for mobile redirect based auth (for internal use only and not typically available in standard API requests).","maxLength":5000,"type":"string"},"qr_code":{"$ref":"#/$defs/payment_intent_next_action_swish_qr_code"}},"required":["hosted_instructions_url","mobile_auth_url","qr_code"],"title":"PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode","type":"object","x-expandableFields":["qr_code"],"x-stripeMostCommon":["hosted_instructions_url","mobile_auth_url","qr_code"],"x-stripeResource":{"class_name":"SwishHandleRedirectOrDisplayQrCode","in_package":""}},"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":[],"x-stripeMostCommon":["data","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"SwishQrCode","in_package":""}},"payment_intent_next_action_upi_handle_redirect_or_display_qr_code":{"description":"","properties":{"hosted_instructions_url":{"description":"The URL to the hosted UPI instructions page, which allows customers to view the QR code.","maxLength":5000,"type":"string"},"qr_code":{"$ref":"#/$defs/payment_intent_next_action_upiqr_code"}},"required":["hosted_instructions_url","qr_code"],"title":"PaymentIntentNextActionUpiHandleRedirectOrDisplayQrCode","type":"object","x-expandableFields":["qr_code"],"x-stripeMostCommon":["hosted_instructions_url","qr_code"],"x-stripeResource":{"class_name":"UPIHandleRedirectOrDisplayQrCode","in_package":""}},"payment_intent_next_action_upiqr_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":"PaymentIntentNextActionUPIQRCode","type":"object","x-expandableFields":[],"x-stripeMostCommon":["expires_at","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"UPIQRCode","in_package":""}},"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","microdeposit_type"],"title":"PaymentIntentNextActionVerifyWithMicrodeposits","type":"object","x-expandableFields":[],"x-stripeMostCommon":["arrival_date","hosted_verification_url","microdeposit_type"]},"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":[],"x-stripeMostCommon":["data","hosted_instructions_url","image_data_url","image_url_png","image_url_svg"],"x-stripeResource":{"class_name":"WechatPayDisplayQrCode","in_package":""}},"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":[],"x-stripeMostCommon":["app_id","nonce_str","package","partner_id","prepay_id","sign","timestamp"],"x-stripeResource":{"class_name":"WechatPayRedirectToAndroidApp","in_package":""}},"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":[],"x-stripeMostCommon":["native_url"],"x-stripeResource":{"class_name":"WechatPayRedirectToIosApp","in_package":""}},"payment_intent_payment_method_options":{"description":"","properties":{"acss_debit":{"$ref":"#/$defs/payment_intent_payment_method_options_acss_debit"},"affirm":{"$ref":"#/$defs/payment_method_options_affirm"},"afterpay_clearpay":{"$ref":"#/$defs/payment_method_options_afterpay_clearpay"},"alipay":{"$ref":"#/$defs/payment_method_options_alipay"},"alma":{"$ref":"#/$defs/payment_method_options_alma"},"amazon_pay":{"$ref":"#/$defs/payment_method_options_amazon_pay"},"au_becs_debit":{"$ref":"#/$defs/payment_intent_payment_method_options_au_becs_debit"},"bacs_debit":{"$ref":"#/$defs/payment_intent_payment_method_options_bacs_debit"},"bancontact":{"$ref":"#/$defs/payment_method_options_bancontact"},"billie":{"$ref":"#/$defs/payment_method_options_billie"},"blik":{"$ref":"#/$defs/payment_intent_payment_method_options_blik"},"boleto":{"$ref":"#/$defs/payment_method_options_boleto"},"card":{"$ref":"#/$defs/payment_intent_payment_method_options_card"},"card_present":{"$ref":"#/$defs/payment_method_options_card_present"},"cashapp":{"$ref":"#/$defs/payment_method_options_cashapp"},"crypto":{"$ref":"#/$defs/payment_method_options_crypto"},"customer_balance":{"$ref":"#/$defs/payment_method_options_customer_balance"},"eps":{"$ref":"#/$defs/payment_intent_payment_method_options_eps"},"fpx":{"$ref":"#/$defs/payment_method_options_fpx"},"giropay":{"$ref":"#/$defs/payment_method_options_giropay"},"grabpay":{"$ref":"#/$defs/payment_method_options_grabpay"},"ideal":{"$ref":"#/$defs/payment_method_options_ideal"},"interac_present":{"$ref":"#/$defs/payment_method_options_interac_present"},"kakao_pay":{"$ref":"#/$defs/payment_flows_private_payment_methods_kakao_pay_payment_method_options"},"klarna":{"$ref":"#/$defs/payment_method_options_klarna"},"konbini":{"$ref":"#/$defs/payment_method_options_konbini"},"kr_card":{"$ref":"#/$defs/payment_method_options_kr_card"},"link":{"$ref":"#/$defs/payment_intent_payment_method_options_link"},"mb_way":{"$ref":"#/$defs/payment_method_options_mb_way"},"mobilepay":{"$ref":"#/$defs/payment_intent_payment_method_options_mobilepay"},"multibanco":{"$ref":"#/$defs/payment_method_options_multibanco"},"naver_pay":{"$ref":"#/$defs/payment_flows_private_payment_methods_naver_pay_payment_method_options"},"nz_bank_account":{"$ref":"#/$defs/payment_intent_payment_method_options_nz_bank_account"},"oxxo":{"$ref":"#/$defs/payment_method_options_oxxo"},"p24":{"$ref":"#/$defs/payment_method_options_p24"},"pay_by_bank":{"$ref":"#/$defs/payment_method_options_pay_by_bank"},"payco":{"$ref":"#/$defs/payment_flows_private_payment_methods_payco_payment_method_options"},"paynow":{"$ref":"#/$defs/payment_method_options_paynow"},"paypal":{"$ref":"#/$defs/payment_method_options_paypal"},"payto":{"$ref":"#/$defs/payment_intent_payment_method_options_payto"},"pix":{"$ref":"#/$defs/payment_method_options_pix"},"promptpay":{"$ref":"#/$defs/payment_method_options_promptpay"},"revolut_pay":{"$ref":"#/$defs/payment_method_options_revolut_pay"},"samsung_pay":{"$ref":"#/$defs/payment_flows_private_payment_methods_samsung_pay_payment_method_options"},"satispay":{"$ref":"#/$defs/payment_method_options_satispay"},"sepa_debit":{"$ref":"#/$defs/payment_intent_payment_method_options_sepa_debit"},"sofort":{"$ref":"#/$defs/payment_method_options_sofort"},"swish":{"$ref":"#/$defs/payment_intent_payment_method_options_swish"},"twint":{"$ref":"#/$defs/payment_method_options_twint"},"upi":{"$ref":"#/$defs/payment_method_options_upi"},"us_bank_account":{"$ref":"#/$defs/payment_intent_payment_method_options_us_bank_account"},"wechat_pay":{"$ref":"#/$defs/payment_method_options_wechat_pay"},"zip":{"$ref":"#/$defs/payment_method_options_zip"}},"title":"PaymentIntentPaymentMethodOptions","type":"object","x-expandableFields":["acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","blik","boleto","card","card_present","cashapp","crypto","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_debit","sofort","swish","twint","upi","us_bank_account","wechat_pay","zip"],"x-stripeMostCommon":["acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","blik","boleto","card","card_present","cashapp","crypto","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_debit","sofort","swish","twint","upi","us_bank_account","wechat_pay","zip"]},"payment_intent_payment_method_options_acss_debit":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/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. The default value is `automatic`.","enum":["automatic","instant","microdeposits"],"type":"string","x-stripeBypassValidation":true}},"title":"payment_intent_payment_method_options_acss_debit","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options","setup_future_usage","target_date","verification_method"]},"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":[],"x-stripeMostCommon":["setup_future_usage","target_date"]},"payment_intent_payment_method_options_bacs_debit":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["mandate_options","setup_future_usage","target_date"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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","x-stripeBypassValidation":true},"installments":{"anyOf":[{"$ref":"#/$defs/payment_method_options_card_installments"}],"description":"Installment details for this payment.\n\nFor more information, see the [installments integration guide](https://docs.stripe.com/payments/installments).","nullable":true},"mandate_options":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/payments/extended-authorization) for this PaymentIntent.","enum":["if_available","never"],"type":"string"},"request_incremental_authorization":{"description":"Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent.","enum":["if_available","never"],"type":"string"},"request_multicapture":{"description":"Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent.","enum":["if_available","never"],"type":"string"},"request_overcapture":{"description":"Request ability to [overcapture](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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"}},"required":["installments","mandate_options","network","request_three_d_secure"],"title":"payment_intent_payment_method_options_card","type":"object","x-expandableFields":["installments","mandate_options"],"x-stripeMostCommon":["capture_method","installments","mandate_options","network","request_extended_authorization","request_incremental_authorization","request_multicapture","request_overcapture","request_three_d_secure","require_cvc_recollection","setup_future_usage","statement_descriptor_suffix_kana","statement_descriptor_suffix_kanji"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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"},"persistent_token":{"description":"[Deprecated] This is a legacy parameter that no longer has any function.","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"}},"required":["persistent_token"],"title":"payment_intent_payment_method_options_link","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method","persistent_token","setup_future_usage"]},"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"}},"required":["interval_description","payment_schedule","transaction_type"],"title":"payment_intent_payment_method_options_mandate_options_acss_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["custom_mandate_url","interval_description","payment_schedule","transaction_type"]},"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":[],"x-stripeMostCommon":["reference_prefix"],"x-stripeResource":{"class_name":"BacsDebitMandateOptions","in_package":""}},"payment_intent_payment_method_options_mandate_options_payto":{"description":"","properties":{"amount":{"description":"Amount that will be collected. It is required when `amount_type` is `fixed`.","nullable":true,"type":"integer"},"amount_type":{"description":"The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.","enum":["fixed","maximum"],"nullable":true,"type":"string"},"end_date":{"description":"Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.","maxLength":5000,"nullable":true,"type":"string"},"payment_schedule":{"description":"The periodicity at which payments will be collected. Defaults to `adhoc`.","enum":["adhoc","annual","daily","fortnightly","monthly","quarterly","semi_annual","weekly"],"nullable":true,"type":"string"},"payments_per_period":{"description":"The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.","nullable":true,"type":"integer"},"purpose":{"description":"The purpose for which payments are made. Has a default value based on your merchant category code.","enum":["dependant_support","government","loan","mortgage","other","pension","personal","retail","salary","tax","utility"],"nullable":true,"type":"string"}},"required":["amount","amount_type","end_date","payment_schedule","payments_per_period","purpose"],"title":"payment_intent_payment_method_options_mandate_options_payto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","end_date","payment_schedule","payments_per_period","purpose"]},"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":[],"x-stripeMostCommon":["reference_prefix"],"x-stripeResource":{"class_name":"SepaDebitMandateOptions","in_package":""}},"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":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"payment_intent_payment_method_options_nz_bank_account":{"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_nz_bank_account","type":"object","x-expandableFields":[],"x-stripeMostCommon":["setup_future_usage","target_date"]},"payment_intent_payment_method_options_payto":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/payment_intent_payment_method_options_mandate_options_payto"},"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_payto","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options","setup_future_usage"]},"payment_intent_payment_method_options_sepa_debit":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["mandate_options","setup_future_usage","target_date"]},"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"}},"required":["reference"],"title":"payment_intent_payment_method_options_swish","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","setup_future_usage"]},"payment_intent_payment_method_options_us_bank_account":{"description":"","properties":{"financial_connections":{"$ref":"#/$defs/linked_account_options_common"},"mandate_options":{"$ref":"#/$defs/payment_method_options_us_bank_account_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"},"transaction_purpose":{"description":"The purpose of the transaction.","enum":["goods","other","services","unspecified"],"type":"string"},"verification_method":{"description":"Bank account verification method. The default value is `automatic`.","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"],"x-stripeMostCommon":["financial_connections","mandate_options","setup_future_usage","target_date","transaction_purpose","verification_method"]},"payment_intent_processing":{"description":"","properties":{"card":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["card","type"]},"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"}},"required":["approval_requested","completes_at"],"title":"PaymentIntentProcessingCustomerNotification","type":"object","x-expandableFields":[],"x-stripeMostCommon":["approval_requested","completes_at"],"x-stripeResource":{"class_name":"CustomerNotification","in_package":""}},"payment_method":{"description":"PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://docs.stripe.com/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://docs.stripe.com/payments/payment-methods) and [More Payment Scenarios](https://docs.stripe.com/payments/more-payment-scenarios).","properties":{"acss_debit":{"$ref":"#/$defs/payment_method_acss_debit"},"affirm":{"$ref":"#/$defs/payment_method_affirm"},"afterpay_clearpay":{"$ref":"#/$defs/payment_method_afterpay_clearpay"},"alipay":{"$ref":"#/$defs/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":"#/$defs/payment_method_alma"},"amazon_pay":{"$ref":"#/$defs/payment_method_amazon_pay"},"au_becs_debit":{"$ref":"#/$defs/payment_method_au_becs_debit"},"bacs_debit":{"$ref":"#/$defs/payment_method_bacs_debit"},"bancontact":{"$ref":"#/$defs/payment_method_bancontact"},"billie":{"$ref":"#/$defs/payment_method_billie"},"billing_details":{"$ref":"#/$defs/billing_details"},"blik":{"$ref":"#/$defs/payment_method_blik"},"boleto":{"$ref":"#/$defs/payment_method_boleto"},"card":{"$ref":"#/$defs/payment_method_card"},"card_present":{"$ref":"#/$defs/payment_method_card_present"},"cashapp":{"$ref":"#/$defs/payment_method_cashapp"},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"crypto":{"$ref":"#/$defs/payment_method_crypto"},"custom":{"$ref":"#/$defs/payment_method_custom"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/customer"}]}},"customer_account":{"maxLength":5000,"nullable":true,"type":"string"},"customer_balance":{"$ref":"#/$defs/payment_method_customer_balance"},"eps":{"$ref":"#/$defs/payment_method_eps"},"fpx":{"$ref":"#/$defs/payment_method_fpx"},"giropay":{"$ref":"#/$defs/payment_method_giropay"},"grabpay":{"$ref":"#/$defs/payment_method_grabpay"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"ideal":{"$ref":"#/$defs/payment_method_ideal"},"interac_present":{"$ref":"#/$defs/payment_method_interac_present"},"kakao_pay":{"$ref":"#/$defs/payment_method_kakao_pay"},"klarna":{"$ref":"#/$defs/payment_method_klarna"},"konbini":{"$ref":"#/$defs/payment_method_konbini"},"kr_card":{"$ref":"#/$defs/payment_method_kr_card"},"link":{"$ref":"#/$defs/payment_method_link"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"mb_way":{"$ref":"#/$defs/payment_method_mb_way"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/payment_method_mobilepay"},"multibanco":{"$ref":"#/$defs/payment_method_multibanco"},"naver_pay":{"$ref":"#/$defs/payment_method_naver_pay"},"nz_bank_account":{"$ref":"#/$defs/payment_method_nz_bank_account"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["payment_method"],"type":"string"},"oxxo":{"$ref":"#/$defs/payment_method_oxxo"},"p24":{"$ref":"#/$defs/payment_method_p24"},"pay_by_bank":{"$ref":"#/$defs/payment_method_pay_by_bank"},"payco":{"$ref":"#/$defs/payment_method_payco"},"paynow":{"$ref":"#/$defs/payment_method_paynow"},"paypal":{"$ref":"#/$defs/payment_method_paypal"},"payto":{"$ref":"#/$defs/payment_method_payto"},"pix":{"$ref":"#/$defs/payment_method_pix"},"promptpay":{"$ref":"#/$defs/payment_method_promptpay"},"radar_options":{"$ref":"#/$defs/radar_radar_options"},"revolut_pay":{"$ref":"#/$defs/payment_method_revolut_pay"},"samsung_pay":{"$ref":"#/$defs/payment_method_samsung_pay"},"satispay":{"$ref":"#/$defs/payment_method_satispay"},"sepa_debit":{"$ref":"#/$defs/payment_method_sepa_debit"},"sofort":{"$ref":"#/$defs/payment_method_sofort"},"swish":{"$ref":"#/$defs/payment_method_swish"},"twint":{"$ref":"#/$defs/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","billie","blik","boleto","card","card_present","cashapp","crypto","custom","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_debit","sofort","swish","twint","upi","us_bank_account","wechat_pay","zip"],"type":"string","x-stripeBypassValidation":true},"upi":{"$ref":"#/$defs/payment_method_upi"},"us_bank_account":{"$ref":"#/$defs/payment_method_us_bank_account"},"wechat_pay":{"$ref":"#/$defs/payment_method_wechat_pay"},"zip":{"$ref":"#/$defs/payment_method_zip"}},"required":["billing_details","created","customer","customer_account","id","livemode","metadata","object","type"],"title":"PaymentMethod","type":"object","x-expandableFields":["acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","billing_details","blik","boleto","card","card_present","cashapp","crypto","custom","customer","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","radar_options","revolut_pay","samsung_pay","satispay","sepa_debit","sofort","swish","twint","upi","us_bank_account","wechat_pay","zip"],"x-resourceId":"payment_method","x-stripeMostCommon":["billing_details","customer","customer_account","id","metadata","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/payment_methods"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/payment_methods/{payment_method}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/payment_methods"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/payment_methods/{payment_method}"},{"method_name":"attach","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_methods/{payment_method}/attach"},{"method_name":"detach","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_methods/{payment_method}/detach"}],"x-stripeResource":{"class_name":"PaymentMethod","has_collection_class":true,"in_package":""}},"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"}},"required":["bank_name","fingerprint","institution_number","last4","transit_number"],"title":"payment_method_acss_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_name","fingerprint","institution_number","last4","transit_number"]},"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"}},"required":["bsb_number","fingerprint","last4"],"title":"payment_method_au_becs_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bsb_number","fingerprint","last4"]},"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"}},"required":["fingerprint","last4","sort_code"],"title":"payment_method_bacs_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["fingerprint","last4","sort_code"]},"payment_method_bancontact":{"description":"","properties":{},"title":"payment_method_bancontact","type":"object","x-expandableFields":[]},"payment_method_billie":{"description":"","properties":{},"title":"payment_method_billie","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":[],"x-stripeMostCommon":["tax_id"]},"payment_method_card":{"description":"","properties":{"brand":{"description":"Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.","maxLength":5000,"type":"string"},"checks":{"anyOf":[{"$ref":"#/$defs/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"},"description":{"description":"A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)","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":"#/$defs/payment_method_card_generated_card"}],"description":"Details of the original PaymentMethod that created this object.","nullable":true},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"last4":{"description":"The last four digits of the card.","maxLength":5000,"type":"string"},"networks":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/three_d_secure_usage"}],"description":"Contains details on how this Card may be used for 3D Secure authentication.","nullable":true},"wallet":{"anyOf":[{"$ref":"#/$defs/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","checks","country","display_brand","exp_month","exp_year","funding","generated_from","last4","networks","regulated_status","three_d_secure_usage","wallet"],"title":"payment_method_card","type":"object","x-expandableFields":["checks","generated_from","networks","three_d_secure_usage","wallet"],"x-stripeMostCommon":["brand","checks","country","description","display_brand","exp_month","exp_year","fingerprint","funding","generated_from","iin","issuer","last4","networks","regulated_status","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"}},"required":["address_line1_check","address_postal_code_check","cvc_check"],"title":"payment_method_card_checks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["address_line1_check","address_postal_code_check","cvc_check"]},"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":"#/$defs/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":"#/$defs/setup_attempt"}],"description":"The ID of the SetupAttempt that generated this PaymentMethod, if any.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/setup_attempt"}]}}},"required":["charge","payment_method_details","setup_attempt"],"title":"payment_method_card_generated_card","type":"object","x-expandableFields":["payment_method_details","setup_attempt"],"x-stripeMostCommon":["charge","payment_method_details","setup_attempt"]},"payment_method_card_present":{"description":"","properties":{"brand":{"description":"Card brand. Can be `amex`, `cartes_bancaires`, `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. (For internal use only and not typically available in standard API requests.)","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"},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"last4":{"description":"The last four digits of the card.","maxLength":5000,"nullable":true,"type":"string"},"networks":{"anyOf":[{"$ref":"#/$defs/payment_method_card_present_networks"}],"description":"Contains information about card networks that can be used to process the payment.","nullable":true},"offline":{"anyOf":[{"$ref":"#/$defs/payment_method_details_card_present_offline"}],"description":"Details about payment methods collected offline.","nullable":true},"preferred_locales":{"description":"The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.","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":"#/$defs/payment_flows_private_payment_methods_card_present_common_wallet"}},"required":["brand","brand_product","cardholder_name","country","exp_month","exp_year","fingerprint","funding","last4","networks","offline","preferred_locales","read_method"],"title":"payment_method_card_present","type":"object","x-expandableFields":["networks","offline","wallet"],"x-stripeMostCommon":["brand","brand_product","cardholder_name","country","description","exp_month","exp_year","fingerprint","funding","iin","issuer","last4","networks","offline","preferred_locales","read_method","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","preferred"],"title":"payment_method_card_present_networks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["available","preferred"]},"payment_method_card_wallet":{"description":"","properties":{"amex_express_checkout":{"$ref":"#/$defs/payment_method_card_wallet_amex_express_checkout"},"apple_pay":{"$ref":"#/$defs/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":"#/$defs/payment_method_card_wallet_google_pay"},"link":{"$ref":"#/$defs/payment_method_card_wallet_link"},"masterpass":{"$ref":"#/$defs/payment_method_card_wallet_masterpass"},"samsung_pay":{"$ref":"#/$defs/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":"#/$defs/payment_method_card_wallet_visa_checkout"}},"required":["dynamic_last4","type"],"title":"payment_method_card_wallet","type":"object","x-expandableFields":["amex_express_checkout","apple_pay","google_pay","link","masterpass","samsung_pay","visa_checkout"],"x-stripeMostCommon":["amex_express_checkout","apple_pay","dynamic_last4","google_pay","link","masterpass","samsung_pay","type","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":"#/$defs/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":"#/$defs/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}},"required":["billing_address","email","name","shipping_address"],"title":"payment_method_card_wallet_masterpass","type":"object","x-expandableFields":["billing_address","shipping_address"],"x-stripeMostCommon":["billing_address","email","name","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":"#/$defs/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":"#/$defs/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}},"required":["billing_address","email","name","shipping_address"],"title":"payment_method_card_wallet_visa_checkout","type":"object","x-expandableFields":["billing_address","shipping_address"],"x-stripeMostCommon":["billing_address","email","name","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"}},"required":["buyer_id","cashtag"],"title":"payment_method_cashapp","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","cashtag"]},"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","parent"],"title":"PaymentMethodConfigBizPaymentMethodConfigurationDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["id","parent"]},"payment_method_crypto":{"description":"","properties":{},"title":"payment_method_crypto","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"Crypto","in_package":""}},"payment_method_custom":{"description":"","properties":{"display_name":{"description":"Display name of the Dashboard-only CustomPaymentMethodType.","maxLength":5000,"nullable":true,"type":"string"},"logo":{"anyOf":[{"$ref":"#/$defs/custom_logo"}],"description":"Contains information about the Dashboard-only CustomPaymentMethodType logo.","nullable":true},"type":{"description":"ID of the Dashboard-only CustomPaymentMethodType. Not expandable.","maxLength":5000,"type":"string"}},"required":["display_name","logo","type"],"title":"payment_method_custom","type":"object","x-expandableFields":["logo"],"x-stripeMostCommon":["display_name","logo","type"],"x-stripeResource":{"class_name":"Custom","in_package":""}},"payment_method_customer_balance":{"description":"","properties":{},"title":"payment_method_customer_balance","type":"object","x-expandableFields":[]},"payment_method_details":{"description":"","properties":{"ach_credit_transfer":{"$ref":"#/$defs/payment_method_details_ach_credit_transfer"},"ach_debit":{"$ref":"#/$defs/payment_method_details_ach_debit"},"acss_debit":{"$ref":"#/$defs/payment_method_details_acss_debit"},"affirm":{"$ref":"#/$defs/payment_method_details_affirm"},"afterpay_clearpay":{"$ref":"#/$defs/payment_method_details_afterpay_clearpay"},"alipay":{"$ref":"#/$defs/payment_flows_private_payment_methods_alipay_details"},"alma":{"$ref":"#/$defs/payment_method_details_alma"},"amazon_pay":{"$ref":"#/$defs/payment_method_details_amazon_pay"},"au_becs_debit":{"$ref":"#/$defs/payment_method_details_au_becs_debit"},"bacs_debit":{"$ref":"#/$defs/payment_method_details_bacs_debit"},"bancontact":{"$ref":"#/$defs/payment_method_details_bancontact"},"billie":{"$ref":"#/$defs/payment_method_details_billie"},"blik":{"$ref":"#/$defs/payment_method_details_blik"},"boleto":{"$ref":"#/$defs/payment_method_details_boleto"},"card":{"$ref":"#/$defs/payment_method_details_card"},"card_present":{"$ref":"#/$defs/payment_method_details_card_present"},"cashapp":{"$ref":"#/$defs/payment_method_details_cashapp"},"crypto":{"$ref":"#/$defs/payment_method_details_crypto"},"customer_balance":{"$ref":"#/$defs/payment_method_details_customer_balance"},"eps":{"$ref":"#/$defs/payment_method_details_eps"},"fpx":{"$ref":"#/$defs/payment_method_details_fpx"},"giropay":{"$ref":"#/$defs/payment_method_details_giropay"},"grabpay":{"$ref":"#/$defs/payment_method_details_grabpay"},"ideal":{"$ref":"#/$defs/payment_method_details_ideal"},"interac_present":{"$ref":"#/$defs/payment_method_details_interac_present"},"kakao_pay":{"$ref":"#/$defs/payment_method_details_kakao_pay"},"klarna":{"$ref":"#/$defs/payment_method_details_klarna"},"konbini":{"$ref":"#/$defs/payment_method_details_konbini"},"kr_card":{"$ref":"#/$defs/payment_method_details_kr_card"},"link":{"$ref":"#/$defs/payment_method_details_link"},"mb_way":{"$ref":"#/$defs/payment_method_details_mb_way"},"mobilepay":{"$ref":"#/$defs/payment_method_details_mobilepay"},"multibanco":{"$ref":"#/$defs/payment_method_details_multibanco"},"naver_pay":{"$ref":"#/$defs/payment_method_details_naver_pay"},"nz_bank_account":{"$ref":"#/$defs/payment_method_details_nz_bank_account"},"oxxo":{"$ref":"#/$defs/payment_method_details_oxxo"},"p24":{"$ref":"#/$defs/payment_method_details_p24"},"pay_by_bank":{"$ref":"#/$defs/payment_method_details_pay_by_bank"},"payco":{"$ref":"#/$defs/payment_method_details_payco"},"paynow":{"$ref":"#/$defs/payment_method_details_paynow"},"paypal":{"$ref":"#/$defs/payment_method_details_paypal"},"payto":{"$ref":"#/$defs/payment_method_details_payto"},"pix":{"$ref":"#/$defs/payment_method_details_pix"},"promptpay":{"$ref":"#/$defs/payment_method_details_promptpay"},"revolut_pay":{"$ref":"#/$defs/payment_method_details_revolut_pay"},"samsung_pay":{"$ref":"#/$defs/payment_method_details_samsung_pay"},"satispay":{"$ref":"#/$defs/payment_method_details_satispay"},"sepa_credit_transfer":{"$ref":"#/$defs/payment_method_details_sepa_credit_transfer"},"sepa_debit":{"$ref":"#/$defs/payment_method_details_sepa_debit"},"sofort":{"$ref":"#/$defs/payment_method_details_sofort"},"stripe_account":{"$ref":"#/$defs/payment_method_details_stripe_account"},"swish":{"$ref":"#/$defs/payment_method_details_swish"},"twint":{"$ref":"#/$defs/payment_method_details_twint"},"type":{"description":"The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://docs.stripe.com/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"},"upi":{"$ref":"#/$defs/payment_method_details_upi"},"us_bank_account":{"$ref":"#/$defs/payment_method_details_us_bank_account"},"wechat":{"$ref":"#/$defs/payment_method_details_wechat"},"wechat_pay":{"$ref":"#/$defs/payment_method_details_wechat_pay"},"zip":{"$ref":"#/$defs/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","billie","blik","boleto","card","card_present","cashapp","crypto","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_credit_transfer","sepa_debit","sofort","stripe_account","swish","twint","upi","us_bank_account","wechat","wechat_pay","zip"],"x-stripeMostCommon":["ach_credit_transfer","ach_debit","acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","blik","boleto","card","card_present","cashapp","crypto","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_credit_transfer","sepa_debit","sofort","stripe_account","swish","twint","type","upi","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"}},"required":["account_number","bank_name","routing_number","swift_code"],"title":"payment_method_details_ach_credit_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_number","bank_name","routing_number","swift_code"]},"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"}},"required":["account_holder_type","bank_name","country","fingerprint","last4","routing_number"],"title":"payment_method_details_ach_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_holder_type","bank_name","country","fingerprint","last4","routing_number"]},"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"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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"}},"required":["bank_name","fingerprint","institution_number","last4","transit_number"],"title":"payment_method_details_acss_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_name","expected_debit_date","fingerprint","institution_number","last4","mandate","transit_number"]},"payment_method_details_affirm":{"description":"","properties":{"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"type":"string"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"transaction_id":{"description":"The Affirm transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_affirm","type":"object","x-expandableFields":[],"x-stripeMostCommon":["location","reader","transaction_id"]},"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"}},"required":["order_id","reference"],"title":"payment_method_details_afterpay_clearpay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["order_id","reference"]},"payment_method_details_alma":{"description":"","properties":{"installments":{"$ref":"#/$defs/alma_installments"},"transaction_id":{"description":"The Alma transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_alma","type":"object","x-expandableFields":["installments"],"x-stripeMostCommon":["installments","transaction_id"]},"payment_method_details_amazon_pay":{"description":"","properties":{"funding":{"$ref":"#/$defs/amazon_pay_underlying_payment_method_funding_details"},"transaction_id":{"description":"The Amazon Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_amazon_pay","type":"object","x-expandableFields":["funding"],"x-stripeMostCommon":["funding","transaction_id"]},"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"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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"}},"required":["bsb_number","fingerprint","last4"],"title":"payment_method_details_au_becs_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bsb_number","expected_debit_date","fingerprint","last4","mandate"]},"payment_method_details_bacs_debit":{"description":"","properties":{"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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,"nullable":true,"type":"string"},"sort_code":{"description":"Sort code of the bank account. (e.g., `10-20-30`)","maxLength":5000,"nullable":true,"type":"string"}},"required":["fingerprint","last4","mandate","sort_code"],"title":"payment_method_details_bacs_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["expected_debit_date","fingerprint","last4","mandate","sort_code"]},"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":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"}},"required":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"title":"payment_method_details_bancontact","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"]},"payment_method_details_billie":{"description":"","properties":{"transaction_id":{"description":"The Billie transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_billie","type":"object","x-expandableFields":[],"x-stripeMostCommon":["transaction_id"]},"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"}},"required":["buyer_id"],"title":"payment_method_details_blik","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id"]},"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":[],"x-stripeMostCommon":["tax_id"]},"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`, `cartes_bancaires`, `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":"#/$defs/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"},"description":{"description":"A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)","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":"#/$defs/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"},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"incremental_authorization":{"$ref":"#/$defs/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization"},"installments":{"anyOf":[{"$ref":"#/$defs/payment_method_details_card_installments"}],"description":"Installment details for this payment.\n\nFor more information, see the [installments integration guide](https://docs.stripe.com/payments/installments).","nullable":true},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"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"},"moto":{"description":"True if this payment was marked as MOTO and out of scope for SCA.","nullable":true,"type":"boolean"},"multicapture":{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/three_d_secure_details_charge"}],"description":"Populated if this transaction used 3D Secure authentication.","nullable":true},"wallet":{"anyOf":[{"$ref":"#/$defs/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":["amount_authorized","authorization_code","brand","checks","country","exp_month","exp_year","funding","installments","last4","mandate","network","network_transaction_id","regulated_status","three_d_secure","wallet"],"title":"payment_method_details_card","type":"object","x-expandableFields":["checks","extended_authorization","incremental_authorization","installments","multicapture","network_token","overcapture","three_d_secure","wallet"],"x-stripeMostCommon":["amount_authorized","authorization_code","brand","capture_before","checks","country","description","exp_month","exp_year","extended_authorization","fingerprint","funding","iin","incremental_authorization","installments","issuer","last4","mandate","moto","multicapture","network","network_token","network_transaction_id","overcapture","regulated_status","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"}},"required":["address_line1_check","address_postal_code_check","cvc_check"],"title":"payment_method_details_card_checks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["address_line1_check","address_postal_code_check","cvc_check"]},"payment_method_details_card_installments":{"description":"","properties":{"plan":{"anyOf":[{"$ref":"#/$defs/payment_method_details_card_installments_plan"}],"description":"Installment plan selected for the payment.","nullable":true}},"required":["plan"],"title":"payment_method_details_card_installments","type":"object","x-expandableFields":["plan"],"x-stripeMostCommon":["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`, `bonus`, or `revolving`.","enum":["bonus","fixed_count","revolving"],"type":"string"}},"required":["count","interval","type"],"title":"payment_method_details_card_installments_plan","type":"object","x-expandableFields":[],"x-stripeMostCommon":["count","interval","type"]},"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":[],"x-stripeMostCommon":["used"]},"payment_method_details_card_present":{"description":"","properties":{"amount_authorized":{"description":"The authorized amount","nullable":true,"type":"integer"},"brand":{"description":"Card brand. Can be `amex`, `cartes_bancaires`, `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. (For internal use only and not typically available in standard API requests.)","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"},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"incremental_authorization_supported":{"description":"Whether this [PaymentIntent](https://docs.stripe.com/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://docs.stripe.com/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. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"last4":{"description":"The last four digits of the card.","maxLength":5000,"nullable":true,"type":"string"},"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"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":"#/$defs/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":"The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.","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"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"receipt":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/payment_flows_private_payment_methods_card_present_common_wallet"}},"required":["amount_authorized","brand","brand_product","cardholder_name","country","emv_auth_data","exp_month","exp_year","fingerprint","funding","generated_card","incremental_authorization_supported","last4","network","network_transaction_id","offline","overcapture_supported","preferred_locales","read_method","receipt"],"title":"payment_method_details_card_present","type":"object","x-expandableFields":["offline","receipt","wallet"],"x-stripeMostCommon":["amount_authorized","brand","brand_product","capture_before","cardholder_name","country","description","emv_auth_data","exp_month","exp_year","fingerprint","funding","generated_card","iin","incremental_authorization_supported","issuer","last4","location","network","network_transaction_id","offline","overcapture_supported","preferred_locales","read_method","reader","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"}},"required":["stored_at","type"],"title":"payment_method_details_card_present_offline","type":"object","x-expandableFields":[],"x-stripeMostCommon":["stored_at","type"],"x-stripeResource":{"class_name":"Offline","in_package":""}},"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":"The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.","maxLength":5000,"nullable":true,"type":"string"},"application_preferred_name":{"description":"The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.","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":"Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.","maxLength":5000,"nullable":true,"type":"string"},"terminal_verification_results":{"description":"A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.","maxLength":5000,"nullable":true,"type":"string"},"transaction_status_information":{"description":"An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.","maxLength":5000,"nullable":true,"type":"string"}},"required":["application_cryptogram","application_preferred_name","authorization_code","authorization_response_code","cardholder_verification_method","dedicated_file_name","terminal_verification_results","transaction_status_information"],"title":"payment_method_details_card_present_receipt","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_type","application_cryptogram","application_preferred_name","authorization_code","authorization_response_code","cardholder_verification_method","dedicated_file_name","terminal_verification_results","transaction_status_information"]},"payment_method_details_card_wallet":{"description":"","properties":{"amex_express_checkout":{"$ref":"#/$defs/payment_method_details_card_wallet_amex_express_checkout"},"apple_pay":{"$ref":"#/$defs/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":"#/$defs/payment_method_details_card_wallet_google_pay"},"link":{"$ref":"#/$defs/payment_method_details_card_wallet_link"},"masterpass":{"$ref":"#/$defs/payment_method_details_card_wallet_masterpass"},"samsung_pay":{"$ref":"#/$defs/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":"#/$defs/payment_method_details_card_wallet_visa_checkout"}},"required":["dynamic_last4","type"],"title":"payment_method_details_card_wallet","type":"object","x-expandableFields":["amex_express_checkout","apple_pay","google_pay","link","masterpass","samsung_pay","visa_checkout"],"x-stripeMostCommon":["amex_express_checkout","apple_pay","dynamic_last4","google_pay","link","masterpass","samsung_pay","type","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":"#/$defs/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":"#/$defs/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}},"required":["billing_address","email","name","shipping_address"],"title":"payment_method_details_card_wallet_masterpass","type":"object","x-expandableFields":["billing_address","shipping_address"],"x-stripeMostCommon":["billing_address","email","name","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":"#/$defs/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":"#/$defs/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}},"required":["billing_address","email","name","shipping_address"],"title":"payment_method_details_card_wallet_visa_checkout","type":"object","x-expandableFields":["billing_address","shipping_address"],"x-stripeMostCommon":["billing_address","email","name","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"},"transaction_id":{"description":"A unique and immutable identifier of payments assigned by Cash App","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","cashtag","transaction_id"],"title":"payment_method_details_cashapp","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","cashtag","transaction_id"]},"payment_method_details_crypto":{"description":"","properties":{"buyer_address":{"description":"The wallet address of the customer.","maxLength":5000,"type":"string"},"network":{"description":"The blockchain network that the transaction was sent on.","enum":["base","ethereum","polygon","solana","tempo"],"type":"string"},"token_currency":{"description":"The token currency that the transaction was sent with.","enum":["usdc","usdg","usdp"],"type":"string","x-stripeBypassValidation":true},"transaction_hash":{"description":"The blockchain transaction hash of the crypto payment.","maxLength":5000,"type":"string"}},"title":"payment_method_details_crypto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_address","network","token_currency","transaction_hash"],"x-stripeResource":{"class_name":"Crypto","in_package":""}},"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"}},"required":["bank","verified_name"],"title":"payment_method_details_eps","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank","verified_name"]},"payment_method_details_fpx":{"description":"","properties":{"account_holder_type":{"description":"Account holder type, if provided. Can be one of `individual` or `company`.","enum":["company","individual"],"nullable":true,"type":"string"},"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":["account_holder_type","bank","transaction_id"],"title":"payment_method_details_fpx","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_holder_type","bank","transaction_id"]},"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"}},"required":["bank_code","bank_name","bic","verified_name"],"title":"payment_method_details_giropay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_code","bank_name","bic","verified_name"]},"payment_method_details_grabpay":{"description":"","properties":{"transaction_id":{"description":"Unique transaction id generated by GrabPay","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_grabpay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["transaction_id"]},"payment_method_details_ideal":{"description":"","properties":{"bank":{"description":"The customer's bank. Can be one of `abn_amro`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.","enum":["abn_amro","adyen","asn_bank","bunq","buut","finom","handelsbanken","ing","knab","mollie","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","ADYBNL2A","ASNBNL21","BITSNL2A","BUNQNL2A","BUUTNL2A","FNOMNL22","FVLBNL22","HANDNL2A","INGBNL2A","KNABNL2H","MLLENL2A","MOYONL21","NNBANL2G","NTSBDEB1","RABONL2U","RBRBNL21","REVOIE23","REVOLT21","SNSBNL2A","TRIONL2U"],"nullable":true,"type":"string"},"generated_sepa_debit":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/mandate"}]}},"iban_last4":{"description":"Last four characters of the IBAN.","maxLength":5000,"nullable":true,"type":"string"},"transaction_id":{"description":"Unique transaction ID generated by iDEAL.","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"}},"required":["bank","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","transaction_id","verified_name"],"title":"payment_method_details_ideal","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","transaction_id","verified_name"]},"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. (For internal use only and not typically available in standard API requests.)","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"},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"last4":{"description":"The last four digits of the card.","maxLength":5000,"nullable":true,"type":"string"},"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"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":"The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.","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"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"receipt":{"anyOf":[{"$ref":"#/$defs/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":["brand","cardholder_name","country","emv_auth_data","exp_month","exp_year","fingerprint","funding","generated_card","last4","network","network_transaction_id","preferred_locales","read_method","receipt"],"title":"payment_method_details_interac_present","type":"object","x-expandableFields":["receipt"],"x-stripeMostCommon":["brand","cardholder_name","country","description","emv_auth_data","exp_month","exp_year","fingerprint","funding","generated_card","iin","issuer","last4","location","network","network_transaction_id","preferred_locales","read_method","reader","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":"The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.","maxLength":5000,"nullable":true,"type":"string"},"application_preferred_name":{"description":"The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.","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":"Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.","maxLength":5000,"nullable":true,"type":"string"},"terminal_verification_results":{"description":"A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.","maxLength":5000,"nullable":true,"type":"string"},"transaction_status_information":{"description":"An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.","maxLength":5000,"nullable":true,"type":"string"}},"required":["application_cryptogram","application_preferred_name","authorization_code","authorization_response_code","cardholder_verification_method","dedicated_file_name","terminal_verification_results","transaction_status_information"],"title":"payment_method_details_interac_present_receipt","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_type","application_cryptogram","application_preferred_name","authorization_code","authorization_response_code","cardholder_verification_method","dedicated_file_name","terminal_verification_results","transaction_status_information"],"x-stripeResource":{"class_name":"Receipt","in_package":""}},"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"},"transaction_id":{"description":"The Kakao Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_kakao_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"KakaoPay","in_package":""}},"payment_method_details_klarna":{"description":"","properties":{"payer_details":{"anyOf":[{"$ref":"#/$defs/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"}},"required":["payer_details","payment_method_category","preferred_locale"],"title":"payment_method_details_klarna","type":"object","x-expandableFields":["payer_details"],"x-stripeMostCommon":["payer_details","payment_method_category","preferred_locale"]},"payment_method_details_konbini":{"description":"","properties":{"store":{"anyOf":[{"$ref":"#/$defs/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}},"required":["store"],"title":"payment_method_details_konbini","type":"object","x-expandableFields":["store"],"x-stripeMostCommon":["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","x-stripeBypassValidation":true}},"required":["chain"],"title":"payment_method_details_konbini_store","type":"object","x-expandableFields":[],"x-stripeMostCommon":["chain"]},"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"},"transaction_id":{"description":"The Korean Card transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["brand","buyer_id","last4","transaction_id"],"title":"payment_method_details_kr_card","type":"object","x-expandableFields":[],"x-stripeMostCommon":["brand","buyer_id","last4","transaction_id"],"x-stripeResource":{"class_name":"KrCard","in_package":""}},"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"}},"required":["country"],"title":"payment_method_details_link","type":"object","x-expandableFields":[],"x-stripeMostCommon":["country"]},"payment_method_details_mb_way":{"description":"","properties":{},"title":"payment_method_details_mb_way","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"MbWay","in_package":""}},"payment_method_details_mobilepay":{"description":"","properties":{"card":{"anyOf":[{"$ref":"#/$defs/internal_card"}],"description":"Internal card details","nullable":true}},"required":["card"],"title":"payment_method_details_mobilepay","type":"object","x-expandableFields":["card"],"x-stripeMostCommon":["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"}},"required":["entity","reference"],"title":"payment_method_details_multibanco","type":"object","x-expandableFields":[],"x-stripeMostCommon":["entity","reference"]},"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"},"transaction_id":{"description":"The Naver Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_naver_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"NaverPay","in_package":""}},"payment_method_details_nz_bank_account":{"description":"","properties":{"account_holder_name":{"description":"The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.","maxLength":5000,"nullable":true,"type":"string"},"bank_code":{"description":"The numeric code for the bank account's bank.","maxLength":5000,"type":"string"},"bank_name":{"description":"The name of the bank.","maxLength":5000,"type":"string"},"branch_code":{"description":"The numeric code for the bank account's bank branch.","maxLength":5000,"type":"string"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"type":"string"},"last4":{"description":"Last four digits of the bank account number.","maxLength":5000,"type":"string"},"suffix":{"description":"The suffix of the bank account number.","maxLength":5000,"nullable":true,"type":"string"}},"required":["account_holder_name","bank_code","bank_name","branch_code","last4","suffix"],"title":"payment_method_details_nz_bank_account","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_holder_name","bank_code","bank_name","branch_code","expected_debit_date","last4","suffix"]},"payment_method_details_oxxo":{"description":"","properties":{"number":{"description":"OXXO reference number","maxLength":5000,"nullable":true,"type":"string"}},"required":["number"],"title":"payment_method_details_oxxo","type":"object","x-expandableFields":[],"x-stripeMostCommon":["number"]},"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"}},"required":["bank","reference","verified_name"],"title":"payment_method_details_p24","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank","reference","verified_name"]},"payment_method_details_passthrough_card":{"description":"","properties":{"brand":{"description":"Card brand. Can be `amex`, `cartes_bancaires`, `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"}},"required":["brand","country","exp_month","exp_year","funding","last4"],"title":"payment_method_details_passthrough_card","type":"object","x-expandableFields":[],"x-stripeMostCommon":["brand","country","exp_month","exp_year","funding","last4"]},"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"},"transaction_id":{"description":"The Payco transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_payco","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"Payco","in_package":""}},"payment_method_details_payment_record_affirm":{"description":"","properties":{"location":{"description":"ID of the location that this reader is assigned to.","maxLength":5000,"type":"string"},"reader":{"description":"ID of the reader this transaction was made on.","maxLength":5000,"type":"string"},"transaction_id":{"description":"The Affirm transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_payment_record_affirm","type":"object","x-expandableFields":[],"x-stripeMostCommon":["location","reader","transaction_id"]},"payment_method_details_payment_record_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"}},"required":["order_id","reference"],"title":"payment_method_details_payment_record_afterpay_clearpay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["order_id","reference"]},"payment_method_details_payment_record_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":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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. Can 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 (if supported) at the time of authorization or settlement. They cannot be set or mutated.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"title":"payment_method_details_payment_record_bancontact","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"]},"payment_method_details_payment_record_boleto":{"description":"","properties":{"tax_id":{"description":"The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)","maxLength":5000,"nullable":true,"type":"string"}},"required":["tax_id"],"title":"payment_method_details_payment_record_boleto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["tax_id"]},"payment_method_details_payment_record_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"},"transaction_id":{"description":"A unique and immutable identifier of payments assigned by Cash App.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","cashtag","transaction_id"],"title":"payment_method_details_payment_record_cashapp","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","cashtag","transaction_id"]},"payment_method_details_payment_record_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 (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.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank_code","bank_name","bic","verified_name"],"title":"payment_method_details_payment_record_giropay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_code","bank_name","bic","verified_name"]},"payment_method_details_payment_record_ideal":{"description":"","properties":{"bank":{"description":"The customer's bank. Can be one of `abn_amro`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.","enum":["abn_amro","adyen","asn_bank","bunq","buut","finom","handelsbanken","ing","knab","mollie","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","ADYBNL2A","ASNBNL21","BITSNL2A","BUNQNL2A","BUUTNL2A","FNOMNL22","FVLBNL22","HANDNL2A","INGBNL2A","KNABNL2H","MLLENL2A","MOYONL21","NNBANL2G","NTSBDEB1","RABONL2U","RBRBNL21","REVOIE23","REVOLT21","SNSBNL2A","TRIONL2U"],"nullable":true,"type":"string"},"generated_sepa_debit":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/mandate"}]}},"iban_last4":{"description":"Last four characters of the IBAN.","maxLength":5000,"nullable":true,"type":"string"},"transaction_id":{"description":"Unique transaction ID generated by iDEAL.","maxLength":5000,"nullable":true,"type":"string"},"verified_name":{"description":"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.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","transaction_id","verified_name"],"title":"payment_method_details_payment_record_ideal","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","transaction_id","verified_name"]},"payment_method_details_payment_record_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"},"transaction_id":{"description":"The Kakao Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_payment_record_kakao_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"KakaoPay","in_package":""}},"payment_method_details_payment_record_konbini":{"description":"","properties":{"store":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_konbini_details_resource_store"}],"description":"If the payment succeeded, this contains the details of the convenience store where the payment was completed.","nullable":true}},"required":["store"],"title":"payment_method_details_payment_record_konbini","type":"object","x-expandableFields":["store"],"x-stripeMostCommon":["store"]},"payment_method_details_payment_record_mb_way":{"description":"","properties":{},"title":"payment_method_details_payment_record_mb_way","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"MbWay","in_package":""}},"payment_method_details_payment_record_mobilepay":{"description":"","properties":{"card":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_mobilepay_details_resource_card"}],"description":"Internal card details","nullable":true}},"required":["card"],"title":"payment_method_details_payment_record_mobilepay","type":"object","x-expandableFields":["card"],"x-stripeMostCommon":["card"]},"payment_method_details_payment_record_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"}},"required":["entity","reference"],"title":"payment_method_details_payment_record_multibanco","type":"object","x-expandableFields":[],"x-stripeMostCommon":["entity","reference"]},"payment_method_details_payment_record_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"},"transaction_id":{"description":"The Naver Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_payment_record_naver_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"]},"payment_method_details_payment_record_oxxo":{"description":"","properties":{"number":{"description":"OXXO reference number","maxLength":5000,"nullable":true,"type":"string"}},"required":["number"],"title":"payment_method_details_payment_record_oxxo","type":"object","x-expandableFields":[],"x-stripeMostCommon":["number"]},"payment_method_details_payment_record_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"},"transaction_id":{"description":"The Payco transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_payment_record_payco","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"Payco","in_package":""}},"payment_method_details_payment_record_paynow":{"description":"","properties":{"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"type":"string"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"reference":{"description":"Reference number associated with this PayNow payment","maxLength":5000,"nullable":true,"type":"string"}},"required":["reference"],"title":"payment_method_details_payment_record_paynow","type":"object","x-expandableFields":[],"x-stripeMostCommon":["location","reader","reference"]},"payment_method_details_payment_record_pix":{"description":"","properties":{"bank_transaction_id":{"description":"Unique transaction id generated by BCB","maxLength":5000,"nullable":true,"type":"string"}},"title":"payment_method_details_payment_record_pix","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_transaction_id"]},"payment_method_details_payment_record_promptpay":{"description":"","properties":{"reference":{"description":"Bill reference generated by PromptPay","maxLength":5000,"nullable":true,"type":"string"}},"required":["reference"],"title":"payment_method_details_payment_record_promptpay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference"]},"payment_method_details_payment_record_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"},"transaction_id":{"description":"The Samsung Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_payment_record_samsung_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"SamsungPay","in_package":""}},"payment_method_details_payment_record_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"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve).","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank_code","branch_code","country","fingerprint","last4","mandate"],"title":"payment_method_details_payment_record_sepa_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_code","branch_code","country","expected_debit_date","fingerprint","last4","mandate"]},"payment_method_details_payment_record_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":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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. Can 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 (if supported) at the time of authorization or settlement. They cannot be set or mutated.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank_code","bank_name","bic","country","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"title":"payment_method_details_payment_record_sofort","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank_code","bank_name","bic","country","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"]},"payment_method_details_payment_record_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"}},"required":["fingerprint","payment_reference","verified_phone_last4"],"title":"payment_method_details_payment_record_swish","type":"object","x-expandableFields":[],"x-stripeMostCommon":["fingerprint","payment_reference","verified_phone_last4"]},"payment_method_details_payment_record_twint":{"description":"","properties":{},"title":"payment_method_details_payment_record_twint","type":"object","x-expandableFields":[]},"payment_method_details_payment_record_us_bank_account":{"description":"","properties":{"account_holder_type":{"description":"The type of entity that holds the account. This can be either 'individual' or 'company'.","enum":["company","individual"],"nullable":true,"type":"string"},"account_type":{"description":"The type of the bank account. This can be either 'checking' or 'savings'.","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"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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":"#/$defs/mandate"}],"description":"ID of the mandate used to make this payment.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/mandate"}]}},"payment_reference":{"description":"The ACH payment reference for this transaction.","maxLength":5000,"nullable":true,"type":"string"},"routing_number":{"description":"The routing number for the bank account.","maxLength":5000,"nullable":true,"type":"string"}},"required":["account_holder_type","account_type","bank_name","fingerprint","last4","payment_reference","routing_number"],"title":"payment_method_details_payment_record_us_bank_account","type":"object","x-expandableFields":["mandate"],"x-stripeMostCommon":["account_holder_type","account_type","bank_name","expected_debit_date","fingerprint","last4","mandate","payment_reference","routing_number"]},"payment_method_details_payment_record_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"},"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"type":"string"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"transaction_id":{"description":"Transaction ID of this particular WeChat Pay transaction.","maxLength":5000,"nullable":true,"type":"string"}},"required":["fingerprint","transaction_id"],"title":"payment_method_details_payment_record_wechat_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["fingerprint","location","reader","transaction_id"]},"payment_method_details_payment_record_zip":{"description":"","properties":{},"title":"payment_method_details_payment_record_zip","type":"object","x-expandableFields":[]},"payment_method_details_paynow":{"description":"","properties":{"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"type":"string"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"reference":{"description":"Reference number associated with this PayNow payment","maxLength":5000,"nullable":true,"type":"string"}},"required":["reference"],"title":"payment_method_details_paynow","type":"object","x-expandableFields":[],"x-stripeMostCommon":["location","reader","reference"]},"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":"#/$defs/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"}},"required":["country","payer_email","payer_id","payer_name","seller_protection","transaction_id"],"title":"payment_method_details_paypal","type":"object","x-expandableFields":["seller_protection"],"x-stripeMostCommon":["country","payer_email","payer_id","payer_name","seller_protection","transaction_id"]},"payment_method_details_payto":{"description":"","properties":{"bsb_number":{"description":"Bank-State-Branch 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"},"pay_id":{"description":"The PayID alias for the bank account.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bsb_number","last4","pay_id"],"title":"payment_method_details_payto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bsb_number","last4","mandate","pay_id"]},"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":[],"x-stripeMostCommon":["bank_transaction_id"]},"payment_method_details_promptpay":{"description":"","properties":{"reference":{"description":"Bill reference generated by PromptPay","maxLength":5000,"nullable":true,"type":"string"}},"required":["reference"],"title":"payment_method_details_promptpay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference"]},"payment_method_details_revolut_pay":{"description":"","properties":{"funding":{"$ref":"#/$defs/revolut_pay_underlying_payment_method_funding_details"},"transaction_id":{"description":"The Revolut Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_revolut_pay","type":"object","x-expandableFields":["funding"],"x-stripeMostCommon":["funding","transaction_id"]},"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"},"transaction_id":{"description":"The Samsung Pay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["buyer_id","transaction_id"],"title":"payment_method_details_samsung_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","transaction_id"],"x-stripeResource":{"class_name":"SamsungPay","in_package":""}},"payment_method_details_satispay":{"description":"","properties":{"transaction_id":{"description":"The Satispay transaction ID associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["transaction_id"],"title":"payment_method_details_satispay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["transaction_id"]},"payment_method_details_sepa_credit_transfer":{"description":"","properties":{"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"},"iban":{"description":"IBAN of the bank account to transfer funds to.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank_name","bic","iban"],"title":"payment_method_details_sepa_credit_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_name","bic","iban"]},"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"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve).","maxLength":5000,"nullable":true,"type":"string"}},"required":["bank_code","branch_code","country","fingerprint","last4","mandate"],"title":"payment_method_details_sepa_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank_code","branch_code","country","expected_debit_date","fingerprint","last4","mandate"]},"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":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"}},"required":["bank_code","bank_name","bic","country","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"title":"payment_method_details_sofort","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank_code","bank_name","bic","country","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"]},"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"}},"required":["fingerprint","payment_reference","verified_phone_last4"],"title":"payment_method_details_swish","type":"object","x-expandableFields":[],"x-stripeMostCommon":["fingerprint","payment_reference","verified_phone_last4"]},"payment_method_details_twint":{"description":"","properties":{},"title":"payment_method_details_twint","type":"object","x-expandableFields":[]},"payment_method_details_upi":{"description":"","properties":{"vpa":{"description":"Customer's unique Virtual Payment Address.","maxLength":5000,"nullable":true,"type":"string"}},"required":["vpa"],"title":"payment_method_details_upi","type":"object","x-expandableFields":[],"x-stripeMostCommon":["vpa"]},"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"},"expected_debit_date":{"description":"Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.","maxLength":5000,"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":"#/$defs/mandate"}],"description":"ID of the mandate used to make this payment.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"}},"required":["account_holder_type","account_type","bank_name","fingerprint","last4","payment_reference","routing_number"],"title":"payment_method_details_us_bank_account","type":"object","x-expandableFields":["mandate"],"x-stripeMostCommon":["account_holder_type","account_type","bank_name","expected_debit_date","fingerprint","last4","mandate","payment_reference","routing_number"]},"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"},"location":{"description":"ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.","maxLength":5000,"type":"string"},"reader":{"description":"ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.","maxLength":5000,"type":"string"},"transaction_id":{"description":"Transaction ID of this particular WeChat Pay transaction.","maxLength":5000,"nullable":true,"type":"string"}},"required":["fingerprint","transaction_id"],"title":"payment_method_details_wechat_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["fingerprint","location","reader","transaction_id"]},"payment_method_details_zip":{"description":"","properties":{},"title":"payment_method_details_zip","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"}},"required":["bank"],"title":"payment_method_eps","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank"]},"payment_method_fpx":{"description":"","properties":{"account_holder_type":{"description":"Account holder type, if provided. Can be one of `individual` or `company`.","enum":["company","individual"],"nullable":true,"type":"string"},"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":["account_holder_type","bank"],"title":"payment_method_fpx","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_holder_type","bank"]},"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`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.","enum":["abn_amro","adyen","asn_bank","bunq","buut","finom","handelsbanken","ing","knab","mollie","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","ADYBNL2A","ASNBNL21","BITSNL2A","BUNQNL2A","BUUTNL2A","FNOMNL22","FVLBNL22","HANDNL2A","INGBNL2A","KNABNL2H","MLLENL2A","MOYONL21","NNBANL2G","NTSBDEB1","RABONL2U","RBRBNL21","REVOIE23","REVOLT21","SNSBNL2A","TRIONL2U"],"nullable":true,"type":"string"}},"required":["bank","bic"],"title":"payment_method_ideal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank","bic"]},"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. (For internal use only and not typically available in standard API requests.)","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"},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"last4":{"description":"The last four digits of the card.","maxLength":5000,"nullable":true,"type":"string"},"networks":{"anyOf":[{"$ref":"#/$defs/payment_method_card_present_networks"}],"description":"Contains information about card networks that can be used to process the payment.","nullable":true},"preferred_locales":{"description":"The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.","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":["brand","cardholder_name","country","exp_month","exp_year","fingerprint","funding","last4","networks","preferred_locales","read_method"],"title":"payment_method_interac_present","type":"object","x-expandableFields":["networks"],"x-stripeMostCommon":["brand","cardholder_name","country","description","exp_month","exp_year","fingerprint","funding","iin","issuer","last4","networks","preferred_locales","read_method"]},"payment_method_kakao_pay":{"description":"","properties":{},"title":"payment_method_kakao_pay","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"KakaoPay","in_package":""}},"payment_method_klarna":{"description":"","properties":{"dob":{"anyOf":[{"$ref":"#/$defs/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"],"x-stripeMostCommon":["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"}},"required":["brand","last4"],"title":"payment_method_kr_card","type":"object","x-expandableFields":[],"x-stripeMostCommon":["brand","last4"],"x-stripeResource":{"class_name":"KrCard","in_package":""}},"payment_method_link":{"description":"","properties":{"email":{"description":"Account owner's email address.","maxLength":5000,"nullable":true,"type":"string"},"persistent_token":{"description":"[Deprecated] This is a legacy parameter that no longer has any function.","maxLength":5000,"type":"string"}},"required":["email"],"title":"payment_method_link","type":"object","x-expandableFields":[],"x-stripeMostCommon":["email","persistent_token"]},"payment_method_mb_way":{"description":"","properties":{},"title":"payment_method_mb_way","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"MbWay","in_package":""}},"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":{"buyer_id":{"description":"Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.","maxLength":5000,"nullable":true,"type":"string"},"funding":{"description":"Whether to fund this transaction with Naver Pay points or a card.","enum":["card","points"],"type":"string","x-stripeBypassValidation":true}},"required":["buyer_id","funding"],"title":"payment_method_naver_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id","funding"],"x-stripeResource":{"class_name":"NaverPay","in_package":""}},"payment_method_nz_bank_account":{"description":"","properties":{"account_holder_name":{"description":"The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.","maxLength":5000,"nullable":true,"type":"string"},"bank_code":{"description":"The numeric code for the bank account's bank.","maxLength":5000,"type":"string"},"bank_name":{"description":"The name of the bank.","maxLength":5000,"type":"string"},"branch_code":{"description":"The numeric code for the bank account's bank branch.","maxLength":5000,"type":"string"},"last4":{"description":"Last four digits of the bank account number.","maxLength":5000,"type":"string"},"suffix":{"description":"The suffix of the bank account number.","maxLength":5000,"nullable":true,"type":"string"}},"required":["account_holder_name","bank_code","bank_name","branch_code","last4","suffix"],"title":"payment_method_nz_bank_account","type":"object","x-expandableFields":[],"x-stripeMostCommon":["account_holder_name","bank_code","bank_name","branch_code","last4","suffix"]},"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":[],"x-stripeMostCommon":["capture_method","preferred_locale","setup_future_usage"]},"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}},"required":["reference"],"title":"payment_method_options_afterpay_clearpay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method","reference","setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["capture_method"]},"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":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"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":[],"x-stripeMostCommon":["preferred_language","setup_future_usage"]},"payment_method_options_billie":{"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_billie","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method"]},"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":[],"x-stripeMostCommon":["expires_after_days","setup_future_usage"]},"payment_method_options_card_installments":{"description":"","properties":{"available_plans":{"description":"Installment plans that may be selected for this PaymentIntent.","items":{"$ref":"#/$defs/payment_method_details_card_installments_plan"},"nullable":true,"type":"array"},"enabled":{"description":"Whether Installments are enabled for this PaymentIntent.","type":"boolean"},"plan":{"anyOf":[{"$ref":"#/$defs/payment_method_details_card_installments_plan"}],"description":"Installment plan selected for this PaymentIntent.","nullable":true}},"required":["available_plans","enabled","plan"],"title":"payment_method_options_card_installments","type":"object","x-expandableFields":["available_plans","plan"],"x-stripeMostCommon":["available_plans","enabled","plan"]},"payment_method_options_card_mandate_options":{"description":"","properties":{"amount":{"description":"Amount to be charged for future payments, specified in the presentment currency.","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","description","end_date","interval","interval_count","reference","start_date","supported_types"],"title":"payment_method_options_card_mandate_options","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","description","end_date","interval","interval_count","reference","start_date","supported_types"],"x-stripeResource":{"class_name":"MandateOptions","in_package":""}},"payment_method_options_card_present":{"description":"","properties":{"capture_method":{"description":"Controls when the funds will be captured from the customer's account.","enum":["manual","manual_preferred"],"type":"string"},"request_extended_authorization":{"description":"Request ability to capture this payment beyond the standard [authorization validity window](https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity)","nullable":true,"type":"boolean"},"request_incremental_authorization_support":{"description":"Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support.","nullable":true,"type":"boolean"},"routing":{"$ref":"#/$defs/payment_method_options_card_present_routing"}},"required":["request_extended_authorization","request_incremental_authorization_support"],"title":"payment_method_options_card_present","type":"object","x-expandableFields":["routing"],"x-stripeMostCommon":["capture_method","request_extended_authorization","request_incremental_authorization_support","routing"]},"payment_method_options_card_present_routing":{"description":"","properties":{"requested_priority":{"description":"Requested routing priority","enum":["domestic","international"],"nullable":true,"type":"string"}},"required":["requested_priority"],"title":"payment_method_options_card_present_routing","type":"object","x-expandableFields":[],"x-stripeMostCommon":["requested_priority"],"x-stripeResource":{"class_name":"Routing","in_package":""}},"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":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"payment_method_options_crypto":{"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_method_options_crypto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["setup_future_usage"]},"payment_method_options_customer_balance":{"description":"","properties":{"bank_transfer":{"$ref":"#/$defs/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"}},"required":["funding_type"],"title":"payment_method_options_customer_balance","type":"object","x-expandableFields":["bank_transfer"],"x-stripeMostCommon":["bank_transfer","funding_type","setup_future_usage"]},"payment_method_options_customer_balance_bank_transfer":{"description":"","properties":{"eu_bank_transfer":{"$ref":"#/$defs/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}},"required":["type"],"title":"payment_method_options_customer_balance_bank_transfer","type":"object","x-expandableFields":["eu_bank_transfer"],"x-stripeMostCommon":["eu_bank_transfer","requested_address_types","type"]},"payment_method_options_customer_balance_eu_bank_account":{"description":"","properties":{"country":{"description":"The desired country code of the bank account information. Permitted values include: `DE`, `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":[],"x-stripeMostCommon":["country"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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","off_session","on_session"],"type":"string"}},"required":["preferred_locale"],"title":"payment_method_options_klarna","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method","preferred_locale","setup_future_usage"]},"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"}},"required":["confirmation_number","expires_after_days","expires_at","product_description"],"title":"payment_method_options_konbini","type":"object","x-expandableFields":[],"x-stripeMostCommon":["confirmation_number","expires_after_days","expires_at","product_description","setup_future_usage"]},"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":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"payment_method_options_mandate_options_upi":{"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":20,"nullable":true,"type":"string"},"end_date":{"description":"End date of the mandate or subscription.","format":"unix-time","nullable":true,"type":"integer"}},"required":["amount","amount_type","description","end_date"],"title":"payment_method_options_mandate_options_upi","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","description","end_date"]},"payment_method_options_mb_way":{"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_mb_way","type":"object","x-expandableFields":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["expires_after_days","setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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"}},"required":["preferred_locale","reference"],"title":"payment_method_options_paypal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method","preferred_locale","reference","setup_future_usage"]},"payment_method_options_pix":{"description":"","properties":{"amount_includes_iof":{"description":"Determines if the amount includes the IOF tax.","enum":["always","never"],"type":"string"},"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","x-stripeBypassValidation":true}},"required":["expires_after_seconds","expires_at"],"title":"payment_method_options_pix","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount_includes_iof","expires_after_seconds","expires_at","setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["capture_method","setup_future_usage"]},"payment_method_options_satispay":{"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_satispay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["capture_method"]},"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"}},"required":["preferred_language"],"title":"payment_method_options_sofort","type":"object","x-expandableFields":[],"x-stripeMostCommon":["preferred_language","setup_future_usage"]},"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","x-stripeBypassValidation":true}},"title":"payment_method_options_twint","type":"object","x-expandableFields":[],"x-stripeMostCommon":["setup_future_usage"]},"payment_method_options_upi":{"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":["off_session","on_session"],"type":"string"}},"title":"payment_method_options_upi","type":"object","x-expandableFields":[],"x-stripeMostCommon":["setup_future_usage"]},"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":[],"x-stripeMostCommon":["collection_method"]},"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"}},"required":["app_id","client"],"title":"payment_method_options_wechat_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["app_id","client","setup_future_usage"]},"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":[],"x-stripeMostCommon":["setup_future_usage"]},"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}},"required":["bank"],"title":"payment_method_p24","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bank"]},"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":[],"x-stripeResource":{"class_name":"Payco","in_package":""}},"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"}},"required":["country","payer_email","payer_id"],"title":"payment_method_paypal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["country","payer_email","payer_id"]},"payment_method_payto":{"description":"","properties":{"bsb_number":{"description":"Bank-State-Branch 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"},"pay_id":{"description":"The PayID alias for the bank account.","maxLength":5000,"nullable":true,"type":"string"}},"required":["bsb_number","last4","pay_id"],"title":"payment_method_payto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["bsb_number","last4","pay_id"]},"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":[],"x-stripeResource":{"class_name":"SamsungPay","in_package":""}},"payment_method_satispay":{"description":"","properties":{},"title":"payment_method_satispay","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":"#/$defs/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"}},"required":["bank_code","branch_code","country","fingerprint","generated_from","last4"],"title":"payment_method_sepa_debit","type":"object","x-expandableFields":["generated_from"],"x-stripeMostCommon":["bank_code","branch_code","country","fingerprint","generated_from","last4"]},"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"}},"required":["country"],"title":"payment_method_sofort","type":"object","x-expandableFields":[],"x-stripeMostCommon":["country"]},"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_upi":{"description":"","properties":{"vpa":{"description":"Customer's unique Virtual Payment Address","maxLength":5000,"nullable":true,"type":"string"}},"required":["vpa"],"title":"payment_method_upi","type":"object","x-expandableFields":[],"x-stripeMostCommon":["vpa"]},"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":"#/$defs/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":"#/$defs/payment_method_us_bank_account_status_details"}],"description":"Contains information about the future reusability of this PaymentMethod.","nullable":true}},"required":["account_holder_type","account_type","bank_name","financial_connections_account","fingerprint","last4","networks","routing_number","status_details"],"title":"payment_method_us_bank_account","type":"object","x-expandableFields":["networks","status_details"],"x-stripeMostCommon":["account_holder_type","account_type","bank_name","financial_connections_account","fingerprint","last4","networks","routing_number","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","tokenized_account_number_deactivated"],"nullable":true,"type":"string"}},"required":["network_code","reason"],"title":"payment_method_us_bank_account_blocked","type":"object","x-expandableFields":[],"x-stripeMostCommon":["network_code","reason"]},"payment_method_us_bank_account_status_details":{"description":"","properties":{"blocked":{"$ref":"#/$defs/payment_method_us_bank_account_blocked"}},"title":"payment_method_us_bank_account_status_details","type":"object","x-expandableFields":["blocked"],"x-stripeMostCommon":["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_record":{"description":"A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe.\nFor example, you can create a Payment Record to model a payment made on a different payment processor,\nin order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or\nmore Payment Attempt Records, which represent individual attempts made on a payment network.","properties":{"amount":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"amount_authorized":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"amount_canceled":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"amount_failed":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"amount_guaranteed":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"amount_refunded":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"amount_requested":{"$ref":"#/$defs/payments_primitives_payment_records_resource_amount"},"application":{"description":"ID of the Connect application that created the PaymentRecord.","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_details":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_customer_details"}],"description":"Customer information for this payment.","nullable":true},"customer_presence":{"description":"Indicates whether the customer was present in your checkout flow during this payment.","enum":["off_session","on_session"],"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"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"latest_payment_attempt_record":{"description":"ID of the latest Payment Attempt Record attached to this Payment Record.","maxLength":5000,"nullable":true,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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_record"],"type":"string"},"payment_method_details":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_details"}],"description":"Information about the Payment Method debited for this payment.","nullable":true},"processor_details":{"$ref":"#/$defs/payments_primitives_payment_records_resource_processor_details"},"reported_by":{"description":"Indicates who reported the payment.","enum":["self","stripe"],"type":"string"},"shipping_details":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_shipping_details"}],"description":"Shipping information for this payment.","nullable":true}},"required":["amount","amount_authorized","amount_canceled","amount_failed","amount_guaranteed","amount_refunded","amount_requested","application","created","customer_details","customer_presence","description","id","latest_payment_attempt_record","livemode","metadata","object","payment_method_details","processor_details","reported_by","shipping_details"],"title":"PaymentRecord","type":"object","x-expandableFields":["amount","amount_authorized","amount_canceled","amount_failed","amount_guaranteed","amount_refunded","amount_requested","customer_details","payment_method_details","processor_details","shipping_details"],"x-resourceId":"payment_record","x-stripeMostCommon":["amount","amount_authorized","amount_canceled","amount_failed","amount_guaranteed","amount_refunded","amount_requested","customer_details","customer_presence","description","id","metadata","payment_method_details","processor_details","shipping_details"],"x-stripeOperations":[{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/payment_records/{id}"},{"method_name":"report_payment_attempt","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/{id}/report_payment_attempt"},{"method_name":"report_payment_attempt_canceled","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/{id}/report_payment_attempt_canceled"},{"method_name":"report_payment_attempt_failed","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/{id}/report_payment_attempt_failed"},{"method_name":"report_payment_attempt_guaranteed","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/{id}/report_payment_attempt_guaranteed"},{"method_name":"report_payment_attempt_informational","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/{id}/report_payment_attempt_informational"},{"method_name":"report_refund","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/{id}/report_refund"},{"method_name":"report_payment","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payment_records/report_payment"}],"x-stripeResource":{"class_name":"PaymentRecord","in_package":""}},"payment_source":{"anyOf":[{"$ref":"#/$defs/account"},{"$ref":"#/$defs/bank_account"},{"$ref":"#/$defs/card"},{"$ref":"#/$defs/source"}],"title":"Polymorphic","x-resourceId":"payment_source","x-stripeBypassValidation":true,"x-stripeOperations":[{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/customers/{customer}/sources"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/customers/{customer}/sources"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/sources/{id}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/sources/{id}"},{"method_name":"create","method_on":"collection","method_type":"create","operation":"post","path":"/v1/customers/{customer}/sources"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/customers/{customer}/sources"}],"x-stripeResource":{"class_name":"PaymentSource","has_collection_class":true}},"payments_primitives_payment_records_resource_address":{"description":"A representation of a physical address.","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, such as the street, PO Box, or company name.","maxLength":5000,"nullable":true,"type":"string"},"line2":{"description":"Address line 2, such as the 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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).","maxLength":5000,"nullable":true,"type":"string"}},"required":["city","country","line1","line2","postal_code","state"],"title":"PaymentsPrimitivesPaymentRecordsResourceAddress","type":"object","x-expandableFields":[],"x-stripeMostCommon":["city","country","line1","line2","postal_code","state"]},"payments_primitives_payment_records_resource_amount":{"description":"A representation of an amount of money, consisting of an amount and a currency.","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"},"value":{"description":"A positive integer representing the amount in the currency's [minor unit](https://docs.stripe.com/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.","type":"integer"}},"required":["currency","value"],"title":"PaymentsPrimitivesPaymentRecordsResourceAmount","type":"object","x-expandableFields":[],"x-stripeMostCommon":["currency","value"]},"payments_primitives_payment_records_resource_billing_details":{"description":"Billing details used by the customer for this payment.","properties":{"address":{"$ref":"#/$defs/payments_primitives_payment_records_resource_address"},"email":{"description":"The billing email associated with the method of payment.","maxLength":5000,"nullable":true,"type":"string"},"name":{"description":"The billing name associated with the method of payment.","maxLength":5000,"nullable":true,"type":"string"},"phone":{"description":"The billing phone number associated with the method of payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["address","email","name","phone"],"title":"PaymentsPrimitivesPaymentRecordsResourceBillingDetails","type":"object","x-expandableFields":["address"],"x-stripeMostCommon":["address","email","name","phone"]},"payments_primitives_payment_records_resource_customer_details":{"description":"Information about the customer for this payment.","properties":{"customer":{"description":"ID of the Stripe Customer associated with this payment.","maxLength":5000,"nullable":true,"type":"string"},"email":{"description":"The customer's email address.","maxLength":5000,"nullable":true,"type":"string"},"name":{"description":"The customer's name.","maxLength":5000,"nullable":true,"type":"string"},"phone":{"description":"The customer's phone number.","maxLength":5000,"nullable":true,"type":"string"}},"required":["customer","email","name","phone"],"title":"PaymentsPrimitivesPaymentRecordsResourceCustomerDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["customer","email","name","phone"]},"payments_primitives_payment_records_resource_payment_method_card_details":{"description":"Details of the card used for this payment attempt.","properties":{"authorization_code":{"description":"The authorization code of the payment.","maxLength":5000,"nullable":true,"type":"string"},"brand":{"description":"Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.","enum":["amex","cartes_bancaires","diners","discover","eftpos_au","interac","jcb","link","mastercard","unionpay","unknown","visa"],"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":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_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"},"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.","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`.","enum":["credit","debit","prepaid","unknown"],"nullable":true,"type":"string"},"iin":{"description":"Issuer identification number of the card.","maxLength":5000,"nullable":true,"type":"string"},"installments":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_installments"}],"description":"Installment details for this payment.","nullable":true},"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"},"moto":{"description":"True if this payment was marked as MOTO and out of scope for SCA.","nullable":true,"type":"boolean"},"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`.","enum":["amex","cartes_bancaires","diners","discover","eftpos_au","interac","jcb","link","mastercard","unionpay","unknown","visa"],"nullable":true,"type":"string"},"network_advice_code":{"description":"Advice code from the card network for the failed payment.","maxLength":5000,"nullable":true,"type":"string"},"network_decline_code":{"description":"Decline code from the card network for the failed payment.","maxLength":5000,"nullable":true,"type":"string"},"network_token":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_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"},"stored_credential_usage":{"description":"The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`.","enum":["recurring","unscheduled"],"nullable":true,"type":"string"},"three_d_secure":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_three_d_secure"}],"description":"Populated if this transaction used 3D Secure authentication.","nullable":true},"wallet":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet"}],"description":"If this Card is part of a card wallet, this contains the details of the card wallet.","nullable":true}},"required":["authorization_code","brand","checks","country","description","exp_month","exp_year","funding","iin","installments","issuer","last4","network","network_advice_code","network_decline_code","network_transaction_id","stored_credential_usage","three_d_secure","wallet"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails","type":"object","x-expandableFields":["checks","installments","network_token","three_d_secure","wallet"],"x-stripeMostCommon":["authorization_code","brand","capture_before","checks","country","description","exp_month","exp_year","fingerprint","funding","iin","installments","issuer","last4","moto","network","network_advice_code","network_decline_code","network_token","network_transaction_id","stored_credential_usage","three_d_secure","wallet"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_checks":{"description":"","properties":{"address_line1_check":{"description":"If you provide a value for `address.line1`, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.","enum":["fail","pass","unavailable","unchecked"],"nullable":true,"type":"string"},"address_postal_code_check":{"description":"If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.","enum":["fail","pass","unavailable","unchecked"],"nullable":true,"type":"string"},"cvc_check":{"description":"If you provide a CVC, the check results is one of `pass`, `fail`, `unavailable`, or `unchecked`.","enum":["fail","pass","unavailable","unchecked"],"nullable":true,"type":"string"}},"required":["address_line1_check","address_postal_code_check","cvc_check"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceChecks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["address_line1_check","address_postal_code_check","cvc_check"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_installment_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. One of `month`.","enum":["month"],"nullable":true,"type":"string"},"type":{"description":"Type of installment plan, one of `fixed_count`, `revolving`, or `bonus`.","enum":["bonus","fixed_count","revolving"],"type":"string"}},"required":["count","interval","type"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceInstallmentPlan","type":"object","x-expandableFields":[],"x-stripeMostCommon":["count","interval","type"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_installments":{"description":"","properties":{"plan":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_installment_plan"}],"description":"Installment plan selected for the payment.","nullable":true}},"required":["plan"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceInstallments","type":"object","x-expandableFields":["plan"],"x-stripeMostCommon":["plan"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_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":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkToken","type":"object","x-expandableFields":[],"x-stripeMostCommon":["used"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_three_d_secure":{"description":"","properties":{"authentication_flow":{"description":"For authenticated transactions: Indicates how the issuing bank authenticated the customer.","enum":["challenge","frictionless"],"nullable":true,"type":"string"},"cryptogram":{"description":"The 3D Secure cryptogram, also known as the \"authentication value\" (AAV, CAVV or AEVV).","maxLength":5000,"nullable":true,"type":"string"},"electronic_commerce_indicator":{"description":"The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed.","enum":["01","02","03","04","05","06","07"],"nullable":true,"type":"string"},"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 the outcome of Stripe's internal risk assessment.","nullable":true,"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 on the `result`.","enum":["abandoned","bypassed","canceled","card_not_enrolled","network_not_supported","protocol_error","rejected"],"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"}},"required":["authentication_flow","cryptogram","electronic_commerce_indicator","exemption_indicator","exemption_indicator_applied","result","result_reason","version"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceThreeDSecure","type":"object","x-expandableFields":[],"x-stripeMostCommon":["authentication_flow","cryptogram","electronic_commerce_indicator","exemption_indicator","exemption_indicator_applied","result","result_reason","version"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet":{"description":"","properties":{"apple_pay":{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_apple_pay"},"dynamic_last4":{"description":"(For tokenized numbers only.) The last four digits of the device account number.","maxLength":5000,"type":"string"},"google_pay":{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_google_pay"},"type":{"description":"The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.","maxLength":5000,"type":"string"}},"required":["type"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWallet","type":"object","x-expandableFields":["apple_pay","google_pay"],"x-stripeMostCommon":["apple_pay","dynamic_last4","google_pay","type"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_apple_pay":{"description":"","properties":{"type":{"description":"Type of the apple_pay transaction, one of `apple_pay` or `apple_pay_later`.","maxLength":5000,"type":"string"}},"required":["type"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["type"]},"payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_google_pay":{"description":"","properties":{},"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceGooglePay","type":"object","x-expandableFields":[]},"payments_primitives_payment_records_resource_payment_method_custom_details":{"description":"Custom Payment Methods represent Payment Method types not modeled directly in\nthe Stripe API. This resource consists of details about the custom payment method\nused for this payment attempt.","properties":{"display_name":{"description":"Display name for the custom (user-defined) payment method type used to make this payment.","maxLength":5000,"type":"string"},"type":{"description":"The custom payment method type associated with this payment.","maxLength":5000,"nullable":true,"type":"string"}},"required":["display_name","type"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["display_name","type"]},"payments_primitives_payment_records_resource_payment_method_details":{"description":"Details about the Payment Method used in this payment attempt.","properties":{"ach_credit_transfer":{"$ref":"#/$defs/payment_method_details_ach_credit_transfer"},"ach_debit":{"$ref":"#/$defs/payment_method_details_ach_debit"},"acss_debit":{"$ref":"#/$defs/payment_method_details_acss_debit"},"affirm":{"$ref":"#/$defs/payment_method_details_payment_record_affirm"},"afterpay_clearpay":{"$ref":"#/$defs/payment_method_details_payment_record_afterpay_clearpay"},"alipay":{"$ref":"#/$defs/payment_flows_private_payment_methods_alipay_details"},"alma":{"$ref":"#/$defs/payment_method_details_alma"},"amazon_pay":{"$ref":"#/$defs/payment_method_details_amazon_pay"},"au_becs_debit":{"$ref":"#/$defs/payment_method_details_au_becs_debit"},"bacs_debit":{"$ref":"#/$defs/payment_method_details_bacs_debit"},"bancontact":{"$ref":"#/$defs/payment_method_details_payment_record_bancontact"},"billie":{"$ref":"#/$defs/payment_method_details_billie"},"billing_details":{"anyOf":[{"$ref":"#/$defs/payments_primitives_payment_records_resource_billing_details"}],"description":"The billing details associated with the method of payment.","nullable":true},"blik":{"$ref":"#/$defs/payment_method_details_blik"},"boleto":{"$ref":"#/$defs/payment_method_details_payment_record_boleto"},"card":{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_card_details"},"card_present":{"$ref":"#/$defs/payment_method_details_card_present"},"cashapp":{"$ref":"#/$defs/payment_method_details_payment_record_cashapp"},"crypto":{"$ref":"#/$defs/payment_method_details_crypto"},"custom":{"$ref":"#/$defs/payments_primitives_payment_records_resource_payment_method_custom_details"},"customer_balance":{"$ref":"#/$defs/payment_method_details_customer_balance"},"eps":{"$ref":"#/$defs/payment_method_details_eps"},"fpx":{"$ref":"#/$defs/payment_method_details_fpx"},"giropay":{"$ref":"#/$defs/payment_method_details_payment_record_giropay"},"grabpay":{"$ref":"#/$defs/payment_method_details_grabpay"},"ideal":{"$ref":"#/$defs/payment_method_details_payment_record_ideal"},"interac_present":{"$ref":"#/$defs/payment_method_details_interac_present"},"kakao_pay":{"$ref":"#/$defs/payment_method_details_payment_record_kakao_pay"},"klarna":{"$ref":"#/$defs/payment_method_details_klarna"},"konbini":{"$ref":"#/$defs/payment_method_details_payment_record_konbini"},"kr_card":{"$ref":"#/$defs/payment_method_details_kr_card"},"link":{"$ref":"#/$defs/payment_method_details_link"},"mb_way":{"$ref":"#/$defs/payment_method_details_payment_record_mb_way"},"mobilepay":{"$ref":"#/$defs/payment_method_details_payment_record_mobilepay"},"multibanco":{"$ref":"#/$defs/payment_method_details_payment_record_multibanco"},"naver_pay":{"$ref":"#/$defs/payment_method_details_payment_record_naver_pay"},"nz_bank_account":{"$ref":"#/$defs/payment_method_details_nz_bank_account"},"oxxo":{"$ref":"#/$defs/payment_method_details_payment_record_oxxo"},"p24":{"$ref":"#/$defs/payment_method_details_p24"},"pay_by_bank":{"$ref":"#/$defs/payment_method_details_pay_by_bank"},"payco":{"$ref":"#/$defs/payment_method_details_payment_record_payco"},"payment_method":{"description":"ID of the Stripe PaymentMethod used to make this payment.","maxLength":5000,"nullable":true,"type":"string"},"paynow":{"$ref":"#/$defs/payment_method_details_payment_record_paynow"},"paypal":{"$ref":"#/$defs/payment_method_details_paypal"},"payto":{"$ref":"#/$defs/payment_method_details_payto"},"pix":{"$ref":"#/$defs/payment_method_details_payment_record_pix"},"promptpay":{"$ref":"#/$defs/payment_method_details_payment_record_promptpay"},"revolut_pay":{"$ref":"#/$defs/payment_method_details_revolut_pay"},"samsung_pay":{"$ref":"#/$defs/payment_method_details_payment_record_samsung_pay"},"satispay":{"$ref":"#/$defs/payment_method_details_satispay"},"sepa_credit_transfer":{"$ref":"#/$defs/payment_method_details_sepa_credit_transfer"},"sepa_debit":{"$ref":"#/$defs/payment_method_details_payment_record_sepa_debit"},"sofort":{"$ref":"#/$defs/payment_method_details_payment_record_sofort"},"stripe_account":{"$ref":"#/$defs/payment_method_details_stripe_account"},"swish":{"$ref":"#/$defs/payment_method_details_payment_record_swish"},"twint":{"$ref":"#/$defs/payment_method_details_payment_record_twint"},"type":{"description":"The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://docs.stripe.com/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"},"upi":{"$ref":"#/$defs/payment_method_details_upi"},"us_bank_account":{"$ref":"#/$defs/payment_method_details_payment_record_us_bank_account"},"wechat":{"$ref":"#/$defs/payment_method_details_wechat"},"wechat_pay":{"$ref":"#/$defs/payment_method_details_payment_record_wechat_pay"},"zip":{"$ref":"#/$defs/payment_method_details_payment_record_zip"}},"required":["billing_details","payment_method","type"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails","type":"object","x-expandableFields":["ach_credit_transfer","ach_debit","acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","billing_details","blik","boleto","card","card_present","cashapp","crypto","custom","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_credit_transfer","sepa_debit","sofort","stripe_account","swish","twint","upi","us_bank_account","wechat","wechat_pay","zip"],"x-stripeMostCommon":["ach_credit_transfer","ach_debit","acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","billing_details","blik","boleto","card","card_present","cashapp","crypto","custom","customer_balance","eps","fpx","giropay","grabpay","ideal","interac_present","kakao_pay","klarna","konbini","kr_card","link","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","payment_method","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_credit_transfer","sepa_debit","sofort","stripe_account","swish","twint","type","upi","us_bank_account","wechat","wechat_pay","zip"]},"payments_primitives_payment_records_resource_payment_method_konbini_details_resource_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","x-stripeBypassValidation":true}},"required":["chain"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodKonbiniDetailsResourceStore","type":"object","x-expandableFields":[],"x-stripeMostCommon":["chain"]},"payments_primitives_payment_records_resource_payment_method_mobilepay_details_resource_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"}},"required":["brand","country","exp_month","exp_year","last4"],"title":"PaymentsPrimitivesPaymentRecordsResourcePaymentMethodMobilepayDetailsResourceCard","type":"object","x-expandableFields":[],"x-stripeMostCommon":["brand","country","exp_month","exp_year","last4"]},"payments_primitives_payment_records_resource_processor_details":{"description":"Processor information associated with this payment.","properties":{"custom":{"$ref":"#/$defs/payments_primitives_payment_records_resource_processor_details_resource_custom_details"},"type":{"description":"The processor used for this payment attempt.","enum":["custom"],"type":"string","x-stripeBypassValidation":true}},"required":["type"],"title":"PaymentsPrimitivesPaymentRecordsResourceProcessorDetails","type":"object","x-expandableFields":["custom"],"x-stripeMostCommon":["custom","type"]},"payments_primitives_payment_records_resource_processor_details_resource_custom_details":{"description":"Custom processors represent payment processors not modeled directly in\nthe Stripe API. This resource consists of details about the custom processor\nused for this payment attempt.","properties":{"payment_reference":{"description":"An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.","maxLength":5000,"nullable":true,"type":"string"}},"required":["payment_reference"],"title":"PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["payment_reference"]},"payments_primitives_payment_records_resource_shipping_details":{"description":"The customer's shipping information associated with this payment.","properties":{"address":{"$ref":"#/$defs/payments_primitives_payment_records_resource_address"},"name":{"description":"The shipping recipient's name.","maxLength":5000,"nullable":true,"type":"string"},"phone":{"description":"The shipping recipient's phone number.","maxLength":5000,"nullable":true,"type":"string"}},"required":["address","name","phone"],"title":"PaymentsPrimitivesPaymentRecordsResourceShippingDetails","type":"object","x-expandableFields":["address"],"x-stripeMostCommon":["address","name","phone"]},"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://docs.stripe.com/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":"#/$defs/application_fee"}],"description":"The application fee (if any) for the payout. [See the Connect documentation](https://docs.stripe.com/connect/instant-payouts#monetization-and-fees) for details.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application_fee"}]}},"application_fee_amount":{"description":"The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/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":"#/$defs/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":"#/$defs/external_account"},{"$ref":"#/$defs/deleted_external_account"}],"description":"ID of the bank account or card the payout is sent to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/external_account"},{"$ref":"#/$defs/deleted_external_account"}]}},"failure_balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/balance_transaction"}]}},"failure_code":{"description":"Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://docs.stripe.com/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/payout"}],"description":"If the payout reverses another, this is the ID of the original payout.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payout"}]}},"payout_method":{"description":"ID of the v2 FinancialAccount the funds are sent to.","maxLength":5000,"nullable":true,"type":"string"},"reconciliation_status":{"description":"If `completed`, you can use the [Balance Transactions API](https://docs.stripe.com/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":"#/$defs/payout"}],"description":"If the payout reverses, this is the ID of the payout that reverses this payout.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/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","application_fee","application_fee_amount","arrival_date","automatic","balance_transaction","created","currency","description","destination","failure_balance_transaction","failure_code","failure_message","id","livemode","metadata","method","object","original_payout","payout_method","reconciliation_status","reversed_by","source_type","statement_descriptor","status","trace_id","type"],"title":"Payout","type":"object","x-expandableFields":["application_fee","balance_transaction","destination","failure_balance_transaction","original_payout","reversed_by","trace_id"],"x-resourceId":"payout","x-stripeMostCommon":["amount","arrival_date","currency","description","id","metadata","statement_descriptor","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/payouts"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/payouts/{payout}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/payouts"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/payouts/{payout}"},{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payouts/{payout}/cancel"},{"method_name":"reverse","method_on":"service","method_type":"custom","operation":"post","path":"/v1/payouts/{payout}/reverse"}],"x-stripeResource":{"class_name":"Payout","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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","value"],"title":"PayoutsTraceID","type":"object","x-expandableFields":[],"x-stripeMostCommon":["status","value"]},"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":["dispute_categories","status"],"title":"paypal_seller_protection","type":"object","x-expandableFields":[],"x-stripeMostCommon":["dispute_categories","status"]},"person":{"description":"This is an object representing a person associated with a Stripe account.\n\nA platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.\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":"#/$defs/person_additional_tos_acceptances"},"address":{"$ref":"#/$defs/address"},"address_kana":{"anyOf":[{"$ref":"#/$defs/legal_entity_japan_address"}],"description":"The Kana variation of the person's address (Japan only).","nullable":true},"address_kanji":{"anyOf":[{"$ref":"#/$defs/legal_entity_japan_address"}],"description":"The Kanji variation of the person's address (Japan only).","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":"#/$defs/legal_entity_dob"},"email":{"description":"The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"first_name":{"description":"The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"first_name_kana":{"description":"The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"first_name_kanji":{"description":"The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"full_name_aliases":{"description":"A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","items":{"maxLength":5000,"type":"string"},"type":"array"},"future_requirements":{"anyOf":[{"$ref":"#/$defs/person_future_requirements"}],"description":"Information about the [upcoming new requirements for this person](https://docs.stripe.com/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.","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. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"last_name_kana":{"description":"The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","maxLength":5000,"nullable":true,"type":"string"},"last_name_kanji":{"description":"The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.","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://docs.stripe.com/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":"#/$defs/address"},"relationship":{"$ref":"#/$defs/person_relationship"},"requirements":{"anyOf":[{"$ref":"#/$defs/person_requirements"}],"description":"Information about the requirements for this person, including what information needs to be collected, and by when.","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"},"us_cfpb_data":{"anyOf":[{"$ref":"#/$defs/person_us_cfpb_data"}],"description":"Demographic data related to the person.","nullable":true},"verification":{"$ref":"#/$defs/legal_entity_person_verification"}},"required":["created","id","object"],"title":"Person","type":"object","x-expandableFields":["additional_tos_acceptances","address","address_kana","address_kanji","dob","future_requirements","registered_address","relationship","requirements","us_cfpb_data","verification"],"x-resourceId":"person","x-stripeMostCommon":["account","address","dob","email","first_name","id","last_name","metadata","phone","relationship","requirements"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/accounts/{account}/persons/{person}"},{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/accounts/{account}/persons"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/accounts/{account}/persons"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/accounts/{account}/persons/{person}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/accounts/{account}/persons/{person}"},{"method_name":"create","method_on":"collection","method_type":"create","operation":"post","path":"/v1/accounts/{account}/persons"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/accounts/{account}/persons"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/accounts/{account}/persons/{person}"}],"x-stripeResource":{"class_name":"Person","has_collection_class":true,"in_package":""}},"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"}},"required":["date","ip","user_agent"],"title":"PersonAdditionalTOSAcceptance","type":"object","x-expandableFields":[],"x-stripeMostCommon":["date","ip","user_agent"]},"person_additional_tos_acceptances":{"description":"","properties":{"account":{"anyOf":[{"$ref":"#/$defs/person_additional_tos_acceptance"}],"description":"Details on the legal guardian's acceptance of the main Stripe service agreement.","nullable":true}},"required":["account"],"title":"PersonAdditionalTOSAcceptances","type":"object","x-expandableFields":["account"],"x-stripeMostCommon":["account"]},"person_ethnicity_details":{"description":"","properties":{"ethnicity":{"description":"The persons ethnicity","items":{"enum":["cuban","hispanic_or_latino","mexican","not_hispanic_or_latino","other_hispanic_or_latino","prefer_not_to_answer","puerto_rican"],"type":"string"},"nullable":true,"type":"array"},"ethnicity_other":{"description":"Please specify your origin, when other is selected.","maxLength":5000,"nullable":true,"type":"string"}},"required":["ethnicity","ethnicity_other"],"title":"PersonEthnicityDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["ethnicity","ethnicity_other"]},"person_future_requirements":{"description":"","properties":{"alternatives":{"description":"Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.","items":{"$ref":"#/$defs/account_requirements_alternative"},"nullable":true,"type":"array"},"currently_due":{"description":"Fields that need to be resolved to keep the person's account enabled. If not resolved 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":"Details about validation and verification failures for `due` requirements that must be resolved.","items":{"$ref":"#/$defs/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 haven't been resolved by the account's `requirements.current_deadline`. These fields need to be resolved to enable the person's account. `future_requirements.past_due` is a subset of `requirements.past_due`.","items":{"maxLength":5000,"type":"string"},"type":"array"},"pending_verification":{"description":"Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.","items":{"maxLength":5000,"type":"string"},"type":"array"}},"required":["alternatives","currently_due","errors","eventually_due","past_due","pending_verification"],"title":"PersonFutureRequirements","type":"object","x-expandableFields":["alternatives","errors"],"x-stripeMostCommon":["alternatives","currently_due","errors","eventually_due","past_due","pending_verification"]},"person_race_details":{"description":"","properties":{"race":{"description":"The persons race.","items":{"enum":["african_american","american_indian_or_alaska_native","asian","asian_indian","black_or_african_american","chinese","ethiopian","filipino","guamanian_or_chamorro","haitian","jamaican","japanese","korean","native_hawaiian","native_hawaiian_or_other_pacific_islander","nigerian","other_asian","other_black_or_african_american","other_pacific_islander","prefer_not_to_answer","samoan","somali","vietnamese","white"],"type":"string"},"nullable":true,"type":"array"},"race_other":{"description":"Please specify your race, when other is selected.","maxLength":5000,"nullable":true,"type":"string"}},"required":["race","race_other"],"title":"PersonRaceDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["race","race_other"]},"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"}},"required":["authorizer","director","executive","legal_guardian","owner","percent_ownership","representative","title"],"title":"PersonRelationship","type":"object","x-expandableFields":[],"x-stripeMostCommon":["authorizer","director","executive","legal_guardian","owner","percent_ownership","representative","title"]},"person_requirements":{"description":"","properties":{"alternatives":{"description":"Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.","items":{"$ref":"#/$defs/account_requirements_alternative"},"nullable":true,"type":"array"},"currently_due":{"description":"Fields that need to be resolved to keep the person's account enabled. If not resolved by the account's `current_deadline`, these fields will appear in `past_due` as well, and the account is disabled.","items":{"maxLength":5000,"type":"string"},"type":"array"},"errors":{"description":"Details about validation and verification failures for `due` requirements that must be resolved.","items":{"$ref":"#/$defs/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 haven't been resolved by `current_deadline`. These fields need to be resolved to enable the person's account.","items":{"maxLength":5000,"type":"string"},"type":"array"},"pending_verification":{"description":"Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.","items":{"maxLength":5000,"type":"string"},"type":"array"}},"required":["alternatives","currently_due","errors","eventually_due","past_due","pending_verification"],"title":"PersonRequirements","type":"object","x-expandableFields":["alternatives","errors"],"x-stripeMostCommon":["alternatives","currently_due","errors","eventually_due","past_due","pending_verification"]},"person_us_cfpb_data":{"description":"","properties":{"ethnicity_details":{"anyOf":[{"$ref":"#/$defs/person_ethnicity_details"}],"description":"The persons ethnicity details","nullable":true},"race_details":{"anyOf":[{"$ref":"#/$defs/person_race_details"}],"description":"The persons race details","nullable":true},"self_identified_gender":{"description":"The persons self-identified gender","maxLength":5000,"nullable":true,"type":"string"}},"required":["ethnicity_details","race_details","self_identified_gender"],"title":"PersonUSCfpbData","type":"object","x-expandableFields":["ethnicity_details","race_details"],"x-stripeMostCommon":["ethnicity_details","race_details","self_identified_gender"]},"plan":{"description":"You can now model subscriptions more flexibly using the [Prices API](https://api.stripe.com#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://api.stripe.com#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://docs.stripe.com/billing/subscriptions/set-up-subscription) and more about [products and prices](https://docs.stripe.com/products-prices/overview).","properties":{"active":{"description":"Whether the plan can be used for new purchases.","type":"boolean"},"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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/product"},{"$ref":"#/$defs/deleted_product"}],"description":"The product whose pricing this plan determines.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/product"},{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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://docs.stripe.com/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","amount","amount_decimal","billing_scheme","created","currency","id","interval","interval_count","livemode","metadata","meter","nickname","object","product","tiers_mode","transform_usage","trial_period_days","usage_type"],"title":"Plan","type":"object","x-expandableFields":["product","tiers","transform_usage"],"x-resourceId":"plan","x-stripeMostCommon":["active","amount","currency","id","interval","metadata","nickname","product"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/plans/{plan}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/plans"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/plans/{plan}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/plans"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/plans/{plan}"}],"x-stripeResource":{"class_name":"Plan","has_collection_class":true,"in_package":""}},"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"}},"required":["flat_amount","flat_amount_decimal","unit_amount","unit_amount_decimal","up_to"],"title":"PlanTier","type":"object","x-expandableFields":[],"x-stripeMostCommon":["flat_amount","flat_amount_decimal","unit_amount","unit_amount_decimal","up_to"]},"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.","enum":["charge","payout"],"type":"string","x-stripeBypassValidation":true}},"required":["type"],"title":"PlatformEarningFeeSource","type":"object","x-expandableFields":[],"x-stripeMostCommon":["charge","payout","type"]},"price":{"description":"Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://api.stripe.com#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://docs.stripe.com/billing/subscriptions/set-up-subscription), [create an invoice](https://docs.stripe.com/billing/invoices/create), and more about [products and prices](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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://docs.stripe.com/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":"#/$defs/product"},{"$ref":"#/$defs/deleted_product"}],"description":"The ID of the product this price is associated with.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/product"},{"$ref":"#/$defs/deleted_product"}]}},"recurring":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/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":"#/$defs/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":"#/$defs/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","custom_unit_amount","id","livemode","lookup_key","metadata","nickname","object","product","recurring","tax_behavior","tiers_mode","transform_quantity","type","unit_amount","unit_amount_decimal"],"title":"Price","type":"object","x-expandableFields":["currency_options","custom_unit_amount","product","recurring","tiers","transform_quantity"],"x-resourceId":"price","x-stripeMostCommon":["active","currency","id","metadata","nickname","product","recurring","tax_behavior","type","unit_amount"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/prices"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/prices/{price}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/prices/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/prices"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/prices/{price}"}],"x-stripeResource":{"class_name":"Price","has_collection_class":true,"has_search_result_class":true,"in_package":""}},"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"}},"required":["flat_amount","flat_amount_decimal","unit_amount","unit_amount_decimal","up_to"],"title":"PriceTier","type":"object","x-expandableFields":[],"x-stripeMostCommon":["flat_amount","flat_amount_decimal","unit_amount","unit_amount_decimal","up_to"]},"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://api.stripe.com#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://docs.stripe.com/payment-links),\n[accept payments with Checkout](https://docs.stripe.com/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://docs.stripe.com/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":"#/$defs/price"}],"description":"The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"marketing_features":{"description":"A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table).","items":{"$ref":"#/$defs/product_marketing_feature"},"type":"array"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/tax_code"}],"description":"A [tax code](https://docs.stripe.com/tax/tax-categories) ID.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_code"}]}},"type":{"description":"The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.","enum":["good","service"],"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":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","description","id","images","livemode","marketing_features","metadata","name","object","package_dimensions","shippable","type","updated","url"],"title":"Product","type":"object","x-expandableFields":["default_price","marketing_features","package_dimensions","tax_code"],"x-resourceId":"product","x-stripeMostCommon":["active","default_price","description","id","metadata","name","tax_code"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/products/{id}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/products"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/products/{id}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/products/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/products"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/products/{id}"}],"x-stripeResource":{"class_name":"Product","has_collection_class":true,"has_search_result_class":true,"in_package":""}},"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":[],"x-stripeMostCommon":["name"]},"promotion_code":{"description":"A Promotion Code represents a customer-redeemable code for an underlying promotion.\nYou can create multiple codes for a single promotion.\n\nIf you enable promotion codes in your [customer portal configuration](https://docs.stripe.com/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal.\nCustomers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.","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), digits (0-9), and dashes (-).","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"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"The customer who can use this promotion code.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"The account representing the customer who can use this promotion code.","maxLength":5000,"nullable":true,"type":"string"},"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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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://docs.stripe.com/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"},"promotion":{"$ref":"#/$defs/promotion_codes_resource_promotion"},"restrictions":{"$ref":"#/$defs/promotion_codes_resource_restrictions"},"times_redeemed":{"description":"Number of times this promotion code has been used.","type":"integer"}},"required":["active","code","created","customer","customer_account","expires_at","id","livemode","max_redemptions","metadata","object","promotion","restrictions","times_redeemed"],"title":"PromotionCode","type":"object","x-expandableFields":["customer","promotion","restrictions"],"x-resourceId":"promotion_code","x-stripeMostCommon":["code","id","metadata","promotion"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/promotion_codes"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/promotion_codes/{promotion_code}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/promotion_codes"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/promotion_codes/{promotion_code}"}],"x-stripeResource":{"class_name":"PromotionCode","has_collection_class":true,"in_package":""}},"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":[],"x-stripeMostCommon":["minimum_amount"]},"promotion_codes_resource_promotion":{"description":"","properties":{"coupon":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/coupon"}],"description":"If promotion `type` is `coupon`, the coupon for this promotion.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/coupon"}]}},"type":{"description":"The type of promotion.","enum":["coupon"],"type":"string"}},"required":["coupon","type"],"title":"PromotionCodesResourcePromotion","type":"object","x-expandableFields":["coupon"],"x-stripeMostCommon":["coupon","type"]},"promotion_codes_resource_restrictions":{"description":"","properties":{"currency_options":{"additionalProperties":{"$ref":"#/$defs/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","minimum_amount","minimum_amount_currency"],"title":"PromotionCodesResourceRestrictions","type":"object","x-expandableFields":["currency_options"],"x-stripeMostCommon":["currency_options","first_time_transaction","minimum_amount","minimum_amount_currency"]},"radar_radar_options":{"description":"Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.","properties":{"session":{"description":"A [Radar Session](https://docs.stripe.com/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":[],"x-stripeMostCommon":["session"]},"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"}},"required":["city","country","latitude","longitude","region"],"title":"RadarReviewResourceLocation","type":"object","x-expandableFields":[],"x-stripeMostCommon":["city","country","latitude","longitude","region"]},"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"}},"required":["browser","device","platform","version"],"title":"RadarReviewResourceSession","type":"object","x-expandableFields":[],"x-stripeMostCommon":["browser","device","platform","version"]},"recurring":{"description":"","properties":{"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"},"trial_period_days":{"description":"Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://docs.stripe.com/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":["interval","interval_count","meter","trial_period_days","usage_type"],"title":"Recurring","type":"object","x-expandableFields":[],"x-stripeMostCommon":["interval"]},"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://docs.stripe.com/refunds)","properties":{"amount":{"description":"Amount, in cents (or local equivalent).","type":"integer"},"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/balance_transaction"}],"description":"Balance transaction that describes the impact on your account balance.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/balance_transaction"}]}},"charge":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/charge"}],"description":"ID of the charge that's refunded.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/refund_destination_details"},"failure_balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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://docs.stripe.com/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":"#/$defs/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":"#/$defs/payment_intent"}],"description":"ID of the PaymentIntent that's refunded.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_intent"}]}},"pending_reason":{"description":"Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`.","enum":["charge_pending","insufficient_funds","processing"],"type":"string"},"presentment_details":{"$ref":"#/$defs/payment_flows_payment_intent_presentment_details"},"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":"#/$defs/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":"#/$defs/transfer_reversal"}]}},"status":{"description":"Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://docs.stripe.com/refunds#failed-refunds).","maxLength":5000,"nullable":true,"type":"string"},"transfer_reversal":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/transfer_reversal"}]}}},"required":["amount","balance_transaction","charge","created","currency","id","metadata","object","payment_intent","reason","receipt_number","source_transfer_reversal","status","transfer_reversal"],"title":"Refund","type":"object","x-expandableFields":["balance_transaction","charge","destination_details","failure_balance_transaction","next_action","payment_intent","presentment_details","source_transfer_reversal","transfer_reversal"],"x-resourceId":"refund","x-stripeMostCommon":["amount","charge","currency","description","id","metadata","payment_intent","reason","status"],"x-stripeOperations":[{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/charges/{charge}/refunds"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/charges/{charge}/refunds/{refund}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/refunds"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/refunds/{refund}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/refunds"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/refunds/{refund}"},{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"post","path":"/v1/refunds/{refund}/cancel"},{"method_name":"expire","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/refunds/{refund}/expire"}],"x-stripeResource":{"class_name":"Refund","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"refund_destination_details":{"description":"","properties":{"affirm":{"$ref":"#/$defs/destination_details_unimplemented"},"afterpay_clearpay":{"$ref":"#/$defs/destination_details_unimplemented"},"alipay":{"$ref":"#/$defs/destination_details_unimplemented"},"alma":{"$ref":"#/$defs/destination_details_unimplemented"},"amazon_pay":{"$ref":"#/$defs/destination_details_unimplemented"},"au_bank_transfer":{"$ref":"#/$defs/destination_details_unimplemented"},"blik":{"$ref":"#/$defs/refund_destination_details_blik"},"br_bank_transfer":{"$ref":"#/$defs/refund_destination_details_br_bank_transfer"},"card":{"$ref":"#/$defs/refund_destination_details_card"},"cashapp":{"$ref":"#/$defs/destination_details_unimplemented"},"crypto":{"$ref":"#/$defs/refund_destination_details_crypto"},"customer_cash_balance":{"$ref":"#/$defs/destination_details_unimplemented"},"eps":{"$ref":"#/$defs/destination_details_unimplemented"},"eu_bank_transfer":{"$ref":"#/$defs/refund_destination_details_eu_bank_transfer"},"gb_bank_transfer":{"$ref":"#/$defs/refund_destination_details_gb_bank_transfer"},"giropay":{"$ref":"#/$defs/destination_details_unimplemented"},"grabpay":{"$ref":"#/$defs/destination_details_unimplemented"},"jp_bank_transfer":{"$ref":"#/$defs/refund_destination_details_jp_bank_transfer"},"klarna":{"$ref":"#/$defs/destination_details_unimplemented"},"mb_way":{"$ref":"#/$defs/refund_destination_details_mb_way"},"multibanco":{"$ref":"#/$defs/refund_destination_details_multibanco"},"mx_bank_transfer":{"$ref":"#/$defs/refund_destination_details_mx_bank_transfer"},"nz_bank_transfer":{"$ref":"#/$defs/destination_details_unimplemented"},"p24":{"$ref":"#/$defs/refund_destination_details_p24"},"paynow":{"$ref":"#/$defs/destination_details_unimplemented"},"paypal":{"$ref":"#/$defs/refund_destination_details_paypal"},"pix":{"$ref":"#/$defs/destination_details_unimplemented"},"revolut":{"$ref":"#/$defs/destination_details_unimplemented"},"sofort":{"$ref":"#/$defs/destination_details_unimplemented"},"swish":{"$ref":"#/$defs/refund_destination_details_swish"},"th_bank_transfer":{"$ref":"#/$defs/refund_destination_details_th_bank_transfer"},"twint":{"$ref":"#/$defs/destination_details_unimplemented"},"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":"#/$defs/refund_destination_details_us_bank_transfer"},"wechat_pay":{"$ref":"#/$defs/destination_details_unimplemented"},"zip":{"$ref":"#/$defs/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","crypto","customer_cash_balance","eps","eu_bank_transfer","gb_bank_transfer","giropay","grabpay","jp_bank_transfer","klarna","mb_way","multibanco","mx_bank_transfer","nz_bank_transfer","p24","paynow","paypal","pix","revolut","sofort","swish","th_bank_transfer","twint","us_bank_transfer","wechat_pay","zip"],"x-stripeMostCommon":["affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_bank_transfer","blik","br_bank_transfer","card","cashapp","crypto","customer_cash_balance","eps","eu_bank_transfer","gb_bank_transfer","giropay","grabpay","jp_bank_transfer","klarna","mb_way","multibanco","mx_bank_transfer","nz_bank_transfer","p24","paynow","paypal","pix","revolut","sofort","swish","th_bank_transfer","twint","type","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"}},"required":["network_decline_code","reference","reference_status"],"title":"refund_destination_details_blik","type":"object","x-expandableFields":[],"x-stripeMostCommon":["network_decline_code","reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_br_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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":[],"x-stripeMostCommon":["reference","reference_status","reference_type","type"]},"refund_destination_details_crypto":{"description":"","properties":{"reference":{"description":"The transaction hash of the refund.","maxLength":5000,"nullable":true,"type":"string"}},"required":["reference"],"title":"refund_destination_details_crypto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_eu_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_gb_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_jp_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"refund_destination_details_mb_way":{"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_mb_way","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_multibanco","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_mx_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_p24","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"refund_destination_details_paypal":{"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"}},"required":["network_decline_code"],"title":"refund_destination_details_paypal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["network_decline_code"]},"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"}},"required":["network_decline_code","reference","reference_status"],"title":"refund_destination_details_swish","type":"object","x-expandableFields":[],"x-stripeMostCommon":["network_decline_code","reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_th_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"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"}},"required":["reference","reference_status"],"title":"refund_destination_details_us_bank_transfer","type":"object","x-expandableFields":[],"x-stripeMostCommon":["reference","reference_status"]},"refund_next_action":{"description":"","properties":{"display_details":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["display_details","type"]},"refund_next_action_display_details":{"description":"","properties":{"email_sent":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["email_sent","expires_at"]},"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","description","id","object"],"title":"ReserveTransaction","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","currency","description","id","object"],"x-stripeResource":{"class_name":"ReserveTransaction","in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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://docs.stripe.com/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":"#/$defs/charge"}],"description":"The charge associated with this review.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`.","enum":["acknowledged","approved","canceled","disputed","payment_never_settled","redacted","refunded","refunded_as_fraud"],"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"},"ip_address":{"description":"The IP address where the payment originated.","maxLength":5000,"nullable":true,"type":"string"},"ip_address_location":{"anyOf":[{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/payment_intent"}],"description":"The PaymentIntent ID associated with this review, if one exists.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_intent"}]}},"reason":{"description":"The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`.","maxLength":5000,"type":"string"},"session":{"anyOf":[{"$ref":"#/$defs/radar_review_resource_session"}],"description":"Information related to the browsing session of the user who initiated the payment.","nullable":true}},"required":["billing_zip","charge","closed_reason","created","id","ip_address","ip_address_location","livemode","object","open","opened_reason","reason","session"],"title":"RadarReview","type":"object","x-expandableFields":["charge","ip_address_location","payment_intent","session"],"x-resourceId":"review","x-stripeMostCommon":["charge","id","open","payment_intent","reason"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/reviews"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/reviews/{review}"},{"method_name":"approve","method_on":"service","method_type":"custom","operation":"post","path":"/v1/reviews/{review}/approve"}],"x-stripeResource":{"class_name":"Review","has_collection_class":true,"in_package":""}},"revolut_pay_underlying_payment_method_funding_details":{"description":"","properties":{"card":{"$ref":"#/$defs/payment_method_details_passthrough_card"},"type":{"description":"funding type of the underlying payment method.","enum":["card"],"nullable":true,"type":"string"}},"required":["type"],"title":"revolut_pay_underlying_payment_method_funding_details","type":"object","x-expandableFields":["card"],"x-stripeMostCommon":["card","type"]},"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":[],"x-stripeMostCommon":["action","id","predicate"],"x-stripeResource":{"class_name":"Rule","in_package":"Radar"}},"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":"#/$defs/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":["disabled_reason","enabled","liability"],"title":"SchedulesPhaseAutomaticTax","type":"object","x-expandableFields":["liability"],"x-stripeMostCommon":["disabled_reason","enabled","liability"]},"sepa_debit_generated_from":{"description":"","properties":{"charge":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/charge"}],"description":"The ID of the Charge that generated this PaymentMethod, if any.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/charge"}]}},"setup_attempt":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/setup_attempt"}],"description":"The ID of the SetupAttempt that generated this PaymentMethod, if any.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/setup_attempt"}]}}},"required":["charge","setup_attempt"],"title":"sepa_debit_generated_from","type":"object","x-expandableFields":["charge","setup_attempt"],"x-stripeMostCommon":["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":"#/$defs/application"}],"description":"The value of [application](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"The value of [customer](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"The value of [customer_account](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation.","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"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/account"}],"description":"The value of [on_behalf_of](https://docs.stripe.com/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":"#/$defs/account"}]}},"payment_method":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_method"}],"description":"ID of the payment method used with this SetupAttempt.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"payment_method_details":{"$ref":"#/$defs/setup_attempt_payment_method_details"},"setup_error":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/setup_intent"}],"description":"ID of the SetupIntent that this attempt belongs to.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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://docs.stripe.com/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":["application","created","customer","customer_account","flow_directions","id","livemode","object","on_behalf_of","payment_method","payment_method_details","setup_error","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","x-stripeMostCommon":["application","attach_to_self","created","customer","customer_account","flow_directions","id","livemode","object","on_behalf_of","payment_method","payment_method_details","setup_error","setup_intent","status","usage"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/setup_attempts"}],"x-stripeResource":{"class_name":"SetupAttempt","has_collection_class":true,"in_package":""}},"setup_attempt_payment_method_details":{"description":"","properties":{"acss_debit":{"$ref":"#/$defs/setup_attempt_payment_method_details_acss_debit"},"amazon_pay":{"$ref":"#/$defs/setup_attempt_payment_method_details_amazon_pay"},"au_becs_debit":{"$ref":"#/$defs/setup_attempt_payment_method_details_au_becs_debit"},"bacs_debit":{"$ref":"#/$defs/setup_attempt_payment_method_details_bacs_debit"},"bancontact":{"$ref":"#/$defs/setup_attempt_payment_method_details_bancontact"},"boleto":{"$ref":"#/$defs/setup_attempt_payment_method_details_boleto"},"card":{"$ref":"#/$defs/setup_attempt_payment_method_details_card"},"card_present":{"$ref":"#/$defs/setup_attempt_payment_method_details_card_present"},"cashapp":{"$ref":"#/$defs/setup_attempt_payment_method_details_cashapp"},"ideal":{"$ref":"#/$defs/setup_attempt_payment_method_details_ideal"},"kakao_pay":{"$ref":"#/$defs/setup_attempt_payment_method_details_kakao_pay"},"klarna":{"$ref":"#/$defs/setup_attempt_payment_method_details_klarna"},"kr_card":{"$ref":"#/$defs/setup_attempt_payment_method_details_kr_card"},"link":{"$ref":"#/$defs/setup_attempt_payment_method_details_link"},"naver_pay":{"$ref":"#/$defs/setup_attempt_payment_method_details_naver_pay"},"nz_bank_account":{"$ref":"#/$defs/setup_attempt_payment_method_details_nz_bank_account"},"paypal":{"$ref":"#/$defs/setup_attempt_payment_method_details_paypal"},"payto":{"$ref":"#/$defs/setup_attempt_payment_method_details_payto"},"revolut_pay":{"$ref":"#/$defs/setup_attempt_payment_method_details_revolut_pay"},"sepa_debit":{"$ref":"#/$defs/setup_attempt_payment_method_details_sepa_debit"},"sofort":{"$ref":"#/$defs/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"},"upi":{"$ref":"#/$defs/setup_attempt_payment_method_details_upi"},"us_bank_account":{"$ref":"#/$defs/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","naver_pay","nz_bank_account","paypal","payto","revolut_pay","sepa_debit","sofort","upi","us_bank_account"],"x-stripeMostCommon":["acss_debit","amazon_pay","au_becs_debit","bacs_debit","bancontact","boleto","card","card_present","cashapp","ideal","kakao_pay","klarna","kr_card","link","naver_pay","nz_bank_account","paypal","payto","revolut_pay","sepa_debit","sofort","type","upi","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":[],"x-stripeResource":{"class_name":"AuBecsDebit","in_package":""}},"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":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"}},"required":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"title":"setup_attempt_payment_method_details_bancontact","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"x-stripeResource":{"class_name":"Bancontact","in_package":""}},"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`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.","maxLength":5000,"nullable":true,"type":"string"},"checks":{"anyOf":[{"$ref":"#/$defs/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"},"description":{"description":"A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)","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"},"iin":{"description":"Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)","maxLength":5000,"nullable":true,"type":"string"},"issuer":{"description":"The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)","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":"#/$defs/three_d_secure_details"}],"description":"Populated if this authorization used 3D Secure authentication.","nullable":true},"wallet":{"anyOf":[{"$ref":"#/$defs/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}},"required":["brand","checks","country","exp_month","exp_year","funding","last4","network","three_d_secure","wallet"],"title":"setup_attempt_payment_method_details_card","type":"object","x-expandableFields":["checks","three_d_secure","wallet"],"x-stripeMostCommon":["brand","checks","country","description","exp_month","exp_year","fingerprint","funding","iin","issuer","last4","network","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"}},"required":["address_line1_check","address_postal_code_check","cvc_check"],"title":"setup_attempt_payment_method_details_card_checks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["address_line1_check","address_postal_code_check","cvc_check"]},"setup_attempt_payment_method_details_card_present":{"description":"","properties":{"generated_card":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_method"}],"description":"The ID of the Card PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"offline":{"anyOf":[{"$ref":"#/$defs/payment_method_details_card_present_offline"}],"description":"Details about payments collected offline.","nullable":true}},"required":["generated_card","offline"],"title":"setup_attempt_payment_method_details_card_present","type":"object","x-expandableFields":["generated_card","offline"],"x-stripeMostCommon":["generated_card","offline"],"x-stripeResource":{"class_name":"CardPresent","in_package":""}},"setup_attempt_payment_method_details_card_wallet":{"description":"","properties":{"apple_pay":{"$ref":"#/$defs/payment_method_details_card_wallet_apple_pay"},"google_pay":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["apple_pay","google_pay","type"]},"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`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.","enum":["abn_amro","adyen","asn_bank","bunq","buut","finom","handelsbanken","ing","knab","mollie","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","ADYBNL2A","ASNBNL21","BITSNL2A","BUNQNL2A","BUUTNL2A","FNOMNL22","FVLBNL22","HANDNL2A","INGBNL2A","KNABNL2H","MLLENL2A","MOYONL21","NNBANL2G","NTSBDEB1","RABONL2U","RBRBNL21","REVOIE23","REVOLT21","SNSBNL2A","TRIONL2U"],"nullable":true,"type":"string"},"generated_sepa_debit":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"}},"required":["bank","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","verified_name"],"title":"setup_attempt_payment_method_details_ideal","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","verified_name"]},"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_naver_pay":{"description":"","properties":{"buyer_id":{"description":"Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.","maxLength":5000,"type":"string"}},"title":"setup_attempt_payment_method_details_naver_pay","type":"object","x-expandableFields":[],"x-stripeMostCommon":["buyer_id"]},"setup_attempt_payment_method_details_nz_bank_account":{"description":"","properties":{},"title":"setup_attempt_payment_method_details_nz_bank_account","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"NzBankAccount","in_package":""}},"setup_attempt_payment_method_details_paypal":{"description":"","properties":{},"title":"setup_attempt_payment_method_details_paypal","type":"object","x-expandableFields":[]},"setup_attempt_payment_method_details_payto":{"description":"","properties":{},"title":"setup_attempt_payment_method_details_payto","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":[],"x-stripeResource":{"class_name":"RevolutPay","in_package":""}},"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":"#/$defs/payment_method"}],"description":"The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"generated_sepa_debit_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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"}},"required":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"],"title":"setup_attempt_payment_method_details_sofort","type":"object","x-expandableFields":["generated_sepa_debit","generated_sepa_debit_mandate"],"x-stripeMostCommon":["bank_code","bank_name","bic","generated_sepa_debit","generated_sepa_debit_mandate","iban_last4","preferred_language","verified_name"]},"setup_attempt_payment_method_details_upi":{"description":"","properties":{},"title":"setup_attempt_payment_method_details_upi","type":"object","x-expandableFields":[]},"setup_attempt_payment_method_details_us_bank_account":{"description":"","properties":{},"title":"setup_attempt_payment_method_details_us_bank_account","type":"object","x-expandableFields":[],"x-stripeResource":{"class_name":"UsBankAccount","in_package":""}},"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://api.stripe.com#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://api.stripe.com#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://api.stripe.com#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":"#/$defs/application"}],"description":"ID of the Connect application that created the SetupIntent.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"ID of the Account this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent.","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"},"excluded_payment_method_types":{"description":"Payment method types that are excluded from this SetupIntent.","items":{"enum":["acss_debit","affirm","afterpay_clearpay","alipay","alma","amazon_pay","au_becs_debit","bacs_debit","bancontact","billie","blik","boleto","card","cashapp","crypto","customer_balance","eps","fpx","giropay","grabpay","ideal","kakao_pay","klarna","konbini","kr_card","mb_way","mobilepay","multibanco","naver_pay","nz_bank_account","oxxo","p24","pay_by_bank","payco","paynow","paypal","payto","pix","promptpay","revolut_pay","samsung_pay","satispay","sepa_debit","sofort","swish","twint","upi","us_bank_account","wechat_pay","zip"],"type":"string","x-stripeBypassValidation":true},"nullable":true,"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"},"nullable":true,"type":"array"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"last_setup_error":{"anyOf":[{"$ref":"#/$defs/api_errors"}],"description":"The error encountered in the previous SetupIntent confirmation.","nullable":true},"latest_attempt":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/setup_attempt"}],"description":"The most recent SetupAttempt for this SetupIntent.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/setup_attempt"}]}},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"ID of the multi use Mandate generated by the SetupIntent.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/mandate"}]}},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/account"}],"description":"The account (if any) for which the setup is intended.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"payment_method":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/payment_method"}]}},"payment_method_configuration_details":{"anyOf":[{"$ref":"#/$defs/payment_method_config_biz_payment_method_configuration_details"}],"description":"Information about the [payment method configuration](https://docs.stripe.com/api/payment_method_configurations) used for this Setup Intent.","nullable":true},"payment_method_options":{"anyOf":[{"$ref":"#/$defs/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. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).","items":{"maxLength":5000,"type":"string"},"type":"array"},"single_use_mandate":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/mandate"}],"description":"ID of the single_use Mandate generated by the SetupIntent.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/mandate"}]}},"status":{"description":"[Status](https://docs.stripe.com/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":["application","automatic_payment_methods","cancellation_reason","client_secret","created","customer","description","excluded_payment_method_types","id","last_setup_error","latest_attempt","livemode","mandate","metadata","next_action","object","on_behalf_of","payment_method","payment_method_configuration_details","payment_method_options","payment_method_types","single_use_mandate","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","x-stripeMostCommon":["automatic_payment_methods","client_secret","customer","customer_account","description","id","last_setup_error","metadata","next_action","payment_method","status","usage"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/setup_intents"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/setup_intents/{intent}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/setup_intents"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/setup_intents/{intent}"},{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"post","path":"/v1/setup_intents/{intent}/cancel"},{"method_name":"confirm","method_on":"service","method_type":"custom","operation":"post","path":"/v1/setup_intents/{intent}/confirm"},{"method_name":"verify_microdeposits","method_on":"service","method_type":"custom","operation":"post","path":"/v1/setup_intents/{intent}/verify_microdeposits"}],"x-stripeResource":{"class_name":"SetupIntent","has_collection_class":true,"in_package":""}},"setup_intent_next_action":{"description":"","properties":{"cashapp_handle_redirect_or_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code"},"redirect_to_url":{"$ref":"#/$defs/setup_intent_next_action_redirect_to_url"},"type":{"description":"Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.","maxLength":5000,"type":"string"},"upi_handle_redirect_or_display_qr_code":{"$ref":"#/$defs/payment_intent_next_action_upi_handle_redirect_or_display_qr_code"},"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":"#/$defs/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","upi_handle_redirect_or_display_qr_code","verify_with_microdeposits"],"x-stripeMostCommon":["cashapp_handle_redirect_or_display_qr_code","redirect_to_url","type","upi_handle_redirect_or_display_qr_code","use_stripe_sdk","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"}},"required":["return_url","url"],"title":"SetupIntentNextActionRedirectToUrl","type":"object","x-expandableFields":[],"x-stripeMostCommon":["return_url","url"],"x-stripeResource":{"class_name":"NextActionRedirectToUrl","in_package":""}},"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","microdeposit_type"],"title":"SetupIntentNextActionVerifyWithMicrodeposits","type":"object","x-expandableFields":[],"x-stripeMostCommon":["arrival_date","hosted_verification_url","microdeposit_type"]},"setup_intent_payment_method_options":{"description":"","properties":{"acss_debit":{"$ref":"#/$defs/setup_intent_payment_method_options_acss_debit"},"amazon_pay":{"$ref":"#/$defs/setup_intent_payment_method_options_amazon_pay"},"bacs_debit":{"$ref":"#/$defs/setup_intent_payment_method_options_bacs_debit"},"card":{"$ref":"#/$defs/setup_intent_payment_method_options_card"},"card_present":{"$ref":"#/$defs/setup_intent_payment_method_options_card_present"},"klarna":{"$ref":"#/$defs/setup_intent_payment_method_options_klarna"},"link":{"$ref":"#/$defs/setup_intent_payment_method_options_link"},"paypal":{"$ref":"#/$defs/setup_intent_payment_method_options_paypal"},"payto":{"$ref":"#/$defs/setup_intent_payment_method_options_payto"},"sepa_debit":{"$ref":"#/$defs/setup_intent_payment_method_options_sepa_debit"},"upi":{"$ref":"#/$defs/setup_intent_payment_method_options_upi"},"us_bank_account":{"$ref":"#/$defs/setup_intent_payment_method_options_us_bank_account"}},"title":"SetupIntentPaymentMethodOptions","type":"object","x-expandableFields":["acss_debit","amazon_pay","bacs_debit","card","card_present","klarna","link","paypal","payto","sepa_debit","upi","us_bank_account"],"x-stripeMostCommon":["acss_debit","amazon_pay","bacs_debit","card","card_present","klarna","link","paypal","payto","sepa_debit","upi","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":"#/$defs/setup_intent_payment_method_options_mandate_options_acss_debit"},"verification_method":{"description":"Bank account verification method. The default value is `automatic`.","enum":["automatic","instant","microdeposits"],"type":"string","x-stripeBypassValidation":true}},"required":["currency"],"title":"setup_intent_payment_method_options_acss_debit","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["currency","mandate_options","verification_method"]},"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":"#/$defs/setup_intent_payment_method_options_mandate_options_bacs_debit"}},"title":"setup_intent_payment_method_options_bacs_debit","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options"]},"setup_intent_payment_method_options_card":{"description":"","properties":{"mandate_options":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/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://docs.stripe.com/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}},"required":["mandate_options","network","request_three_d_secure"],"title":"setup_intent_payment_method_options_card","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options","network","request_three_d_secure"]},"setup_intent_payment_method_options_card_mandate_options":{"description":"","properties":{"amount":{"description":"Amount to be charged for future payments, specified in the presentment currency.","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","description","end_date","interval","interval_count","reference","start_date","supported_types"],"title":"setup_intent_payment_method_options_card_mandate_options","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","currency","description","end_date","interval","interval_count","reference","start_date","supported_types"],"x-stripeResource":{"class_name":"MandateOptions","in_package":""}},"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_klarna":{"description":"","properties":{"currency":{"description":"The currency of the setup intent. Three letter ISO currency code.","format":"currency","nullable":true,"type":"string"},"preferred_locale":{"description":"Preferred locale of the Klarna checkout page that the customer is redirected to.","maxLength":5000,"nullable":true,"type":"string"}},"required":["currency","preferred_locale"],"title":"setup_intent_payment_method_options_klarna","type":"object","x-expandableFields":[],"x-stripeMostCommon":["currency","preferred_locale"]},"setup_intent_payment_method_options_link":{"description":"","properties":{"persistent_token":{"description":"[Deprecated] This is a legacy parameter that no longer has any function.","maxLength":5000,"nullable":true,"type":"string"}},"required":["persistent_token"],"title":"setup_intent_payment_method_options_link","type":"object","x-expandableFields":[],"x-stripeMostCommon":["persistent_token"]},"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"}},"required":["interval_description","payment_schedule","transaction_type"],"title":"setup_intent_payment_method_options_mandate_options_acss_debit","type":"object","x-expandableFields":[],"x-stripeMostCommon":["custom_mandate_url","default_for","interval_description","payment_schedule","transaction_type"]},"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":[],"x-stripeMostCommon":["reference_prefix"],"x-stripeResource":{"class_name":"BacsDebitMandateOptions","in_package":""}},"setup_intent_payment_method_options_mandate_options_payto":{"description":"","properties":{"amount":{"description":"Amount that will be collected. It is required when `amount_type` is `fixed`.","nullable":true,"type":"integer"},"amount_type":{"description":"The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.","enum":["fixed","maximum"],"nullable":true,"type":"string"},"end_date":{"description":"Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.","maxLength":5000,"nullable":true,"type":"string"},"payment_schedule":{"description":"The periodicity at which payments will be collected. Defaults to `adhoc`.","enum":["adhoc","annual","daily","fortnightly","monthly","quarterly","semi_annual","weekly"],"nullable":true,"type":"string"},"payments_per_period":{"description":"The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.","nullable":true,"type":"integer"},"purpose":{"description":"The purpose for which payments are made. Has a default value based on your merchant category code.","enum":["dependant_support","government","loan","mortgage","other","pension","personal","retail","salary","tax","utility"],"nullable":true,"type":"string"},"start_date":{"description":"Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.","maxLength":5000,"nullable":true,"type":"string"}},"required":["amount","amount_type","end_date","payment_schedule","payments_per_period","purpose","start_date"],"title":"setup_intent_payment_method_options_mandate_options_payto","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","amount_type","end_date","payment_schedule","payments_per_period","purpose","start_date"]},"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":[],"x-stripeMostCommon":["reference_prefix"],"x-stripeResource":{"class_name":"SepaDebitMandateOptions","in_package":""}},"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"}},"required":["billing_agreement_id"],"title":"setup_intent_payment_method_options_paypal","type":"object","x-expandableFields":[],"x-stripeMostCommon":["billing_agreement_id"]},"setup_intent_payment_method_options_payto":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/setup_intent_payment_method_options_mandate_options_payto"}},"title":"setup_intent_payment_method_options_payto","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options"]},"setup_intent_payment_method_options_sepa_debit":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/setup_intent_payment_method_options_mandate_options_sepa_debit"}},"title":"setup_intent_payment_method_options_sepa_debit","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options"]},"setup_intent_payment_method_options_upi":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/payment_method_options_mandate_options_upi"}},"title":"setup_intent_payment_method_options_upi","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options"]},"setup_intent_payment_method_options_us_bank_account":{"description":"","properties":{"financial_connections":{"$ref":"#/$defs/linked_account_options_common"},"mandate_options":{"$ref":"#/$defs/payment_method_options_us_bank_account_mandate_options"},"verification_method":{"description":"Bank account verification method. The default value is `automatic`.","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"],"x-stripeMostCommon":["financial_connections","mandate_options","verification_method"]},"shipping":{"description":"","properties":{"address":{"$ref":"#/$defs/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"],"x-stripeMostCommon":["address","carrier","name","phone","tracking_number"],"x-stripeResource":{"class_name":"ShippingDetails","in_package":""}},"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://docs.stripe.com/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":"#/$defs/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":"#/$defs/shipping_rate_fixed_amount"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/tax_code"}],"description":"A [tax code](https://docs.stripe.com/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_code"}]}},"type":{"description":"The type of calculation to use on the shipping rate.","enum":["fixed_amount"],"type":"string"}},"required":["active","created","delivery_estimate","display_name","id","livemode","metadata","object","tax_behavior","tax_code","type"],"title":"ShippingRate","type":"object","x-expandableFields":["delivery_estimate","fixed_amount","tax_code"],"x-resourceId":"shipping_rate","x-stripeMostCommon":["active","display_name","fixed_amount","id","metadata","tax_behavior","tax_code","type"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/shipping_rates"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/shipping_rates/{shipping_rate_token}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/shipping_rates"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/shipping_rates/{shipping_rate_token}"}],"x-stripeResource":{"class_name":"ShippingRate","has_collection_class":true,"in_package":""}},"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":[],"x-stripeMostCommon":["amount","tax_behavior"]},"shipping_rate_delivery_estimate":{"description":"","properties":{"maximum":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/shipping_rate_delivery_estimate_bound"}],"description":"The lower bound of the estimated range. If empty, represents no lower bound.","nullable":true}},"required":["maximum","minimum"],"title":"ShippingRateDeliveryEstimate","type":"object","x-expandableFields":["maximum","minimum"],"x-stripeMostCommon":["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":[],"x-stripeMostCommon":["unit","value"]},"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":"#/$defs/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"],"x-stripeMostCommon":["amount","currency","currency_options"]},"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://docs.stripe.com/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers).","properties":{"ach_credit_transfer":{"$ref":"#/$defs/source_type_ach_credit_transfer"},"ach_debit":{"$ref":"#/$defs/source_type_ach_debit"},"acss_debit":{"$ref":"#/$defs/source_type_acss_debit"},"alipay":{"$ref":"#/$defs/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":"#/$defs/source_type_au_becs_debit"},"bancontact":{"$ref":"#/$defs/source_type_bancontact"},"card":{"$ref":"#/$defs/source_type_card"},"card_present":{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/source_type_giropay"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"ideal":{"$ref":"#/$defs/source_type_ideal"},"klarna":{"$ref":"#/$defs/source_type_klarna"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/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":"#/$defs/source_type_p24"},"receiver":{"$ref":"#/$defs/source_receiver_flow"},"redirect":{"$ref":"#/$defs/source_redirect_flow"},"sepa_credit_transfer":{"$ref":"#/$defs/source_type_sepa_credit_transfer"},"sepa_debit":{"$ref":"#/$defs/source_type_sepa_debit"},"sofort":{"$ref":"#/$defs/source_type_sofort"},"source_order":{"$ref":"#/$defs/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":"#/$defs/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://docs.stripe.com/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_credit_transfer","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":"#/$defs/source_type_wechat"}},"required":["allow_redisplay","amount","client_secret","created","currency","flow","id","livemode","metadata","object","owner","statement_descriptor","status","type","usage"],"title":"Source","type":"object","x-expandableFields":["code_verification","owner","receiver","redirect","source_order"],"x-resourceId":"source","x-stripeMostCommon":["amount","currency","customer","id","metadata","owner","redirect","statement_descriptor","status","type"],"x-stripeOperations":[{"method_name":"detach","method_on":"service","method_type":"custom","operation":"delete","path":"/v1/customers/{customer}/sources/{id}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/sources/{source}"},{"method_name":"source_transactions","method_on":"service","method_type":"custom","operation":"get","path":"/v1/sources/{source}/source_transactions"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/sources"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/sources/{source}"},{"method_name":"verify","method_on":"service","method_type":"custom","operation":"post","path":"/v1/sources/{source}/verify"}],"x-stripeResource":{"class_name":"Source","in_package":"","polymorphic_groups":["deleted_payment_source","payment_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":[],"x-stripeMostCommon":["attempts_remaining","status"]},"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":"#/$defs/source_order_item"},"nullable":true,"type":"array"},"shipping":{"$ref":"#/$defs/shipping"}},"required":["amount","currency","items"],"title":"SourceOrder","type":"object","x-expandableFields":["items","shipping"],"x-stripeMostCommon":["amount","currency","email","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"}},"required":["amount","currency","description","parent","type"],"title":"SourceOrderItem","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount","currency","description","parent","quantity","type"]},"source_owner":{"description":"","properties":{"address":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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"}},"required":["address","email","name","phone","verified_address","verified_email","verified_name","verified_phone"],"title":"SourceOwner","type":"object","x-expandableFields":["address","verified_address"],"x-stripeMostCommon":["address","email","name","phone","verified_address","verified_email","verified_name","verified_phone"]},"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":["address","amount_charged","amount_received","amount_returned","refund_attributes_method","refund_attributes_status"],"title":"SourceReceiverFlow","type":"object","x-expandableFields":[],"x-stripeMostCommon":["address","amount_charged","amount_received","amount_returned","refund_attributes_method","refund_attributes_status"]},"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` (successful 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":["failure_reason","return_url","status","url"],"title":"SourceRedirectFlow","type":"object","x-expandableFields":[],"x-stripeMostCommon":["failure_reason","return_url","status","url"]},"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","x-stripeResource":{"class_name":"AchCreditTransfer"}},"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","x-stripeResource":{"class_name":"AchDebit"}},"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","x-stripeResource":{"class_name":"AcssDebit"}},"source_type_alipay":{"properties":{"data_string":{"nullable":true,"type":"string"},"native_url":{"nullable":true,"type":"string"},"statement_descriptor":{"nullable":true,"type":"string"}},"type":"object","x-stripeResource":{"class_name":"Alipay"}},"source_type_au_becs_debit":{"properties":{"bsb_number":{"nullable":true,"type":"string"},"fingerprint":{"nullable":true,"type":"string"},"last4":{"nullable":true,"type":"string"}},"type":"object","x-stripeResource":{"class_name":"AuBecsDebit"}},"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","x-stripeResource":{"class_name":"Bancontact"}},"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"},"description":{"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"},"iin":{"type":"string"},"issuer":{"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","x-stripeResource":{"class_name":"Card"}},"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"},"description":{"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"},"iin":{"type":"string"},"issuer":{"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","x-stripeResource":{"class_name":"CardPresent"}},"source_type_eps":{"properties":{"reference":{"nullable":true,"type":"string"},"statement_descriptor":{"nullable":true,"type":"string"}},"type":"object","x-stripeResource":{"class_name":"Eps"}},"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","x-stripeResource":{"class_name":"Giropay"}},"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","x-stripeResource":{"class_name":"Ideal"}},"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","x-stripeResource":{"class_name":"Klarna"}},"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","x-stripeResource":{"class_name":"Multibanco"}},"source_type_p24":{"properties":{"reference":{"nullable":true,"type":"string"}},"type":"object","x-stripeResource":{"class_name":"P24"}},"source_type_sepa_credit_transfer":{"properties":{"bank_name":{"nullable":true,"type":"string"},"bic":{"nullable":true,"type":"string"},"iban":{"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","x-stripeResource":{"class_name":"SepaCreditTransfer"}},"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","x-stripeResource":{"class_name":"SepaDebit"}},"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","x-stripeResource":{"class_name":"Sofort"}},"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"},"description":{"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"},"iin":{"type":"string"},"issuer":{"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","x-stripeResource":{"class_name":"ThreeDSecure"}},"source_type_wechat":{"properties":{"prepay_id":{"type":"string"},"qr_code_url":{"nullable":true,"type":"string"},"statement_descriptor":{"type":"string"}},"type":"object","x-stripeResource":{"class_name":"Wechat"}},"stackable_discount_with_discount_settings":{"description":"","properties":{"coupon":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/coupon"}],"description":"ID of the coupon to create a new discount for.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/coupon"}]}},"discount":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/discount"}],"description":"ID of an existing discount on the object (or one of its ancestors) to reuse.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/discount"}]}},"promotion_code":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/promotion_code"}],"description":"ID of the promotion code to create a new discount for.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/promotion_code"}]}}},"required":["coupon","discount","promotion_code"],"title":"StackableDiscountWithDiscountSettings","type":"object","x-expandableFields":["coupon","discount","promotion_code"],"x-stripeMostCommon":["coupon","discount","promotion_code"]},"stackable_discount_with_discount_settings_and_discount_end":{"description":"","properties":{"coupon":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/coupon"}],"description":"ID of the coupon to create a new discount for.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/coupon"}]}},"discount":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/discount"}],"description":"ID of an existing discount on the object (or one of its ancestors) to reuse.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/discount"}]}},"promotion_code":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/promotion_code"}],"description":"ID of the promotion code to create a new discount for.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/promotion_code"}]}}},"required":["coupon","discount","promotion_code"],"title":"StackableDiscountWithDiscountSettingsAndDiscountEnd","type":"object","x-expandableFields":["coupon","discount","promotion_code"],"x-stripeMostCommon":["coupon","discount","promotion_code"]},"subscription":{"description":"Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)","properties":{"application":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/application"},{"$ref":"#/$defs/deleted_application"}],"description":"ID of the Connect Application that created the subscription.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application"},{"$ref":"#/$defs/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":"#/$defs/subscription_automatic_tax"},"billing_cycle_anchor":{"description":"The reference point that aligns future [billing cycle](https://docs.stripe.com/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":"#/$defs/subscriptions_resource_billing_cycle_anchor_config"}],"description":"The fixed values used to calculate the `billing_cycle_anchor`.","nullable":true},"billing_mode":{"$ref":"#/$defs/subscriptions_resource_billing_mode"},"billing_thresholds":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"ID of the customer who owns the subscription.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"ID of the account representing the customer who owns the subscription.","maxLength":5000,"nullable":true,"type":"string"},"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":"#/$defs/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://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_method"}]}},"default_source":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/payment_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://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/payment_source"}]}},"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":"#/$defs/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"},"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":"#/$defs/discount"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"latest_invoice":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/invoice"}],"description":"The most recent invoice this subscription has generated over its lifecycle (for example, when it cycles or is updated).","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/invoice"}]}},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/account"}],"description":"The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://docs.stripe.com/connect/subscriptions#on-behalf-of) for details.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"pause_collection":{"anyOf":[{"$ref":"#/$defs/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://docs.stripe.com/billing/subscriptions/pause-payment).","nullable":true},"payment_settings":{"anyOf":[{"$ref":"#/$defs/subscriptions_resource_payment_settings"}],"description":"Payment settings passed on to invoices created by the subscription.","nullable":true},"pending_invoice_item_interval":{"anyOf":[{"$ref":"#/$defs/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](/api/invoices/create) for the given subscription at the specified interval.","nullable":true},"pending_setup_intent":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/setup_intent"}],"description":"You can use this [SetupIntent](https://docs.stripe.com/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://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2).","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/setup_intent"}]}},"pending_update":{"anyOf":[{"$ref":"#/$defs/subscriptions_resource_pending_update"}],"description":"If specified, [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.","nullable":true},"presentment_details":{"$ref":"#/$defs/subscriptions_resource_subscription_presentment_details"},"schedule":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/subscription_schedule"}],"description":"The schedule attached to the subscription","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/test_helpers.test_clock"}],"description":"ID of the test clock this subscription belongs to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/test_helpers.test_clock"}]}},"transfer_data":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/subscriptions_resource_trial_settings_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":["application","application_fee_percent","automatic_tax","billing_cycle_anchor","billing_cycle_anchor_config","billing_mode","billing_thresholds","cancel_at","cancel_at_period_end","canceled_at","cancellation_details","collection_method","created","currency","customer","customer_account","days_until_due","default_payment_method","default_source","description","discounts","ended_at","id","invoice_settings","items","latest_invoice","livemode","metadata","next_pending_invoice_item_invoice","object","on_behalf_of","pause_collection","payment_settings","pending_invoice_item_interval","pending_setup_intent","pending_update","schedule","start_date","status","test_clock","transfer_data","trial_end","trial_settings","trial_start"],"title":"Subscription","type":"object","x-expandableFields":["application","automatic_tax","billing_cycle_anchor_config","billing_mode","billing_thresholds","cancellation_details","customer","default_payment_method","default_source","default_tax_rates","discounts","invoice_settings","items","latest_invoice","on_behalf_of","pause_collection","payment_settings","pending_invoice_item_interval","pending_setup_intent","pending_update","presentment_details","schedule","test_clock","transfer_data","trial_settings"],"x-resourceId":"subscription","x-stripeMostCommon":["automatic_tax","currency","customer","customer_account","default_payment_method","description","id","items","latest_invoice","metadata","pending_setup_intent","pending_update","status"],"x-stripeOperations":[{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"delete","path":"/v1/subscriptions/{subscription_exposed_id}"},{"method_name":"delete_discount","method_on":"service","method_type":"custom","operation":"delete","path":"/v1/subscriptions/{subscription_exposed_id}/discount"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/subscriptions"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/subscriptions/{subscription_exposed_id}"},{"method_name":"search","method_on":"service","method_type":"custom","operation":"get","path":"/v1/subscriptions/search"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/subscriptions"},{"method_name":"migrate","method_on":"service","method_type":"custom","operation":"post","path":"/v1/subscriptions/{subscription}/migrate"},{"method_name":"resume","method_on":"service","method_type":"custom","operation":"post","path":"/v1/subscriptions/{subscription}/resume"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/subscriptions/{subscription_exposed_id}"}],"x-stripeResource":{"class_name":"Subscription","has_collection_class":true,"has_search_result_class":true,"in_package":""}},"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":"#/$defs/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":["disabled_reason","enabled","liability"],"title":"SubscriptionAutomaticTax","type":"object","x-expandableFields":["liability"],"x-stripeMostCommon":["disabled_reason","enabled","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"}},"required":["amount_gte","reset_billing_cycle_anchor"],"title":"SubscriptionBillingThresholds","type":"object","x-expandableFields":[],"x-stripeMostCommon":["amount_gte","reset_billing_cycle_anchor"]},"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":"#/$defs/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"},"current_period_end":{"description":"The end time of this subscription item's current billing period.","format":"unix-time","type":"integer"},"current_period_start":{"description":"The start time of this subscription item's current billing period.","format":"unix-time","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":"#/$defs/discount"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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://docs.stripe.com/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"},"plan":{"$ref":"#/$defs/plan"},"price":{"$ref":"#/$defs/price"},"quantity":{"description":"The [quantity](https://docs.stripe.com/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":"#/$defs/tax_rate"},"nullable":true,"type":"array"}},"required":["billing_thresholds","created","current_period_end","current_period_start","discounts","id","metadata","object","plan","price","subscription","tax_rates"],"title":"SubscriptionItem","type":"object","x-expandableFields":["billing_thresholds","discounts","plan","price","tax_rates"],"x-resourceId":"subscription_item","x-stripeMostCommon":["id","metadata","price","quantity","subscription"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/subscription_items/{item}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/subscription_items"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/subscription_items/{item}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/subscription_items"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/subscription_items/{item}"}],"x-stripeResource":{"class_name":"SubscriptionItem","has_collection_class":true,"in_package":""}},"subscription_item_billing_thresholds":{"description":"","properties":{"usage_gte":{"description":"Usage threshold that triggers the subscription to create an invoice","nullable":true,"type":"integer"}},"required":["usage_gte"],"title":"SubscriptionItemBillingThresholds","type":"object","x-expandableFields":[],"x-stripeMostCommon":["usage_gte"]},"subscription_payment_method_options_card":{"description":"","properties":{"mandate_options":{"$ref":"#/$defs/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://docs.stripe.com/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://docs.stripe.com/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"}},"required":["network","request_three_d_secure"],"title":"subscription_payment_method_options_card","type":"object","x-expandableFields":["mandate_options"],"x-stripeMostCommon":["mandate_options","network","request_three_d_secure"]},"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":[],"x-stripeMostCommon":["interval","interval_count"]},"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://docs.stripe.com/billing/subscriptions/subscription-schedules)","properties":{"application":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/application"},{"$ref":"#/$defs/deleted_application"}],"description":"ID of the Connect Application that created the schedule.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application"},{"$ref":"#/$defs/deleted_application"}]}},"billing_mode":{"$ref":"#/$defs/subscriptions_resource_billing_mode"},"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":"#/$defs/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":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}],"description":"ID of the customer who owns the subscription schedule.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"},{"$ref":"#/$defs/deleted_customer"}]}},"customer_account":{"description":"ID of the account who owns the subscription schedule.","maxLength":5000,"nullable":true,"type":"string"},"default_settings":{"$ref":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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://docs.stripe.com/billing/subscriptions/subscription-schedules).","enum":["active","canceled","completed","not_started","released"],"type":"string"},"subscription":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/subscription"}],"description":"ID of the subscription managed by the subscription schedule.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/subscription"}]}},"test_clock":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/test_helpers.test_clock"}],"description":"ID of the test clock this subscription schedule belongs to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/test_helpers.test_clock"}]}}},"required":["application","billing_mode","canceled_at","completed_at","created","current_phase","customer","customer_account","default_settings","end_behavior","id","livemode","metadata","object","phases","released_at","released_subscription","status","subscription","test_clock"],"title":"SubscriptionSchedule","type":"object","x-expandableFields":["application","billing_mode","current_phase","customer","default_settings","phases","subscription","test_clock"],"x-resourceId":"subscription_schedule","x-stripeMostCommon":["current_phase","customer","id","metadata","phases","status","subscription"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/subscription_schedules"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/subscription_schedules/{schedule}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/subscription_schedules"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/subscription_schedules/{schedule}"},{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"post","path":"/v1/subscription_schedules/{schedule}/cancel"},{"method_name":"release","method_on":"service","method_type":"custom","operation":"post","path":"/v1/subscription_schedules/{schedule}/release"}],"x-stripeResource":{"class_name":"SubscriptionSchedule","has_collection_class":true,"in_package":""}},"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":"#/$defs/discounts_resource_stackable_discount_with_discount_end"},"type":"array"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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"},"period":{"$ref":"#/$defs/subscription_schedule_add_invoice_item_period"},"price":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/price"},{"$ref":"#/$defs/deleted_price"}],"description":"ID of the price used to generate the invoice item.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/price"},{"$ref":"#/$defs/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":"#/$defs/tax_rate"},"nullable":true,"type":"array"}},"required":["discounts","metadata","period","price","quantity"],"title":"SubscriptionScheduleAddInvoiceItem","type":"object","x-expandableFields":["discounts","period","price","tax_rates"],"x-stripeMostCommon":["discounts","metadata","period","price","quantity","tax_rates"]},"subscription_schedule_add_invoice_item_period":{"description":"","properties":{"end":{"$ref":"#/$defs/subscription_schedules_resource_invoice_item_period_resource_period_end"},"start":{"$ref":"#/$defs/subscription_schedules_resource_invoice_item_period_resource_period_start"}},"required":["end","start"],"title":"SubscriptionScheduleAddInvoiceItemPeriod","type":"object","x-expandableFields":["end","start"],"x-stripeMostCommon":["end","start"]},"subscription_schedule_configuration_item":{"description":"A phase item describes the price and quantity of a phase.","properties":{"billing_thresholds":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/stackable_discount_with_discount_settings"},"type":"array"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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"},"plan":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/plan"},{"$ref":"#/$defs/deleted_plan"}],"description":"ID of the plan to which the customer should be subscribed.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/plan"},{"$ref":"#/$defs/deleted_plan"}]}},"price":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/price"},{"$ref":"#/$defs/deleted_price"}],"description":"ID of the price to which the customer should be subscribed.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/price"},{"$ref":"#/$defs/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":"#/$defs/tax_rate"},"nullable":true,"type":"array"}},"required":["billing_thresholds","discounts","metadata","plan","price"],"title":"SubscriptionScheduleConfigurationItem","type":"object","x-expandableFields":["billing_thresholds","discounts","plan","price","tax_rates"],"x-stripeMostCommon":["billing_thresholds","discounts","metadata","plan","price","quantity","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":[],"x-stripeMostCommon":["end_date","start_date"]},"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":"#/$defs/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":"#/$defs/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://docs.stripe.com/billing/subscriptions/billing-cycle).","enum":["automatic","phase_start"],"nullable":true,"type":"string"},"billing_thresholds":{"anyOf":[{"$ref":"#/$defs/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"},"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":"#/$defs/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":"#/$defs/payment_method"}]}},"default_tax_rates":{"description":"The default tax rates to apply to the subscription during this phase of the subscription schedule.","items":{"$ref":"#/$defs/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":"#/$defs/stackable_discount_with_discount_settings_and_discount_end"},"type":"array"},"end_date":{"description":"The end of this phase of the subscription schedule.","format":"unix-time","type":"integer"},"invoice_settings":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/subscription_schedule_configuration_item"},"type":"array"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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":"#/$defs/account"}]}},"proration_behavior":{"description":"When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.","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":"#/$defs/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","application_fee_percent","billing_cycle_anchor","billing_thresholds","collection_method","currency","default_payment_method","description","discounts","end_date","invoice_settings","items","metadata","on_behalf_of","proration_behavior","start_date","transfer_data","trial_end"],"title":"SubscriptionSchedulePhaseConfiguration","type":"object","x-expandableFields":["add_invoice_items","automatic_tax","billing_thresholds","default_payment_method","default_tax_rates","discounts","invoice_settings","items","on_behalf_of","transfer_data"],"x-stripeMostCommon":["add_invoice_items","application_fee_percent","automatic_tax","billing_cycle_anchor","billing_thresholds","collection_method","currency","default_payment_method","default_tax_rates","description","discounts","end_date","invoice_settings","items","metadata","on_behalf_of","proration_behavior","start_date","transfer_data","trial_end"]},"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":"#/$defs/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://docs.stripe.com/billing/subscriptions/billing-cycle).","enum":["automatic","phase_start"],"type":"string"},"billing_thresholds":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/invoice_setting_subscription_schedule_setting"},"on_behalf_of":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/account"}]}},"transfer_data":{"anyOf":[{"$ref":"#/$defs/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":["application_fee_percent","billing_cycle_anchor","billing_thresholds","collection_method","default_payment_method","description","invoice_settings","on_behalf_of","transfer_data"],"title":"SubscriptionSchedulesResourceDefaultSettings","type":"object","x-expandableFields":["automatic_tax","billing_thresholds","default_payment_method","invoice_settings","on_behalf_of","transfer_data"],"x-stripeMostCommon":["application_fee_percent","automatic_tax","billing_cycle_anchor","billing_thresholds","collection_method","default_payment_method","description","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":"#/$defs/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":["disabled_reason","enabled","liability"],"title":"SubscriptionSchedulesResourceDefaultSettingsAutomaticTax","type":"object","x-expandableFields":["liability"],"x-stripeMostCommon":["disabled_reason","enabled","liability"]},"subscription_schedules_resource_invoice_item_period_resource_period_end":{"description":"","properties":{"timestamp":{"description":"A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.","format":"unix-time","type":"integer"},"type":{"description":"Select how to calculate the end of the invoice item period.","enum":["min_item_period_end","phase_end","timestamp"],"type":"string","x-stripeBypassValidation":true}},"required":["type"],"title":"SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEnd","type":"object","x-expandableFields":[],"x-stripeMostCommon":["timestamp","type"]},"subscription_schedules_resource_invoice_item_period_resource_period_start":{"description":"","properties":{"timestamp":{"description":"A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.","format":"unix-time","type":"integer"},"type":{"description":"Select how to calculate the start of the invoice item period.","enum":["max_item_period_start","phase_start","timestamp"],"type":"string","x-stripeBypassValidation":true}},"required":["type"],"title":"SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStart","type":"object","x-expandableFields":[],"x-stripeMostCommon":["timestamp","type"]},"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":"#/$defs/account"}],"description":"The account where funds from the payment will be transferred to upon payment success.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}}},"required":["amount_percent","destination"],"title":"SubscriptionTransferData","type":"object","x-expandableFields":["destination"],"x-stripeMostCommon":["amount_percent","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","hour","minute","month","second"],"title":"SubscriptionsResourceBillingCycleAnchorConfig","type":"object","x-expandableFields":[],"x-stripeMostCommon":["day_of_month","hour","minute","month","second"]},"subscriptions_resource_billing_mode":{"description":"The billing mode of the subscription.","properties":{"flexible":{"anyOf":[{"$ref":"#/$defs/subscriptions_resource_billing_mode_flexible"}],"description":"Configure behavior for flexible billing mode","nullable":true},"type":{"description":"Controls how prorations and invoices for subscriptions are calculated and orchestrated.","enum":["classic","flexible"],"type":"string"},"updated_at":{"description":"Details on when the current billing_mode was adopted.","format":"unix-time","type":"integer"}},"required":["flexible","type"],"title":"SubscriptionsResourceBillingMode","type":"object","x-expandableFields":["flexible"],"x-stripeMostCommon":["flexible","type","updated_at"]},"subscriptions_resource_billing_mode_flexible":{"description":"","properties":{"proration_discounts":{"description":"Controls how invoices and invoice items display proration amounts and discount amounts.","enum":["included","itemized"],"type":"string"}},"title":"SubscriptionsResourceBillingModeFlexible","type":"object","x-expandableFields":[],"x-stripeMostCommon":["proration_discounts"]},"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.","enum":["keep_as_draft","mark_uncollectible","void"],"type":"string","x-stripeBypassValidation":true},"resumes_at":{"description":"The time after which the subscription will resume collecting payments.","format":"unix-time","nullable":true,"type":"integer"}},"required":["behavior","resumes_at"],"title":"SubscriptionsResourcePauseCollection","type":"object","x-expandableFields":[],"x-stripeMostCommon":["behavior","resumes_at"]},"subscriptions_resource_payment_method_options":{"description":"","properties":{"acss_debit":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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":"#/$defs/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},"payto":{"anyOf":[{"$ref":"#/$defs/invoice_payment_method_options_payto"}],"description":"This sub-hash contains details about the PayTo payment method options to pass to invoices created by the subscription.","nullable":true},"sepa_debit":{"anyOf":[{"$ref":"#/$defs/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":"#/$defs/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}},"required":["acss_debit","bancontact","card","customer_balance","konbini","payto","sepa_debit","us_bank_account"],"title":"SubscriptionsResourcePaymentMethodOptions","type":"object","x-expandableFields":["acss_debit","bancontact","card","customer_balance","konbini","payto","sepa_debit","us_bank_account"],"x-stripeMostCommon":["acss_debit","bancontact","card","customer_balance","konbini","payto","sepa_debit","us_bank_account"]},"subscriptions_resource_payment_settings":{"description":"","properties":{"payment_method_options":{"anyOf":[{"$ref":"#/$defs/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","affirm","amazon_pay","au_becs_debit","bacs_debit","bancontact","boleto","card","cashapp","crypto","custom","customer_balance","eps","fpx","giropay","grabpay","ideal","jp_credit_transfer","kakao_pay","klarna","konbini","kr_card","link","multibanco","naver_pay","nz_bank_account","p24","pay_by_bank","payco","paynow","paypal","payto","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"}},"required":["payment_method_options","payment_method_types","save_default_payment_method"],"title":"SubscriptionsResourcePaymentSettings","type":"object","x-expandableFields":["payment_method_options"],"x-stripeMostCommon":["payment_method_options","payment_method_types","save_default_payment_method"]},"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":"#/$defs/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://docs.stripe.com/billing/subscriptions/trials) to learn more.","nullable":true,"type":"boolean"}},"required":["billing_cycle_anchor","expires_at","subscription_items","trial_end","trial_from_plan"],"title":"SubscriptionsResourcePendingUpdate","type":"object","x-expandableFields":["subscription_items"],"x-stripeMostCommon":["billing_cycle_anchor","expires_at","subscription_items","trial_end","trial_from_plan"]},"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":"#/$defs/tax_id"},{"$ref":"#/$defs/deleted_tax_id"}],"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/tax_id"},{"$ref":"#/$defs/deleted_tax_id"}]}},"nullable":true,"type":"array"},"issuer":{"$ref":"#/$defs/connect_account_reference"}},"required":["account_tax_ids","issuer"],"title":"SubscriptionsResourceSubscriptionInvoiceSettings","type":"object","x-expandableFields":["account_tax_ids","issuer"],"x-stripeMostCommon":["account_tax_ids","issuer"]},"subscriptions_resource_subscription_presentment_details":{"description":"","properties":{"presentment_currency":{"description":"Currency used for customer payments.","maxLength":5000,"type":"string"}},"required":["presentment_currency"],"title":"SubscriptionsResourceSubscriptionPresentmentDetails","type":"object","x-expandableFields":[],"x-stripeMostCommon":["presentment_currency"]},"subscriptions_resource_trial_settings_end_behavior":{"description":"Defines how a subscription behaves when a 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":"SubscriptionsResourceTrialSettingsEndBehavior","type":"object","x-expandableFields":[],"x-stripeMostCommon":["missing_payment_method"]},"subscriptions_resource_trial_settings_trial_settings":{"description":"Configures how this subscription behaves during the trial period.","properties":{"end_behavior":{"$ref":"#/$defs/subscriptions_resource_trial_settings_end_behavior"}},"required":["end_behavior"],"title":"SubscriptionsResourceTrialSettingsTrialSettings","type":"object","x-expandableFields":["end_behavior"],"x-stripeMostCommon":["end_behavior"]},"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","x-stripeMostCommon":["description","id","name","object"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/tax_codes"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/tax_codes/{id}"}],"x-stripeResource":{"class_name":"TaxCode","has_collection_class":true,"in_package":""}},"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":[],"x-stripeMostCommon":["id","object","period_end","period_start","tax_deduction_account_number"],"x-stripeResource":{"class_name":"TaxDeductedAtSource","in_package":"","polymorphic_groups":["balance_transaction_source"]}},"tax_i_ds_owner":{"description":"","properties":{"account":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/account"}],"description":"The account being referenced when `type` is `account`.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"application":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/application"}],"description":"The Connect Application being referenced when `type` is `application`.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/application"}]}},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/customer"}],"description":"The customer being referenced when `type` is `customer`.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"}]}},"customer_account":{"description":"The Account representing the customer being referenced when `type` is `customer`.","maxLength":5000,"nullable":true,"type":"string"},"type":{"description":"Type of owner referenced.","enum":["account","application","customer","self"],"type":"string"}},"required":["customer_account","type"],"title":"TaxIDsOwner","type":"object","x-expandableFields":["account","application","customer"],"x-stripeMostCommon":["account","application","customer","customer_account","type"]},"tax_id":{"description":"You can add one or multiple tax IDs to a [customer](https://docs.stripe.com/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://docs.stripe.com/billing/taxes/tax-ids), [Account tax IDs](https://docs.stripe.com/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":"#/$defs/customer"}],"description":"ID of the customer.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/customer"}]}},"customer_account":{"description":"ID of the Account representing the customer.","maxLength":5000,"nullable":true,"type":"string"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/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`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_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`, `pl_nip`, `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","aw_tin","az_tin","ba_tin","bb_tin","bd_bin","bf_ifu","bg_uic","bh_vat","bj_ifu","bo_tin","br_cnpj","br_cpf","bs_tin","by_tin","ca_bn","ca_gst_hst","ca_pst_bc","ca_pst_mb","ca_pst_sk","ca_qst","cd_nif","ch_uid","ch_vat","cl_tin","cm_niu","cn_tin","co_nit","cr_tin","cv_nif","de_stn","do_rcn","ec_ruc","eg_tin","es_cif","et_tin","eu_oss_vat","eu_vat","gb_vat","ge_vat","gn_nif","hk_br","hr_oib","hu_tin","id_npwp","il_vat","in_gst","is_vat","jp_cn","jp_rn","jp_trn","ke_pin","kg_tin","kh_tin","kr_brn","kz_bin","la_tin","li_uid","li_vat","lk_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","pl_nip","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":"#/$defs/tax_id_verification"}],"description":"Tax ID verification information.","nullable":true}},"required":["country","created","customer","customer_account","id","livemode","object","owner","type","value","verification"],"title":"tax_id","type":"object","x-expandableFields":["customer","owner","verification"],"x-resourceId":"tax_id","x-stripeMostCommon":["country","customer","customer_account","id","type","value"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/customers/{customer}/tax_ids/{id}"},{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/tax_ids/{id}"},{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/customers/{customer}/tax_ids"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/customers/{customer}/tax_ids"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/tax_ids/{id}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/customers/{customer}/tax_ids/{id}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/tax_ids"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/tax_ids/{id}"},{"method_name":"create","method_on":"collection","method_type":"create","operation":"post","path":"/v1/customers/{customer}/tax_ids","shared_version_of":"tax_id"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/customers/{customer}/tax_ids","shared_version_of":"tax_id"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/tax_ids"}],"x-stripeResource":{"class_name":"TaxId","has_collection_class":true,"in_package":""}},"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","verified_address","verified_name"],"title":"tax_id_verification","type":"object","x-expandableFields":[],"x-stripeMostCommon":["status","verified_address","verified_name"]},"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":"#/$defs/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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. This field is only present for TaxRates created by Stripe Tax.","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","country","created","description","display_name","effective_percentage","flat_amount","id","inclusive","jurisdiction","jurisdiction_level","livemode","metadata","object","percentage","rate_type","state","tax_type"],"title":"TaxRate","type":"object","x-expandableFields":["flat_amount"],"x-resourceId":"tax_rate","x-stripeMostCommon":["active","country","description","display_name","id","inclusive","jurisdiction","metadata","percentage","state"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/tax_rates"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/tax_rates/{tax_rate}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/tax_rates"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/tax_rates/{tax_rate}"}],"x-stripeResource":{"class_name":"TaxRate","has_collection_class":true,"in_package":""}},"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":[],"x-stripeMostCommon":["amount","currency"],"x-stripeResource":{"class_name":"TaxRateFlatAmount","in_package":""}},"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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","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":"#/$defs/billing_clocks_resource_status_details_status_details"}},"required":["created","deletes_after","frozen_time","id","livemode","name","object","status","status_details"],"title":"TestClock","type":"object","x-expandableFields":["status_details"],"x-resourceId":"test_helpers.test_clock","x-stripeMostCommon":["created","deletes_after","frozen_time","id","livemode","name","object","status","status_details"],"x-stripeOperations":[{"method_name":"delete","method_on":"service","method_type":"delete","operation":"delete","path":"/v1/test_helpers/test_clocks/{test_clock}"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/test_helpers/test_clocks"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/test_helpers/test_clocks/{test_clock}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/test_helpers/test_clocks"},{"method_name":"advance","method_on":"service","method_type":"custom","operation":"post","path":"/v1/test_helpers/test_clocks/{test_clock}/advance"}],"x-stripeResource":{"class_name":"TestClock","has_collection_class":true,"in_package":"TestHelpers"}},"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","2.3.0","2.3.1"],"nullable":true,"type":"string","x-stripeBypassValidation":true}},"required":["authentication_flow","electronic_commerce_indicator","result","result_reason","transaction_id","version"],"title":"three_d_secure_details","type":"object","x-expandableFields":[],"x-stripeMostCommon":["authentication_flow","electronic_commerce_indicator","result","result_reason","transaction_id","version"]},"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","2.3.0","2.3.1"],"nullable":true,"type":"string","x-stripeBypassValidation":true}},"required":["authentication_flow","electronic_commerce_indicator","exemption_indicator","result","result_reason","transaction_id","version"],"title":"three_d_secure_details_charge","type":"object","x-expandableFields":[],"x-stripeMostCommon":["authentication_flow","electronic_commerce_indicator","exemption_indicator","exemption_indicator_applied","result","result_reason","transaction_id","version"]},"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":[],"x-stripeMostCommon":["supported"]},"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"}},"required":["preferred"],"title":"token_card_networks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["preferred"]},"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://docs.stripe.com/connect/top-ups)","properties":{"amount":{"description":"Amount transferred.","type":"integer"},"balance_transaction":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/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](/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":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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","balance_transaction","created","currency","description","expected_availability_date","failure_code","failure_message","id","livemode","metadata","object","source","statement_descriptor","status","transfer_group"],"title":"Topup","type":"object","x-expandableFields":["balance_transaction","source"],"x-resourceId":"topup","x-stripeMostCommon":["amount","currency","description","id","metadata","status"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/topups"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/topups/{topup}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/topups"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/topups/{topup}"},{"method_name":"cancel","method_on":"service","method_type":"custom","operation":"post","path":"/v1/topups/{topup}/cancel"}],"x-stripeResource":{"class_name":"Topup","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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://api.stripe.com#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://docs.stripe.com/transfer-payout-split).\n\nRelated guide: [Creating separate charges and transfers](https://docs.stripe.com/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":"#/$defs/balance_transaction"}],"description":"Balance transaction that describes the impact of this transfer on your account balance.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/account"}],"description":"ID of the Stripe account the transfer was sent to.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/account"}]}},"destination_payment":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/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":"#/$defs/charge"}]}},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://docs.stripe.com/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":"#/$defs/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"],"x-stripeMostCommon":["data","has_more","object","url"]},"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":"#/$defs/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":"#/$defs/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://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options) for details.","maxLength":5000,"nullable":true,"type":"string"}},"required":["amount","amount_reversed","balance_transaction","created","currency","description","destination","id","livemode","metadata","object","reversals","reversed","source_transaction","transfer_group"],"title":"Transfer","type":"object","x-expandableFields":["balance_transaction","destination","destination_payment","reversals","source_transaction"],"x-resourceId":"transfer","x-stripeMostCommon":["amount","currency","description","destination","id","metadata"],"x-stripeOperations":[{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/transfers"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/transfers/{transfer}"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/transfers"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/transfers/{transfer}"}],"x-stripeResource":{"class_name":"Transfer","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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://docs.stripe.com/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":"#/$defs/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":"#/$defs/account"}]}}},"required":["destination"],"title":"transfer_data","type":"object","x-expandableFields":["destination"],"x-stripeMostCommon":["amount","destination"]},"transfer_reversal":{"description":"[Stripe Connect](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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":"#/$defs/balance_transaction"}],"description":"Balance transaction that describes the impact on your account balance.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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":"#/$defs/refund"}],"description":"Linked payment refund for the transfer reversal.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/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://docs.stripe.com/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":"#/$defs/refund"}],"description":"ID of the refund responsible for the transfer reversal.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/$defs/refund"}]}},"transfer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/$defs/transfer"}],"description":"ID of the transfer that was reversed.","x-expansionResources":{"oneOf":[{"$ref":"#/$defs/transfer"}]}}},"required":["amount","balance_transaction","created","currency","destination_payment_refund","id","metadata","object","source_refund","transfer"],"title":"TransferReversal","type":"object","x-expandableFields":["balance_transaction","destination_payment_refund","source_refund","transfer"],"x-resourceId":"transfer_reversal","x-stripeMostCommon":["amount","currency","id","metadata","transfer"],"x-stripeOperations":[{"method_name":"list","method_on":"collection","method_type":"list","operation":"get","path":"/v1/transfers/{id}/reversals"},{"method_name":"list","method_on":"service","method_type":"list","operation":"get","path":"/v1/transfers/{id}/reversals"},{"method_name":"retrieve","method_on":"collection","method_type":"retrieve","operation":"get","path":"/v1/transfers/{transfer}/reversals/{id}"},{"method_name":"retrieve","method_on":"service","method_type":"retrieve","operation":"get","path":"/v1/transfers/{transfer}/reversals/{id}"},{"method_name":"create","method_on":"collection","method_type":"create","operation":"post","path":"/v1/transfers/{id}/reversals"},{"method_name":"create","method_on":"service","method_type":"create","operation":"post","path":"/v1/transfers/{id}/reversals"},{"method_name":"update","method_on":"service","method_type":"update","operation":"post","path":"/v1/transfers/{transfer}/reversals/{id}"}],"x-stripeResource":{"class_name":"TransferReversal","has_collection_class":true,"in_package":"","polymorphic_groups":["balance_transaction_source"]}},"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"},"monthly_payout_days":{"description":"The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.","items":{"type":"integer"},"type":"array"},"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"},"weekly_payout_days":{"description":"The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.","items":{"enum":["friday","monday","thursday","tuesday","wednesday"],"type":"string","x-stripeBypassValidation":true},"type":"array"}},"required":["delay_days","interval"],"title":"TransferSchedule","type":"object","x-expandableFields":[],"x-stripeMostCommon":["delay_days","interval","monthly_anchor","monthly_payout_days","weekly_anchor","weekly_payout_days"]},"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":[],"x-stripeMostCommon":["divide_by","round"]},"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":[],"x-stripeMostCommon":["divide_by","round"]},"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":["preferred","supported"],"title":"us_bank_account_networks","type":"object","x-expandableFields":[],"x-stripeMostCommon":["preferred","supported"]}}} \ No newline at end of file +{ + "source": "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.sdk.json", + "operationId": "GetBalanceTransactionsId", + "schema": { "$ref": "#/$defs/balance_transaction" }, + "defs": { + "account": { + "description": "For new integrations, we recommend using the [Accounts v2 API](/api/v2/core/accounts), in place of /v1/accounts and /v1/customers to represent a user.\n\nThis 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": "#/$defs/account_business_profile" }], + "description": "Business information about the account.", + "nullable": true + }, + "business_type": { + "description": "The business type.", + "enum": ["company", "government_entity", "individual", "non_profit"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { "$ref": "#/$defs/account_capabilities" }, + "charges_enabled": { + "description": "Whether the account can process charges.", + "type": "boolean" + }, + "company": { "$ref": "#/$defs/legal_entity_company" }, + "controller": { "$ref": "#/$defs/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": { "$ref": "#/$defs/external_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": "ExternalAccountList", + "type": "object", + "x-expandableFields": ["data"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "future_requirements": { "$ref": "#/$defs/account_future_requirements" }, + "groups": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/person" }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/account_requirements" }, + "settings": { + "anyOf": [{ "$ref": "#/$defs/account_settings" }], + "description": "Options for customizing how the account functions within Stripe.", + "nullable": true + }, + "tos_acceptance": { "$ref": "#/$defs/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", + "x-stripeMostCommon": [ + "business_type", + "capabilities", + "company", + "country", + "email", + "id", + "individual", + "metadata", + "requirements", + "tos_acceptance", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/accounts/{account}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/account" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/accounts" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/accounts/{account}" + }, + { + "method_name": "capabilities", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/accounts/{account}/capabilities" + }, + { + "method_name": "persons", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/accounts/{account}/persons" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/accounts" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/accounts/{account}" + }, + { + "method_name": "reject", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/accounts/{account}/reject" + } + ], + "x-stripeResource": { + "class_name": "Account", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["deleted_payment_source", "payment_source"] + } + }, + "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" + } + }, + "required": ["amount", "currency", "fiscal_year_end"], + "title": "AccountAnnualRevenue", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "currency", "fiscal_year_end"] + }, + "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" + } + }, + "required": ["display_name", "service_user_number"], + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["display_name", "service_user_number"] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/file" }] } + }, + "logo": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": ["icon", "logo", "primary_color", "secondary_color"], + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": ["icon", "logo"], + "x-stripeMostCommon": ["icon", "logo", "primary_color", "secondary_color"] + }, + "account_business_profile": { + "description": "", + "properties": { + "annual_revenue": { + "anyOf": [{ "$ref": "#/$defs/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" + }, + "minority_owned_business_designation": { + "description": "Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.", + "items": { + "enum": [ + "lgbtqi_owned_business", + "minority_owned_business", + "none_of_these_apply", + "prefer_not_to_answer", + "women_owned_business" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "monthly_estimated_revenue": { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "mcc", + "minority_owned_business_designation", + "name", + "support_address", + "support_email", + "support_phone", + "support_url", + "url" + ], + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": ["annual_revenue", "monthly_estimated_revenue", "support_address"], + "x-stripeMostCommon": [ + "annual_revenue", + "estimated_worker_count", + "mcc", + "minority_owned_business_designation", + "monthly_estimated_revenue", + "name", + "product_description", + "support_address", + "support_email", + "support_phone", + "support_url", + "url" + ] + }, + "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" + }, + "billie_payments": { + "description": "The status of the Billie capability of the account, or whether the account can directly process Billie payments.", + "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" + }, + "crypto_payments": { + "description": "The status of the Crypto capability of the account, or whether the account can directly process Crypto 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" + }, + "mb_way_payments": { + "description": "The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY 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" + }, + "nz_bank_account_becs_debit_payments": { + "description": "The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges.", + "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" + }, + "payto_payments": { + "description": "The status of the PayTo capability of the account, or whether the account can directly process PayTo charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "pix_payments": { + "description": "The status of the pix payments capability of the account, or whether the account can directly process pix 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" + }, + "satispay_payments": { + "description": "The status of the Satispay capability of the account, or whether the account can directly process Satispay 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" + }, + "upi_payments": { + "description": "The status of the upi payments capability of the account, or whether the account can directly process upi 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": [], + "x-stripeMostCommon": [ + "acss_debit_payments", + "affirm_payments", + "afterpay_clearpay_payments", + "alma_payments", + "amazon_pay_payments", + "au_becs_debit_payments", + "bacs_debit_payments", + "bancontact_payments", + "bank_transfer_payments", + "billie_payments", + "blik_payments", + "boleto_payments", + "card_issuing", + "card_payments", + "cartes_bancaires_payments", + "cashapp_payments", + "crypto_payments", + "eps_payments", + "fpx_payments", + "gb_bank_transfer_payments", + "giropay_payments", + "grabpay_payments", + "ideal_payments", + "india_international_payments", + "jcb_payments", + "jp_bank_transfer_payments", + "kakao_pay_payments", + "klarna_payments", + "konbini_payments", + "kr_card_payments", + "legacy_payments", + "link_payments", + "mb_way_payments", + "mobilepay_payments", + "multibanco_payments", + "mx_bank_transfer_payments", + "naver_pay_payments", + "nz_bank_account_becs_debit_payments", + "oxxo_payments", + "p24_payments", + "pay_by_bank_payments", + "payco_payments", + "paynow_payments", + "payto_payments", + "pix_payments", + "promptpay_payments", + "revolut_pay_payments", + "samsung_pay_payments", + "satispay_payments", + "sepa_bank_transfer_payments", + "sepa_debit_payments", + "sofort_payments", + "swish_payments", + "tax_reporting_us_1099_k", + "tax_reporting_us_1099_misc", + "transfers", + "treasury", + "twint_payments", + "upi_payments", + "us_bank_account_ach_payments", + "us_bank_transfer_payments", + "zip_payments" + ] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { "$ref": "#/$defs/card_issuing_account_terms_of_service" } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": ["tos_acceptance"], + "x-stripeMostCommon": ["tos_acceptance"] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { "$ref": "#/$defs/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" + } + }, + "required": [ + "statement_descriptor_prefix", + "statement_descriptor_prefix_kana", + "statement_descriptor_prefix_kanji" + ], + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": ["decline_on"], + "x-stripeMostCommon": [ + "decline_on", + "statement_descriptor_prefix", + "statement_descriptor_prefix_kana", + "statement_descriptor_prefix_kanji" + ] + }, + "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" + } + }, + "required": ["display_name", "timezone"], + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["display_name", "timezone"] + }, + "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": [], + "x-stripeMostCommon": ["avs_failure", "cvc_failure"] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.", + "items": { "$ref": "#/$defs/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 resolved to keep the account enabled. If not resolved 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": "Details about validation and verification failures for `due` requirements that must be resolved.", + "items": { "$ref": "#/$defs/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 haven't been resolved by `requirements.current_deadline`. These fields need to be resolved to enable the capability on the account. `future_requirements.past_due` is a subset of `requirements.past_due`.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "alternatives", + "current_deadline", + "currently_due", + "disabled_reason", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"], + "x-stripeMostCommon": [ + "alternatives", + "current_deadline", + "currently_due", + "disabled_reason", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ] + }, + "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://docs.stripe.com/connect/platform-pricing-tools) for details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["payments_pricing"], + "title": "AccountGroupMembership", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["payments_pricing"] + }, + "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": "#/$defs/tax_id" }], + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/tax_id" }] } + }, + "nullable": true, + "type": "array" + }, + "hosted_payment_method_save": { + "description": "Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.", + "enum": ["always", "never", "offer"], + "nullable": true, + "type": "string" + } + }, + "required": ["default_account_tax_ids", "hosted_payment_method_save"], + "title": "AccountInvoicesSettings", + "type": "object", + "x-expandableFields": ["default_account_tax_ids"], + "x-stripeMostCommon": ["default_account_tax_ids", "hosted_payment_method_save"] + }, + "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": [], + "x-stripeMostCommon": ["amount", "currency"] + }, + "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" + }, + "statement_descriptor_prefix_kana": { + "description": "The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kanji": { + "description": "The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "statement_descriptor", + "statement_descriptor_kana", + "statement_descriptor_kanji", + "statement_descriptor_prefix_kana", + "statement_descriptor_prefix_kanji" + ], + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "statement_descriptor", + "statement_descriptor_kana", + "statement_descriptor_kanji", + "statement_descriptor_prefix_kana", + "statement_descriptor_prefix_kanji" + ] + }, + "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": "#/$defs/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", "statement_descriptor"], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": ["schedule"], + "x-stripeMostCommon": ["debit_negative_balances", "schedule", "statement_descriptor"] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.", + "items": { "$ref": "#/$defs/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 resolved to keep the account enabled. If not resolved by `current_deadline`, these fields will 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://docs.stripe.com/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": "Details about validation and verification failures for `due` requirements that must be resolved.", + "items": { "$ref": "#/$defs/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 haven't been resolved by `current_deadline`. These fields need to be resolved to enable the account.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "alternatives", + "current_deadline", + "currently_due", + "disabled_reason", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"], + "x-stripeMostCommon": [ + "alternatives", + "current_deadline", + "currently_due", + "disabled_reason", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to resolve all fields in `original_fields_due`.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be resolved 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": [], + "x-stripeMostCommon": ["alternative_fields_due", "original_fields_due"] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "external_request", + "information_missing", + "invalid_address_city_state_postal_code", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", + "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", + "invalid_representative_country", + "invalid_signator", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", + "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", + "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_length", + "invalid_url_web_presence_detected", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", + "invalid_value_other", + "unsupported_business_type", + "verification_directors_mismatch", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_directors_mismatch", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_extraneous_directors", + "verification_failed_address_match", + "verification_failed_authorizer_authority", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_representative_authority", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_legal_entity_structure_mismatch", + "verification_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_rejected_ownership_exemption_reason", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_supportability" + ], + "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": [], + "x-stripeMostCommon": ["code", "reason", "requirement"] + }, + "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": [], + "x-stripeMostCommon": ["creditor_id"] + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { "$ref": "#/$defs/account_bacs_debit_payments_settings" }, + "branding": { "$ref": "#/$defs/account_branding_settings" }, + "card_issuing": { "$ref": "#/$defs/account_card_issuing_settings" }, + "card_payments": { "$ref": "#/$defs/account_card_payments_settings" }, + "dashboard": { "$ref": "#/$defs/account_dashboard_settings" }, + "invoices": { "$ref": "#/$defs/account_invoices_settings" }, + "payments": { "$ref": "#/$defs/account_payments_settings" }, + "payouts": { "$ref": "#/$defs/account_payout_settings" }, + "sepa_debit_payments": { "$ref": "#/$defs/account_sepa_debit_payments_settings" }, + "treasury": { "$ref": "#/$defs/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" + ], + "x-stripeMostCommon": [ + "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" + } + }, + "required": ["date", "ip"], + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "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": [], + "x-stripeMostCommon": ["date", "ip", "service_agreement", "user_agent"] + }, + "account_treasury_settings": { + "description": "", + "properties": { "tos_acceptance": { "$ref": "#/$defs/account_terms_of_service" } }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": ["tos_acceptance"], + "x-stripeMostCommon": ["tos_acceptance"] + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "fees": { "$ref": "#/$defs/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://docs.stripe.com/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.", + "type": "boolean" + }, + "losses": { "$ref": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": [ + "fees", + "is_controller", + "losses", + "requirement_collection", + "stripe_dashboard", + "type" + ] + }, + "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": [], + "x-stripeMostCommon": ["payer"] + }, + "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": [], + "x-stripeMostCommon": ["payments"] + }, + "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": [], + "x-stripeMostCommon": ["type"] + }, + "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, such as the street, PO Box, or company name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2, such as the 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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["city", "country", "line1", "line2", "postal_code", "state"], + "title": "Address", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["city", "country", "line1", "line2", "postal_code", "state"], + "x-stripeResource": { "class_name": "Address", "in_package": "" } + }, + "alma_installments": { + "description": "", + "properties": { + "count": { "description": "The number of installments.", "type": "integer" } + }, + "required": ["count"], + "title": "alma_installments", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["count"] + }, + "amazon_pay_underlying_payment_method_funding_details": { + "description": "", + "properties": { + "card": { "$ref": "#/$defs/payment_method_details_passthrough_card" }, + "type": { + "description": "funding type of the underlying payment method.", + "enum": ["card"], + "nullable": true, + "type": "string" + } + }, + "required": ["type"], + "title": "amazon_pay_underlying_payment_method_funding_details", + "type": "object", + "x-expandableFields": ["card"], + "x-stripeMostCommon": ["card", "type"] + }, + "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://docs.stripe.com/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://docs.stripe.com/error-codes) reported.", + "enum": [ + "account_closed", + "account_country_invalid_address", + "account_error_country_change_requires_additional_steps", + "account_information_mismatch", + "account_invalid", + "account_number_invalid", + "account_token_required_for_v2_account", + "acss_debit_session_incomplete", + "alipay_upgrade_required", + "amount_too_large", + "amount_too_small", + "api_key_expired", + "application_fees_not_allowed", + "authentication_required", + "balance_insufficient", + "balance_invalid_parameter", + "bank_account_bad_routing_numbers", + "bank_account_declined", + "bank_account_exists", + "bank_account_restricted", + "bank_account_unusable", + "bank_account_unverified", + "bank_account_verification_failed", + "billing_invalid_mandate", + "bitcoin_upgrade_required", + "capture_charge_authorization_expired", + "capture_unauthorized_payment", + "card_decline_rate_limit_exceeded", + "card_declined", + "cardholder_phone_number_required", + "charge_already_captured", + "charge_already_refunded", + "charge_disputed", + "charge_exceeds_source_limit", + "charge_exceeds_transaction_limit", + "charge_expired_for_capture", + "charge_invalid_parameter", + "charge_not_refundable", + "clearing_code_unsupported", + "country_code_invalid", + "country_unsupported", + "coupon_expired", + "customer_max_payment_methods", + "customer_max_subscriptions", + "customer_session_expired", + "customer_tax_location_invalid", + "debit_not_authorized", + "email_invalid", + "expired_card", + "financial_connections_account_inactive", + "financial_connections_account_pending_account_numbers", + "financial_connections_account_unavailable_account_numbers", + "financial_connections_no_successful_transaction_refresh", + "forwarding_api_inactive", + "forwarding_api_invalid_parameter", + "forwarding_api_retryable_upstream_error", + "forwarding_api_upstream_connection_error", + "forwarding_api_upstream_connection_timeout", + "forwarding_api_upstream_error", + "idempotency_key_in_use", + "incorrect_address", + "incorrect_cvc", + "incorrect_number", + "incorrect_zip", + "india_recurring_payment_mandate_canceled", + "instant_payouts_config_disabled", + "instant_payouts_currency_disabled", + "instant_payouts_limit_exceeded", + "instant_payouts_unsupported", + "insufficient_funds", + "intent_invalid_state", + "intent_verification_method_missing", + "invalid_card_type", + "invalid_characters", + "invalid_charge_amount", + "invalid_cvc", + "invalid_expiry_month", + "invalid_expiry_year", + "invalid_mandate_reference_prefix_format", + "invalid_number", + "invalid_source_usage", + "invalid_tax_location", + "invoice_no_customer_line_items", + "invoice_no_payment_method_types", + "invoice_no_subscription_line_items", + "invoice_not_editable", + "invoice_on_behalf_of_not_editable", + "invoice_payment_intent_requires_action", + "invoice_upcoming_none", + "livemode_mismatch", + "lock_timeout", + "missing", + "no_account", + "not_allowed_on_standard_account", + "out_of_inventory", + "ownership_declaration_not_allowed", + "parameter_invalid_empty", + "parameter_invalid_integer", + "parameter_invalid_string_blank", + "parameter_invalid_string_empty", + "parameter_missing", + "parameter_unknown", + "parameters_exclusive", + "payment_intent_action_required", + "payment_intent_authentication_failure", + "payment_intent_incompatible_payment_method", + "payment_intent_invalid_parameter", + "payment_intent_konbini_rejected_confirmation_number", + "payment_intent_mandate_invalid", + "payment_intent_payment_attempt_expired", + "payment_intent_payment_attempt_failed", + "payment_intent_rate_limit_exceeded", + "payment_intent_unexpected_state", + "payment_method_bank_account_already_verified", + "payment_method_bank_account_blocked", + "payment_method_billing_details_address_missing", + "payment_method_configuration_failures", + "payment_method_currency_mismatch", + "payment_method_customer_decline", + "payment_method_invalid_parameter", + "payment_method_invalid_parameter_testmode", + "payment_method_microdeposit_failed", + "payment_method_microdeposit_verification_amounts_invalid", + "payment_method_microdeposit_verification_amounts_mismatch", + "payment_method_microdeposit_verification_attempts_exceeded", + "payment_method_microdeposit_verification_descriptor_code_mismatch", + "payment_method_microdeposit_verification_timeout", + "payment_method_not_available", + "payment_method_provider_decline", + "payment_method_provider_timeout", + "payment_method_unactivated", + "payment_method_unexpected_state", + "payment_method_unsupported_type", + "payout_reconciliation_not_ready", + "payouts_limit_exceeded", + "payouts_not_allowed", + "platform_account_required", + "platform_api_key_expired", + "postal_code_invalid", + "processing_error", + "product_inactive", + "progressive_onboarding_limit_exceeded", + "rate_limit", + "refer_to_customer", + "refund_disputed_payment", + "request_blocked", + "resource_already_exists", + "resource_missing", + "return_intent_already_processed", + "routing_number_invalid", + "secret_key_required", + "sepa_unsupported_account", + "service_period_coupon_with_metered_tiered_item_unsupported", + "setup_attempt_failed", + "setup_intent_authentication_failure", + "setup_intent_invalid_parameter", + "setup_intent_mandate_invalid", + "setup_intent_mobile_wallet_unsupported", + "setup_intent_setup_attempt_expired", + "setup_intent_unexpected_state", + "shipping_address_invalid", + "shipping_calculation_failed", + "sku_inactive", + "state_unsupported", + "status_transition_invalid", + "storer_capability_missing", + "storer_capability_not_active", + "stripe_tax_inactive", + "tax_id_invalid", + "tax_id_prohibited", + "taxes_calculation_failed", + "terminal_location_country_unsupported", + "terminal_reader_busy", + "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_activation", + "terminal_reader_invalid_location_for_payment", + "terminal_reader_offline", + "terminal_reader_timeout", + "testmode_charges_only", + "tls_version_unsupported", + "token_already_used", + "token_card_network_invalid", + "token_in_use", + "transfer_source_balance_parameters_mismatch", + "transfers_not_allowed", + "url_invalid" + ], + "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://docs.stripe.com/declines#issuer-declines) if they provide one.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://docs.stripe.com/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 payments declined by the network, an alphanumeric code which indicates the reason the payment 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": "#/$defs/payment_intent" }, + "payment_method": { "$ref": "#/$defs/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": "#/$defs/setup_intent" }, + "source": { "$ref": "#/$defs/payment_source" }, + "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"], + "x-stripeMostCommon": ["code", "decline_code", "message", "param", "payment_intent", "type"], + "x-stripeResource": { "class_name": "StripeError", "in_package": "" } + }, + "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", "name", "object"], + "title": "Application", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["id", "name", "object"], + "x-stripeResource": { "class_name": "Application", "in_package": "" } + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/account" }], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/application" }], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/application" }] } + }, + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/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": "#/$defs/balance_transaction" }] } + }, + "charge": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/charge" }], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/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": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "balance_transaction", + "charge", + "created", + "currency", + "fee_source", + "id", + "livemode", + "object", + "originating_transaction", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "fee_source", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee", + "x-stripeMostCommon": [ + "account", + "amount", + "amount_refunded", + "application", + "balance_transaction", + "charge", + "created", + "currency", + "fee_source", + "id", + "livemode", + "object", + "originating_transaction", + "refunded", + "refunds" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/application_fees" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/application_fees/{id}" + } + ], + "x-stripeResource": { + "class_name": "ApplicationFee", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.", + "type": "boolean" + }, + "liability": { + "anyOf": [{ "$ref": "#/$defs/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 + }, + "provider": { + "description": "The tax provider powering automatic tax.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": ["disabled_reason", "enabled", "liability", "provider", "status"], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": ["liability"], + "x-stripeMostCommon": ["disabled_reason", "enabled", "liability", "provider", "status"] + }, + "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://docs.stripe.com/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" + }, + "balance_type": { + "description": "The balance that this transaction impacts.", + "enum": ["issuing", "payments", "refund_and_dispute_prefunding", "risk_reserved"], + "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" + }, + "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": "#/$defs/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": "#/$defs/balance_transaction_source" } + ], + "description": "This transaction relates to the Stripe object.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/balance_transaction_source" }] } + }, + "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`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.", + "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_hold", + "reserve_release", + "reserve_transaction", + "reserved_funds", + "stripe_balance_payment_debit", + "stripe_balance_payment_debit_reversal", + "stripe_fee", + "stripe_fx_fee", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "balance_type", + "created", + "currency", + "description", + "exchange_rate", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "source", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": ["fee_details", "source"], + "x-resourceId": "balance_transaction", + "x-stripeMostCommon": [ + "amount", + "currency", + "description", + "fee", + "fee_details", + "id", + "net", + "source", + "status", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/balance_transactions" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/balance_transactions/{id}" + } + ], + "x-stripeResource": { + "class_name": "BalanceTransaction", + "has_collection_class": true, + "in_package": "" + } + }, + "balance_transaction_source": { + "anyOf": [ + { "$ref": "#/$defs/application_fee" }, + { "$ref": "#/$defs/charge" }, + { "$ref": "#/$defs/connect_collection_transfer" }, + { "$ref": "#/$defs/customer_cash_balance_transaction" }, + { "$ref": "#/$defs/dispute" }, + { "$ref": "#/$defs/fee_refund" }, + { "$ref": "#/$defs/issuing.authorization" }, + { "$ref": "#/$defs/issuing.dispute" }, + { "$ref": "#/$defs/issuing.transaction" }, + { "$ref": "#/$defs/payout" }, + { "$ref": "#/$defs/refund" }, + { "$ref": "#/$defs/reserve_transaction" }, + { "$ref": "#/$defs/tax_deducted_at_source" }, + { "$ref": "#/$defs/topup" }, + { "$ref": "#/$defs/transfer" }, + { "$ref": "#/$defs/transfer_reversal" } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true, + "x-stripeResource": { "class_name": "BalanceTransactionSource" } + }, + "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": "#/$defs/account" }], + "description": "The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "The ID of the customer that the bank account is associated with.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/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": "#/$defs/external_account_requirements" }], + "description": "Information about the [upcoming new requirements for the bank account](https://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/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`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.\n\nFor external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_holder_type", + "account_type", + "bank_name", + "country", + "currency", + "fingerprint", + "id", + "last4", + "object", + "routing_number", + "status" + ], + "title": "BankAccount", + "type": "object", + "x-expandableFields": ["account", "customer", "future_requirements", "requirements"], + "x-resourceId": "bank_account", + "x-stripeMostCommon": [ + "account_holder_name", + "account_holder_type", + "bank_name", + "country", + "currency", + "customer", + "fingerprint", + "id", + "last4", + "metadata", + "routing_number" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/customers/{customer}/sources/{id}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/customers/{customer}/sources/{id}" + }, + { + "method_name": "verify", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/customers/{customer}/sources/{id}/verify" + } + ], + "x-stripeResource": { + "class_name": "BankAccount", + "in_package": "", + "polymorphic_groups": [ + "deleted_external_account", + "deleted_payment_source", + "external_account", + "payment_source" + ] + } + }, + "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": "#/$defs/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": "#/$defs/billing.credit_grant" } + ], + "description": "The credit grant associated with this credit balance transaction.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/billing.credit_grant" }] } + }, + "debit": { + "anyOf": [{ "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/test_helpers.test_clock" } + ], + "description": "ID of the test clock this credit balance transaction belongs to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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", + "credit_grant", + "debit", + "effective_at", + "id", + "livemode", + "object", + "test_clock", + "type" + ], + "title": "CreditBalanceTransaction", + "type": "object", + "x-expandableFields": ["credit", "credit_grant", "debit", "test_clock"], + "x-resourceId": "billing.credit_balance_transaction", + "x-stripeMostCommon": [ + "created", + "credit", + "credit_grant", + "debit", + "effective_at", + "id", + "livemode", + "object", + "test_clock", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/billing/credit_balance_transactions" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/billing/credit_balance_transactions/{id}" + } + ], + "x-stripeResource": { + "class_name": "CreditBalanceTransaction", + "has_collection_class": true, + "in_package": "Billing" + } + }, + "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": "#/$defs/billing_credit_grants_resource_amount" }, + "applicability_config": { + "$ref": "#/$defs/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": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "ID of the customer receiving the billing credits.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "ID of the account representing the customer receiving the billing credits", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/test_helpers.test_clock" } + ], + "description": "ID of the test clock this credit grant belongs to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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", + "customer_account", + "effective_at", + "expires_at", + "id", + "livemode", + "metadata", + "name", + "object", + "test_clock", + "updated", + "voided_at" + ], + "title": "CreditGrant", + "type": "object", + "x-expandableFields": ["amount", "applicability_config", "customer", "test_clock"], + "x-resourceId": "billing.credit_grant", + "x-stripeMostCommon": [ + "amount", + "applicability_config", + "category", + "created", + "customer", + "customer_account", + "effective_at", + "expires_at", + "id", + "livemode", + "metadata", + "name", + "object", + "priority", + "test_clock", + "updated", + "voided_at" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/billing/credit_grants" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/billing/credit_grants/{id}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/billing/credit_grants" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/billing/credit_grants/{id}" + }, + { + "method_name": "expire", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/billing/credit_grants/{id}/expire" + }, + { + "method_name": "void_grant", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/billing/credit_grants/{id}/void" + } + ], + "x-stripeResource": { + "class_name": "CreditGrant", + "has_collection_class": true, + "in_package": "Billing" + } + }, + "billing_bill_resource_invoicing_lines_common_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": "BillingBillResourceInvoicingLinesCommonCreditedItems", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["invoice", "invoice_line_items"] + }, + "billing_bill_resource_invoicing_lines_common_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { "$ref": "#/$defs/billing_bill_resource_invoicing_lines_common_credited_items" } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies.", + "nullable": true + } + }, + "required": ["credited_items"], + "title": "BillingBillResourceInvoicingLinesCommonProrationDetails", + "type": "object", + "x-expandableFields": ["credited_items"], + "x-stripeMostCommon": ["credited_items"] + }, + "billing_bill_resource_invoicing_lines_parents_invoice_line_item_invoice_item_parent": { + "description": "", + "properties": { + "invoice_item": { + "description": "The invoice item that generated this line item", + "maxLength": 5000, + "type": "string" + }, + "proration": { "description": "Whether this is a proration", "type": "boolean" }, + "proration_details": { + "anyOf": [ + { "$ref": "#/$defs/billing_bill_resource_invoicing_lines_common_proration_details" } + ], + "description": "Additional details for proration line items", + "nullable": true + }, + "subscription": { + "description": "The subscription that the invoice item belongs to", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["invoice_item", "proration", "proration_details", "subscription"], + "title": "BillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParent", + "type": "object", + "x-expandableFields": ["proration_details"], + "x-stripeMostCommon": ["invoice_item", "proration", "proration_details", "subscription"] + }, + "billing_bill_resource_invoicing_lines_parents_invoice_line_item_parent": { + "description": "", + "properties": { + "invoice_item_details": { + "anyOf": [ + { + "$ref": "#/$defs/billing_bill_resource_invoicing_lines_parents_invoice_line_item_invoice_item_parent" + } + ], + "description": "Details about the invoice item that generated this line item", + "nullable": true + }, + "subscription_item_details": { + "anyOf": [ + { + "$ref": "#/$defs/billing_bill_resource_invoicing_lines_parents_invoice_line_item_subscription_item_parent" + } + ], + "description": "Details about the subscription item that generated this line item", + "nullable": true + }, + "type": { + "description": "The type of parent that generated this line item", + "enum": ["invoice_item_details", "subscription_item_details"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["invoice_item_details", "subscription_item_details", "type"], + "title": "BillingBillResourceInvoicingLinesParentsInvoiceLineItemParent", + "type": "object", + "x-expandableFields": ["invoice_item_details", "subscription_item_details"], + "x-stripeMostCommon": ["invoice_item_details", "subscription_item_details", "type"] + }, + "billing_bill_resource_invoicing_lines_parents_invoice_line_item_subscription_item_parent": { + "description": "", + "properties": { + "invoice_item": { + "description": "The invoice item that generated this line item", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "proration": { "description": "Whether this is a proration", "type": "boolean" }, + "proration_details": { + "anyOf": [ + { "$ref": "#/$defs/billing_bill_resource_invoicing_lines_common_proration_details" } + ], + "description": "Additional details for proration line items", + "nullable": true + }, + "subscription": { + "description": "The subscription that the subscription item belongs to", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "subscription_item": { + "description": "The subscription item that generated this line item", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "invoice_item", + "proration", + "proration_details", + "subscription", + "subscription_item" + ], + "title": "BillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParent", + "type": "object", + "x-expandableFields": ["proration_details"], + "x-stripeMostCommon": [ + "invoice_item", + "proration", + "proration_details", + "subscription", + "subscription_item" + ] + }, + "billing_bill_resource_invoicing_parents_invoice_parent": { + "description": "", + "properties": { + "quote_details": { + "anyOf": [ + { "$ref": "#/$defs/billing_bill_resource_invoicing_parents_invoice_quote_parent" } + ], + "description": "Details about the quote that generated this invoice", + "nullable": true + }, + "subscription_details": { + "anyOf": [ + { + "$ref": "#/$defs/billing_bill_resource_invoicing_parents_invoice_subscription_parent" + } + ], + "description": "Details about the subscription that generated this invoice", + "nullable": true + }, + "type": { + "description": "The type of parent that generated this invoice", + "enum": ["quote_details", "subscription_details"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["quote_details", "subscription_details", "type"], + "title": "BillingBillResourceInvoicingParentsInvoiceParent", + "type": "object", + "x-expandableFields": ["quote_details", "subscription_details"], + "x-stripeMostCommon": ["quote_details", "subscription_details", "type"] + }, + "billing_bill_resource_invoicing_parents_invoice_quote_parent": { + "description": "", + "properties": { + "quote": { + "description": "The quote that generated this invoice", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["quote"], + "title": "BillingBillResourceInvoicingParentsInvoiceQuoteParent", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["quote"] + }, + "billing_bill_resource_invoicing_parents_invoice_subscription_parent": { + "description": "", + "properties": { + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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" + }, + "subscription": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/subscription" }], + "description": "The subscription that generated this invoice", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/subscription" }] } + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["metadata", "subscription"], + "title": "BillingBillResourceInvoicingParentsInvoiceSubscriptionParent", + "type": "object", + "x-expandableFields": ["subscription"], + "x-stripeMostCommon": ["metadata", "subscription", "subscription_proration_date"] + }, + "billing_bill_resource_invoicing_pricing_pricing": { + "description": "", + "properties": { + "price_details": { + "$ref": "#/$defs/billing_bill_resource_invoicing_pricing_pricing_price_details" + }, + "type": { + "description": "The type of the pricing details.", + "enum": ["price_details"], + "type": "string", + "x-stripeBypassValidation": true + }, + "unit_amount_decimal": { + "description": "The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": ["type", "unit_amount_decimal"], + "title": "BillingBillResourceInvoicingPricingPricing", + "type": "object", + "x-expandableFields": ["price_details"], + "x-stripeMostCommon": ["price_details", "type", "unit_amount_decimal"] + }, + "billing_bill_resource_invoicing_pricing_pricing_price_details": { + "description": "", + "properties": { + "price": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/price" }], + "description": "The ID of the price this item is associated with.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/price" }] } + }, + "product": { + "description": "The ID of the product this item is associated with.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["price", "product"], + "title": "BillingBillResourceInvoicingPricingPricingPriceDetails", + "type": "object", + "x-expandableFields": ["price"], + "x-stripeMostCommon": ["price", "product"] + }, + "billing_bill_resource_invoicing_taxes_tax": { + "description": "", + "properties": { + "amount": { + "description": "The amount of the tax, in cents (or local equivalent).", + "type": "integer" + }, + "tax_behavior": { + "description": "Whether this tax is inclusive or exclusive.", + "enum": ["exclusive", "inclusive"], + "type": "string" + }, + "tax_rate_details": { + "anyOf": [{ "$ref": "#/$defs/billing_bill_resource_invoicing_taxes_tax_rate_details" }], + "description": "Additional details about the tax rate. Only present when `type` is `tax_rate_details`.", + "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_available", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in cents (or local equivalent).", + "nullable": true, + "type": "integer" + }, + "type": { + "description": "The type of tax information.", + "enum": ["tax_rate_details"], + "type": "string" + } + }, + "required": [ + "amount", + "tax_behavior", + "tax_rate_details", + "taxability_reason", + "taxable_amount", + "type" + ], + "title": "BillingBillResourceInvoicingTaxesTax", + "type": "object", + "x-expandableFields": ["tax_rate_details"], + "x-stripeMostCommon": [ + "amount", + "tax_behavior", + "tax_rate_details", + "taxability_reason", + "taxable_amount", + "type" + ] + }, + "billing_bill_resource_invoicing_taxes_tax_rate_details": { + "description": "", + "properties": { + "tax_rate": { "description": "ID of the tax rate", "maxLength": 5000, "type": "string" } + }, + "required": ["tax_rate"], + "title": "BillingBillResourceInvoicingTaxesTaxRateDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["tax_rate"] + }, + "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": [], + "x-stripeMostCommon": ["target_frozen_time"] + }, + "billing_clocks_resource_status_details_status_details": { + "description": "", + "properties": { + "advancing": { + "$ref": "#/$defs/billing_clocks_resource_status_details_advancing_status_details" + } + }, + "title": "BillingClocksResourceStatusDetailsStatusDetails", + "type": "object", + "x-expandableFields": ["advancing"], + "x-stripeMostCommon": ["advancing"] + }, + "billing_credit_grants_resource_amount": { + "description": "", + "properties": { + "monetary": { + "anyOf": [{ "$ref": "#/$defs/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", + "x-stripeBypassValidation": true + } + }, + "required": ["monetary", "type"], + "title": "BillingCreditGrantsResourceAmount", + "type": "object", + "x-expandableFields": ["monetary"], + "x-stripeMostCommon": ["monetary", "type"] + }, + "billing_credit_grants_resource_applicability_config": { + "description": "", + "properties": { "scope": { "$ref": "#/$defs/billing_credit_grants_resource_scope" } }, + "required": ["scope"], + "title": "BillingCreditGrantsResourceApplicabilityConfig", + "type": "object", + "x-expandableFields": ["scope"], + "x-stripeMostCommon": ["scope"] + }, + "billing_credit_grants_resource_applicable_price": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["id"], + "title": "BillingCreditGrantsResourceApplicablePrice", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["id"] + }, + "billing_credit_grants_resource_balance_credit": { + "description": "", + "properties": { + "amount": { "$ref": "#/$defs/billing_credit_grants_resource_amount" }, + "credits_application_invoice_voided": { + "anyOf": [ + { + "$ref": "#/$defs/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", "credits_application_invoice_voided", "type"], + "title": "BillingCreditGrantsResourceBalanceCredit", + "type": "object", + "x-expandableFields": ["amount", "credits_application_invoice_voided"], + "x-stripeMostCommon": ["amount", "credits_application_invoice_voided", "type"] + }, + "billing_credit_grants_resource_balance_credits_application_invoice_voided": { + "description": "", + "properties": { + "invoice": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/invoice" }], + "description": "The invoice to which the reinstated billing credits were originally applied.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["invoice", "invoice_line_item"] + }, + "billing_credit_grants_resource_balance_credits_applied": { + "description": "", + "properties": { + "invoice": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/invoice" }], + "description": "The invoice to which the billing credits were applied.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["invoice", "invoice_line_item"] + }, + "billing_credit_grants_resource_balance_debit": { + "description": "", + "properties": { + "amount": { "$ref": "#/$defs/billing_credit_grants_resource_amount" }, + "credits_applied": { + "anyOf": [{ "$ref": "#/$defs/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", "credits_applied", "type"], + "title": "BillingCreditGrantsResourceBalanceDebit", + "type": "object", + "x-expandableFields": ["amount", "credits_applied"], + "x-stripeMostCommon": ["amount", "credits_applied", "type"] + }, + "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": [], + "x-stripeMostCommon": ["currency", "value"] + }, + "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. Cannot be used in combination with `prices`.", + "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. Cannot be used in combination with `price_type`.", + "items": { "$ref": "#/$defs/billing_credit_grants_resource_applicable_price" }, + "type": "array" + } + }, + "title": "BillingCreditGrantsResourceScope", + "type": "object", + "x-expandableFields": ["prices"], + "x-stripeMostCommon": ["price_type", "prices"] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [{ "$ref": "#/$defs/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" + }, + "tax_id": { + "description": "Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["address", "email", "name", "phone", "tax_id"], + "title": "billing_details", + "type": "object", + "x-expandableFields": ["address"], + "x-stripeMostCommon": ["address", "email", "name", "phone", "tax_id"] + }, + "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": [ + "canceled_by_retention_policy", + "cancellation_requested", + "payment_disputed", + "payment_failed" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["comment", "feedback", "reason"], + "title": "CancellationDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["comment", "feedback", "reason"] + }, + "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://docs.stripe.com/sources/cards)", + "properties": { + "account": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/account" }], + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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`, `Cartes Bancaires`, `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 when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.", + "format": "currency", + "nullable": true, + "type": "string" + }, + "customer": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer" }, + { "$ref": "#/$defs/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": "#/$defs/customer" }, { "$ref": "#/$defs/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" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "type": "string" + }, + "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. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "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://docs.stripe.com/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": "#/$defs/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": [ + "address_city", + "address_country", + "address_line1", + "address_line1_check", + "address_line2", + "address_state", + "address_zip", + "address_zip_check", + "brand", + "country", + "cvc_check", + "dynamic_last4", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "metadata", + "name", + "object", + "regulated_status", + "tokenization_method" + ], + "title": "Card", + "type": "object", + "x-expandableFields": ["account", "customer", "networks"], + "x-resourceId": "card", + "x-stripeMostCommon": [ + "address_city", + "address_country", + "address_line1", + "address_line2", + "address_state", + "address_zip", + "address_zip_check", + "brand", + "country", + "customer", + "cvc_check", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "id", + "last4", + "metadata", + "name" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/customers/{customer}/sources/{id}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/customers/{customer}/sources/{id}" + } + ], + "x-stripeResource": { + "class_name": "Card", + "in_package": "", + "polymorphic_groups": [ + "deleted_external_account", + "deleted_payment_source", + "external_account", + "payment_source" + ] + } + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["card_present", "type"] + }, + "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" + } + }, + "required": ["date", "ip"], + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "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://docs.stripe.com/currencies#zero-decimal).", + "nullable": true, + "type": "object" + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "customer_account": { + "description": "The ID of an Account representing a customer whose cash balance this object represents.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/customer_balance_customer_balance_settings" } + }, + "required": ["available", "customer", "customer_account", "livemode", "object", "settings"], + "title": "cash_balance", + "type": "object", + "x-expandableFields": ["settings"], + "x-resourceId": "cash_balance", + "x-stripeMostCommon": [ + "available", + "customer", + "customer_account", + "livemode", + "object", + "settings" + ], + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/cash_balance" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/customers/{customer}/cash_balance" + } + ], + "x-stripeResource": { "class_name": "CashBalance", "in_package": "" } + }, + "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 [Account Debits](https://docs.stripe.com/connect/account-debits) may also create 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://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/application" }], + "description": "ID of the Connect application that created the charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/application" }] } + }, + "application_fee": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/application_fee" }], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://docs.stripe.com/connect/direct-charges#collect-fees) for details.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/application_fee" }] } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://docs.stripe.com/connect/direct-charges#collect-fees) for details.", + "nullable": true, + "type": "integer" + }, + "authorization_code": { + "description": "Authorization code on the charge.", + "maxLength": 5000, + "type": "string" + }, + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/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": "#/$defs/balance_transaction" }] } + }, + "billing_details": { "$ref": "#/$defs/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": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "ID of the customer this charge is for if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/balance_transaction" }] } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://docs.stripe.com/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": "#/$defs/charge_fraud_details" }], + "description": "Information on fraud assessments for the charge.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "level3": { "$ref": "#/$defs/level3" }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/account" }], + "description": "The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://docs.stripe.com/connect/separate-charges-and-transfers) for details.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "outcome": { + "anyOf": [{ "$ref": "#/$defs/charge_outcome" }], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://docs.stripe.com/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": "#/$defs/payment_intent" }], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/payment_method_details" }], + "description": "Details about the payment method at the time of the transaction.", + "nullable": true + }, + "presentment_details": { + "$ref": "#/$defs/payment_flows_payment_intent_presentment_details" + }, + "radar_options": { "$ref": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "review": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/review" }], + "description": "ID of the review associated with this charge if one exists.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/review" }] } + }, + "shipping": { + "anyOf": [{ "$ref": "#/$defs/shipping" }], + "description": "Shipping information for the charge.", + "nullable": true + }, + "source": { + "anyOf": [{ "$ref": "#/$defs/payment_source" }], + "description": "This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.", + "nullable": true + }, + "source_transfer": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/transfer" }] } + }, + "transfer_data": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options) for details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "application", + "application_fee", + "application_fee_amount", + "balance_transaction", + "billing_details", + "calculated_statement_descriptor", + "captured", + "created", + "currency", + "customer", + "description", + "disputed", + "failure_balance_transaction", + "failure_code", + "failure_message", + "fraud_details", + "id", + "livemode", + "metadata", + "object", + "on_behalf_of", + "outcome", + "paid", + "payment_intent", + "payment_method", + "payment_method_details", + "receipt_email", + "receipt_number", + "receipt_url", + "refunded", + "review", + "shipping", + "source", + "source_transfer", + "statement_descriptor", + "statement_descriptor_suffix", + "status", + "transfer_data", + "transfer_group" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "level3", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "presentment_details", + "radar_options", + "refunds", + "review", + "shipping", + "source", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge", + "x-stripeMostCommon": [ + "amount", + "balance_transaction", + "billing_details", + "currency", + "customer", + "description", + "disputed", + "id", + "metadata", + "payment_intent", + "payment_method_details", + "receipt_email", + "refunded", + "shipping", + "statement_descriptor", + "statement_descriptor_suffix", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/charges" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/charges/{charge}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/charges/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/charges" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/charges/{charge}" + }, + { + "method_name": "capture", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/charges/{charge}/capture" + } + ], + "x-stripeResource": { + "class_name": "Charge", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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": [], + "x-stripeMostCommon": ["stripe_report", "user_report"] + }, + "charge_outcome": { + "description": "", + "properties": { + "advice_code": { + "description": "An enumerated value providing a more detailed explanation on [how to proceed with an error](https://docs.stripe.com/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, an alphanumeric code which indicates the reason the charge 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://docs.stripe.com/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 blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://docs.stripe.com/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": "#/$defs/rule" }], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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://docs.stripe.com/declines) and [Radar reviews](https://docs.stripe.com/radar/reviews) for details.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "advice_code", + "network_advice_code", + "network_decline_code", + "network_status", + "reason", + "seller_message", + "type" + ], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": ["rule"], + "x-stripeMostCommon": [ + "advice_code", + "network_advice_code", + "network_decline_code", + "network_status", + "reason", + "risk_level", + "risk_score", + "rule", + "seller_message", + "type" + ] + }, + "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": "#/$defs/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": "#/$defs/account" }] } + } + }, + "required": ["amount", "destination"], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": ["destination"], + "x-stripeMostCommon": ["amount", "destination"] + }, + "connect_account_reference": { + "description": "", + "properties": { + "account": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/account" }], + "description": "The connected account being referenced when `type` is `account`.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "type": { + "description": "Type of the account referenced.", + "enum": ["account", "self"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "ConnectAccountReference", + "type": "object", + "x-expandableFields": ["account"], + "x-stripeMostCommon": ["account", "type"] + }, + "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": "#/$defs/account" }], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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"], + "x-stripeMostCommon": ["amount", "currency", "destination", "id", "livemode", "object"], + "x-stripeResource": { + "class_name": "ConnectCollectionTransfer", + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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://api.stripe.com#subscriptions), [invoices](https://api.stripe.com#invoices),\n[checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://api.stripe.com#quotes), and more. Coupons do not work with conventional one-off [charges](/api/charges/create) or [payment intents](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/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`, or `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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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://docs.stripe.com/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": [ + "amount_off", + "created", + "currency", + "duration", + "duration_in_months", + "id", + "livemode", + "max_redemptions", + "metadata", + "name", + "object", + "percent_off", + "redeem_by", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": ["applies_to", "currency_options"], + "x-resourceId": "coupon", + "x-stripeMostCommon": [ + "amount_off", + "currency", + "duration", + "id", + "metadata", + "name", + "percent_off" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/coupons/{coupon}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/coupons" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/coupons/{coupon}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/coupons" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/coupons/{coupon}" + } + ], + "x-stripeResource": { "class_name": "Coupon", "has_collection_class": true, "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["products"] + }, + "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": [], + "x-stripeMostCommon": ["amount_off"] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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": "#/$defs/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" + } + }, + "required": ["custom_unit_amount", "tax_behavior", "unit_amount", "unit_amount_decimal"], + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": ["custom_unit_amount", "tiers"], + "x-stripeMostCommon": ["unit_amount"] + }, + "custom_logo": { + "description": "", + "properties": { + "content_type": { + "description": "Content type of the Dashboard-only CustomPaymentMethodType logo.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "URL of the Dashboard-only CustomPaymentMethodType logo.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["content_type", "url"], + "title": "custom_logo", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["content_type", "url"] + }, + "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" + } + }, + "required": ["maximum", "minimum", "preset"], + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["maximum", "minimum", "preset"] + }, + "customer": { + "description": "This object represents a customer of your business. Use it to [create recurring charges](https://docs.stripe.com/invoicing/customer), [save payment](https://docs.stripe.com/payments/save-during-payment) and contact information,\nand track payments that belong to the same customer.", + "properties": { + "address": { + "anyOf": [{ "$ref": "#/$defs/address" }], + "description": "The customer's address.", + "nullable": true + }, + "balance": { + "description": "The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance).", + "type": "integer" + }, + "business_name": { + "description": "The customer's business name.", + "maxLength": 150, + "type": "string" + }, + "cash_balance": { + "anyOf": [{ "$ref": "#/$defs/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" + }, + "customer_account": { + "description": "The ID of an Account representing a customer. You can use this ID with any v1 API that accepts a customer_account parameter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "default_source": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_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://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_source" }] } + }, + "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://docs.stripe.com/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": "#/$defs/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" + }, + "individual_name": { + "description": "The customer's individual name.", + "maxLength": 150, + "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": "#/$defs/invoice_setting_customer_setting" }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": { "$ref": "#/$defs/payment_source" }, + "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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "tax": { "$ref": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "test_clock": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/test_helpers.test_clock" } + ], + "description": "ID of the test clock that this customer belongs to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/test_helpers.test_clock" }] } + } + }, + "required": [ + "created", + "default_source", + "description", + "email", + "id", + "livemode", + "object", + "shipping" + ], + "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", + "x-stripeMostCommon": [ + "address", + "customer_account", + "description", + "email", + "id", + "metadata", + "name", + "phone", + "shipping", + "tax" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/customers/{customer}" + }, + { + "method_name": "delete_discount", + "method_on": "service", + "method_type": "custom", + "operation": "delete", + "path": "/v1/customers/{customer}/discount" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/customers" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}" + }, + { + "method_name": "balance_transactions", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/customers/{customer}/balance_transactions" + }, + { + "method_name": "list_payment_methods", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/customers/{customer}/payment_methods" + }, + { + "method_name": "retrieve_payment_method", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/customers/{customer}/payment_methods/{payment_method}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/customers/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/customers" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/customers/{customer}" + }, + { + "method_name": "create_funding_instructions", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/customers/{customer}/funding_instructions" + }, + { + "method_name": "fund_cash_balance", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/customers/{customer}/fund_cash_balance" + } + ], + "x-stripeResource": { + "class_name": "Customer", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "" + } + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the customer accepts the mandate.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "offline": { "$ref": "#/$defs/offline_acceptance" }, + "online": { "$ref": "#/$defs/online_acceptance" }, + "type": { + "description": "The mandate includes the type of customer acceptance information, such as: `online` or `offline`.", + "enum": ["offline", "online"], + "type": "string" + } + }, + "required": ["accepted_at", "type"], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": ["offline", "online"], + "x-stripeMostCommon": ["accepted_at", "offline", "online", "type"] + }, + "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": [], + "x-stripeMostCommon": ["reconciliation_mode", "using_merchant_default"] + }, + "customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft": { + "description": "", + "properties": { + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/balance_transaction" } + ], + "description": "The [Balance Transaction](https://docs.stripe.com/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/balance_transaction" }] } + }, + "linked_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer_cash_balance_transaction" } + ], + "description": "The [Cash Balance Transaction](https://docs.stripe.com/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer_cash_balance_transaction" }] + } + } + }, + "required": ["balance_transaction", "linked_transaction"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft", + "type": "object", + "x-expandableFields": ["balance_transaction", "linked_transaction"], + "x-stripeMostCommon": ["balance_transaction", "linked_transaction"], + "x-stripeResource": { "class_name": "AdjustedForOverdraft", "in_package": "" } + }, + "customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_intent" }], + "description": "The [Payment Intent](https://docs.stripe.com/api/payment_intents/object) that funds were applied to.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_intent" }] } + } + }, + "required": ["payment_intent"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction", + "type": "object", + "x-expandableFields": ["payment_intent"], + "x-stripeMostCommon": ["payment_intent"] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer" + } + }, + "required": ["bank_transfer"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction", + "type": "object", + "x-expandableFields": ["bank_transfer"], + "x-stripeMostCommon": ["bank_transfer"] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer" + }, + "gb_bank_transfer": { + "$ref": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer" + }, + "jp_bank_transfer": { + "$ref": "#/$defs/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": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer" + } + }, + "required": ["reference", "type"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "us_bank_transfer" + ], + "x-stripeMostCommon": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "reference", + "type", + "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" + } + }, + "required": ["bic", "iban_last4", "sender_name"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bic", "iban_last4", "sender_name"] + }, + "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" + } + }, + "required": ["account_number_last4", "sender_name", "sort_code"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["account_number_last4", "sender_name", "sort_code"] + }, + "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" + } + }, + "required": ["sender_bank", "sender_branch", "sender_name"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["sender_bank", "sender_branch", "sender_name"] + }, + "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" + } + }, + "required": ["sender_name"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["network", "sender_name"] + }, + "customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction": { + "description": "", + "properties": { + "refund": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/refund" }], + "description": "The [Refund](https://docs.stripe.com/api/refunds/object) that moved these funds into the customer's cash balance.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/refund" }] } + } + }, + "required": ["refund"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction", + "type": "object", + "x-expandableFields": ["refund"], + "x-stripeMostCommon": ["refund"], + "x-stripeResource": { "class_name": "RefundedFromPayment", "in_package": "" } + }, + "customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance": { + "description": "", + "properties": { + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/balance_transaction" } + ], + "description": "The [Balance Transaction](https://docs.stripe.com/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/balance_transaction" }] } + } + }, + "required": ["balance_transaction"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance", + "type": "object", + "x-expandableFields": ["balance_transaction"], + "x-stripeMostCommon": ["balance_transaction"], + "x-stripeResource": { "class_name": "TransferredToBalance", "in_package": "" } + }, + "customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_intent" }], + "description": "The [Payment Intent](https://docs.stripe.com/api/payment_intents/object) that funds were unapplied from.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_intent" }] } + } + }, + "required": ["payment_intent"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction", + "type": "object", + "x-expandableFields": ["payment_intent"], + "x-stripeMostCommon": ["payment_intent"], + "x-stripeResource": { "class_name": "UnappliedFromPayment", "in_package": "" } + }, + "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": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft" + }, + "applied_to_payment": { + "$ref": "#/$defs/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": "#/$defs/customer" }], + "description": "The customer whose available cash balance changed as a result of this transaction.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/customer" }] } + }, + "customer_account": { + "description": "The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "ending_balance": { + "description": "The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).", + "type": "integer" + }, + "funded": { + "$ref": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_funded_transaction" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "net_amount": { + "description": "The amount by which the cash balance changed, represented in the [smallest currency unit](https://docs.stripe.com/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": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction" + }, + "transferred_to_balance": { + "$ref": "#/$defs/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://docs.stripe.com/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": "#/$defs/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction" + } + }, + "required": [ + "created", + "currency", + "customer", + "customer_account", + "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", + "x-stripeMostCommon": [ + "adjusted_for_overdraft", + "applied_to_payment", + "created", + "currency", + "customer", + "customer_account", + "ending_balance", + "funded", + "id", + "livemode", + "net_amount", + "object", + "refunded_from_payment", + "transferred_to_balance", + "type", + "unapplied_from_payment" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/customers/{customer}/cash_balance_transactions" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/customers/{customer}/cash_balance_transactions" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/cash_balance_transactions/{transaction}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/cash_balance_transactions/{transaction}" + } + ], + "x-stripeResource": { + "class_name": "CustomerCashBalanceTransaction", + "has_collection_class": true, + "in_package": "", + "parent": "customer", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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": "#/$defs/customer_tax_location" }], + "description": "The identified tax location of the customer.", + "nullable": true + }, + "provider": { + "description": "The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps).", + "enum": ["anrok", "avalara", "sphere", "stripe"], + "type": "string" + } + }, + "required": ["automatic_tax", "ip_address", "location", "provider"], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": ["location"], + "x-stripeMostCommon": ["automatic_tax", "ip_address", "location", "provider"] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The identified tax country of the customer.", + "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 identified tax state, county, province, or region of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["country", "source", "state"], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["country", "source", "state"] + }, + "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", "name", "object"], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["deleted", "id", "name", "object"], + "x-stripeResource": { "class_name": "DeletedApplication", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["currency", "deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedBankAccount", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["currency", "deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedCard", "in_package": "" } + }, + "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", + "x-stripeMostCommon": ["deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedCustomer", "in_package": "" } + }, + "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" + }, + "customer": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "The ID of the customer associated with this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "The ID of the account representing the customer associated with this discount.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": "#/$defs/promotion_code" }], + "description": "The promotion code applied to create this discount.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/promotion_code" }] } + }, + "source": { "$ref": "#/$defs/discount_source" }, + "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": [ + "checkout_session", + "customer", + "customer_account", + "deleted", + "id", + "invoice", + "invoice_item", + "object", + "promotion_code", + "source", + "start", + "subscription", + "subscription_item" + ], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": ["customer", "promotion_code", "source"], + "x-resourceId": "deleted_discount", + "x-stripeMostCommon": [ + "customer", + "customer_account", + "deleted", + "id", + "source", + "start", + "subscription" + ], + "x-stripeResource": { "class_name": "DeletedDiscount", "in_package": "" } + }, + "deleted_external_account": { + "anyOf": [{ "$ref": "#/$defs/deleted_bank_account" }, { "$ref": "#/$defs/deleted_card" }], + "title": "Polymorphic", + "x-resourceId": "deleted_external_account", + "x-stripeBypassValidation": true, + "x-stripeResource": { "class_name": "DeletedExternalAccount" } + }, + "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", + "x-stripeMostCommon": ["deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedInvoice", "in_package": "" } + }, + "deleted_payment_source": { + "anyOf": [{ "$ref": "#/$defs/deleted_bank_account" }, { "$ref": "#/$defs/deleted_card" }], + "title": "Polymorphic", + "x-resourceId": "deleted_payment_source", + "x-stripeBypassValidation": true, + "x-stripeResource": { "class_name": "DeletedPaymentSource" } + }, + "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", + "x-stripeMostCommon": ["deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedPlan", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedPrice", "in_package": "" } + }, + "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", + "x-stripeMostCommon": ["deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedProduct", "in_package": "" } + }, + "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", + "x-stripeMostCommon": ["deleted", "id", "object"], + "x-stripeResource": { "class_name": "DeletedTaxId", "in_package": "" } + }, + "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://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#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://docs.stripe.com/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" + }, + "customer": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "The ID of the customer associated with this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "The ID of the account representing the customer associated with this discount.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": "#/$defs/promotion_code" }], + "description": "The promotion code applied to create this discount.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/promotion_code" }] } + }, + "source": { "$ref": "#/$defs/discount_source" }, + "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": [ + "checkout_session", + "customer", + "customer_account", + "end", + "id", + "invoice", + "invoice_item", + "object", + "promotion_code", + "source", + "start", + "subscription", + "subscription_item" + ], + "title": "Discount", + "type": "object", + "x-expandableFields": ["customer", "promotion_code", "source"], + "x-stripeMostCommon": [ + "customer", + "customer_account", + "end", + "id", + "source", + "start", + "subscription" + ], + "x-stripeResource": { "class_name": "Discount", "in_package": "" } + }, + "discount_source": { + "description": "", + "properties": { + "coupon": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/coupon" }], + "description": "The coupon that was redeemed to create this discount.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/coupon" }] } + }, + "type": { + "description": "The source type of the discount.", + "enum": ["coupon"], + "type": "string" + } + }, + "required": ["coupon", "type"], + "title": "DiscountSource", + "type": "object", + "x-expandableFields": ["coupon"], + "x-stripeMostCommon": ["coupon", "type"] + }, + "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": "#/$defs/discount" }, + { "$ref": "#/$defs/deleted_discount" } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/discount" }, { "$ref": "#/$defs/deleted_discount" }] + } + } + }, + "required": ["amount", "discount"], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": ["discount"], + "x-stripeMostCommon": ["amount", "discount"] + }, + "discounts_resource_stackable_discount_with_discount_end": { + "description": "", + "properties": { + "coupon": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/coupon" }], + "description": "ID of the coupon to create a new discount for.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/coupon" }] } + }, + "discount": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/discount" }], + "description": "ID of an existing discount on the object (or one of its ancestors) to reuse.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/discount" }] } + }, + "promotion_code": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/promotion_code" }], + "description": "ID of the promotion code to create a new discount for.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/promotion_code" }] } + } + }, + "required": ["coupon", "discount", "promotion_code"], + "title": "DiscountsResourceStackableDiscountWithDiscountEnd", + "type": "object", + "x-expandableFields": ["coupon", "discount", "promotion_code"], + "x-stripeMostCommon": ["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://docs.stripe.com/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": "#/$defs/balance_transaction" }, + "type": "array" + }, + "charge": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/charge" }], + "description": "ID of the charge that's disputed.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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", "visa_compliance"], "type": "string" }, + "type": "array" + }, + "evidence": { "$ref": "#/$defs/dispute_evidence" }, + "evidence_details": { "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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_reason_code": { + "description": "Network-dependent reason code for the dispute.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": "#/$defs/payment_intent" }], + "description": "ID of the PaymentIntent that's disputed.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_intent" }] } + }, + "payment_method_details": { "$ref": "#/$defs/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`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://docs.stripe.com/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`.", + "enum": [ + "lost", + "needs_response", + "prevented", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "enhanced_eligibility_types", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "payment_intent", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent", + "payment_method_details" + ], + "x-resourceId": "dispute", + "x-stripeMostCommon": [ + "amount", + "charge", + "currency", + "evidence", + "id", + "metadata", + "payment_intent", + "reason", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/disputes" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/disputes/{dispute}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/disputes/{dispute}" + }, + { + "method_name": "close", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/disputes/{dispute}/close" + } + ], + "x-stripeResource": { + "class_name": "Dispute", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "dispute_enhanced_eligibility": { + "description": "", + "properties": { + "visa_compelling_evidence_3": { + "$ref": "#/$defs/dispute_enhanced_eligibility_visa_compelling_evidence3" + }, + "visa_compliance": { "$ref": "#/$defs/dispute_enhanced_eligibility_visa_compliance" } + }, + "title": "DisputeEnhancedEligibility", + "type": "object", + "x-expandableFields": ["visa_compelling_evidence_3", "visa_compliance"], + "x-stripeMostCommon": ["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": [], + "x-stripeMostCommon": ["required_actions", "status"] + }, + "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": [], + "x-stripeMostCommon": ["status"] + }, + "dispute_enhanced_evidence": { + "description": "", + "properties": { + "visa_compelling_evidence_3": { + "$ref": "#/$defs/dispute_enhanced_evidence_visa_compelling_evidence3" + }, + "visa_compliance": { "$ref": "#/$defs/dispute_enhanced_evidence_visa_compliance" } + }, + "title": "DisputeEnhancedEvidence", + "type": "object", + "x-expandableFields": ["visa_compelling_evidence_3", "visa_compliance"], + "x-stripeMostCommon": ["visa_compelling_evidence_3", "visa_compliance"] + }, + "dispute_enhanced_evidence_visa_compelling_evidence3": { + "description": "", + "properties": { + "disputed_transaction": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/dispute_visa_compelling_evidence3_prior_undisputed_transaction" + }, + "type": "array" + } + }, + "required": ["disputed_transaction", "prior_undisputed_transactions"], + "title": "DisputeEnhancedEvidenceVisaCompellingEvidence3", + "type": "object", + "x-expandableFields": ["disputed_transaction", "prior_undisputed_transactions"], + "x-stripeMostCommon": ["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": [], + "x-stripeMostCommon": ["fee_acknowledged"] + }, + "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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/file" }] } + }, + "duplicate_charge_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/file" }] } + }, + "refund_policy": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/file" }] } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "access_activity_log", + "billing_address", + "cancellation_policy", + "cancellation_policy_disclosure", + "cancellation_rebuttal", + "customer_communication", + "customer_email_address", + "customer_name", + "customer_purchase_ip", + "customer_signature", + "duplicate_charge_documentation", + "duplicate_charge_explanation", + "duplicate_charge_id", + "enhanced_evidence", + "product_description", + "receipt", + "refund_policy", + "refund_policy_disclosure", + "refund_refusal_explanation", + "service_date", + "service_documentation", + "shipping_address", + "shipping_carrier", + "shipping_date", + "shipping_documentation", + "shipping_tracking_number", + "uncategorized_file", + "uncategorized_text" + ], + "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" + ], + "x-stripeMostCommon": [ + "access_activity_log", + "billing_address", + "cancellation_policy", + "cancellation_policy_disclosure", + "cancellation_rebuttal", + "customer_communication", + "customer_email_address", + "customer_name", + "customer_purchase_ip", + "customer_signature", + "duplicate_charge_documentation", + "duplicate_charge_explanation", + "duplicate_charge_id", + "enhanced_evidence", + "product_description", + "receipt", + "refund_policy", + "refund_policy_disclosure", + "refund_refusal_explanation", + "service_date", + "service_documentation", + "shipping_address", + "shipping_carrier", + "shipping_date", + "shipping_documentation", + "shipping_tracking_number", + "uncategorized_file", + "uncategorized_text" + ] + }, + "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": "#/$defs/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": [ + "due_by", + "enhanced_eligibility", + "has_evidence", + "past_due", + "submission_count" + ], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": ["enhanced_eligibility"], + "x-stripeMostCommon": [ + "due_by", + "enhanced_eligibility", + "has_evidence", + "past_due", + "submission_count" + ] + }, + "dispute_payment_method_details": { + "description": "", + "properties": { + "amazon_pay": { "$ref": "#/$defs/dispute_payment_method_details_amazon_pay" }, + "card": { "$ref": "#/$defs/dispute_payment_method_details_card" }, + "klarna": { "$ref": "#/$defs/dispute_payment_method_details_klarna" }, + "paypal": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["amazon_pay", "card", "klarna", "paypal", "type"] + }, + "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" + } + }, + "required": ["dispute_type"], + "title": "DisputePaymentMethodDetailsAmazonPay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["dispute_type"] + }, + "dispute_payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `cartes_bancaires`, `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": ["block", "chargeback", "compliance", "inquiry", "resolution"], + "type": "string" + }, + "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", "network_reason_code"], + "title": "DisputePaymentMethodDetailsCard", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["brand", "case_type", "network_reason_code"] + }, + "dispute_payment_method_details_klarna": { + "description": "", + "properties": { + "chargeback_loss_reason_code": { + "description": "Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason", + "maxLength": 5000, + "type": "string" + }, + "reason_code": { + "description": "The reason for the dispute as defined by Klarna", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["reason_code"], + "title": "DisputePaymentMethodDetailsKlarna", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["chargeback_loss_reason_code", "reason_code"] + }, + "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" + } + }, + "required": ["case_id", "reason_code"], + "title": "DisputePaymentMethodDetailsPaypal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["case_id", "reason_code"] + }, + "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, such as the street, PO Box, or company name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2, such as the 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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["city", "country", "line1", "line2", "postal_code", "state"], + "title": "DisputeTransactionShippingAddress", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["city", "country", "line1", "line2", "postal_code", "state"] + }, + "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": "#/$defs/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": [ + "customer_account_id", + "customer_device_fingerprint", + "customer_device_id", + "customer_email_address", + "customer_purchase_ip", + "merchandise_or_services", + "product_description", + "shipping_address" + ], + "title": "DisputeVisaCompellingEvidence3DisputedTransaction", + "type": "object", + "x-expandableFields": ["shipping_address"], + "x-stripeMostCommon": [ + "customer_account_id", + "customer_device_fingerprint", + "customer_device_id", + "customer_email_address", + "customer_purchase_ip", + "merchandise_or_services", + "product_description", + "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": "#/$defs/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", + "customer_account_id", + "customer_device_fingerprint", + "customer_device_id", + "customer_email_address", + "customer_purchase_ip", + "product_description", + "shipping_address" + ], + "title": "DisputeVisaCompellingEvidence3PriorUndisputedTransaction", + "type": "object", + "x-expandableFields": ["shipping_address"], + "x-stripeMostCommon": [ + "charge", + "customer_account_id", + "customer_device_fingerprint", + "customer_device_id", + "customer_email_address", + "customer_purchase_ip", + "product_description", + "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": [], + "x-stripeMostCommon": ["email_sent_at", "email_sent_to"] + }, + "external_account": { + "anyOf": [{ "$ref": "#/$defs/bank_account" }, { "$ref": "#/$defs/card" }], + "title": "Polymorphic", + "x-resourceId": "external_account", + "x-stripeBypassValidation": true, + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/accounts/{account}/external_accounts" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/accounts/{account}/external_accounts" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/accounts/{account}/external_accounts/{id}" + }, + { + "method_name": "create", + "method_on": "collection", + "method_type": "create", + "operation": "post", + "path": "/v1/accounts/{account}/external_accounts" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/accounts/{account}/external_accounts" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/accounts/{account}/external_accounts/{id}" + } + ], + "x-stripeResource": { "class_name": "ExternalAccount", "has_collection_class": true } + }, + "external_account_requirements": { + "description": "", + "properties": { + "currently_due": { + "description": "Fields that need to be resolved to keep the external account enabled. If not resolved by `current_deadline`, these fields will appear in `past_due` as well, and the account is disabled.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + }, + "errors": { + "description": "Details about validation and verification failures for `due` requirements that must be resolved.", + "items": { "$ref": "#/$defs/account_requirements_error" }, + "nullable": true, + "type": "array" + }, + "past_due": { + "description": "Fields that haven't been resolved by `current_deadline`. These fields need to be resolved to enable the external account.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.", + "items": { "maxLength": 5000, "type": "string" }, + "nullable": true, + "type": "array" + } + }, + "required": ["currently_due", "errors", "past_due", "pending_verification"], + "title": "ExternalAccountRequirements", + "type": "object", + "x-expandableFields": ["errors"], + "x-stripeMostCommon": ["currently_due", "errors", "past_due", "pending_verification"] + }, + "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", "application", "currency", "description", "type"], + "title": "Fee", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "application", "currency", "description", "type"] + }, + "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://docs.stripe.com/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": "#/$defs/balance_transaction" } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/application_fee" }], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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", + "balance_transaction", + "created", + "currency", + "fee", + "id", + "metadata", + "object" + ], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": ["balance_transaction", "fee"], + "x-resourceId": "fee_refund", + "x-stripeMostCommon": ["amount", "currency", "fee", "id", "metadata"], + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/application_fees/{fee}/refunds/{id}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/application_fees/{fee}/refunds/{id}" + }, + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/application_fees/{id}/refunds" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/application_fees/{id}/refunds" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/application_fees/{fee}/refunds/{id}" + }, + { + "method_name": "create", + "method_on": "collection", + "method_type": "create", + "operation": "post", + "path": "/v1/application_fees/{id}/refunds" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/application_fees/{id}/refunds" + } + ], + "x-stripeResource": { + "class_name": "FeeRefund", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "file": { + "description": "This object represents files hosted on Stripe's servers. You can upload\nfiles with the [create file](https://api.stripe.com#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://docs.stripe.com/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://api.stripe.com#file_links) that point at this file.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "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://docs.stripe.com/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", + "platform_terms_of_service", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_android_apk", + "terminal_reader_splashscreen", + "terminal_wifi_certificate", + "terminal_wifi_private_key" + ], + "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", + "expires_at", + "filename", + "id", + "object", + "purpose", + "size", + "title", + "type", + "url" + ], + "title": "File", + "type": "object", + "x-expandableFields": ["links"], + "x-resourceId": "file", + "x-stripeMostCommon": ["id", "purpose", "type"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/files" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/files/{file}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/files" + } + ], + "x-stripeResource": { "class_name": "File", "has_collection_class": true, "in_package": "" } + }, + "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": "#/$defs/file" }], + "description": "The file object this link points to.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/file" }] } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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", + "expires_at", + "file", + "id", + "livemode", + "metadata", + "object", + "url" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": ["file"], + "x-resourceId": "file_link", + "x-stripeMostCommon": ["expires_at", "file", "id", "metadata", "url"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/file_links" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/file_links/{link}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/file_links" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/file_links/{link}" + } + ], + "x-stripeResource": { + "class_name": "FileLink", + "has_collection_class": true, + "in_package": "" + } + }, + "funding_instructions_bank_transfer_aba_record": { + "description": "ABA Records contain U.S. bank account details per the ABA format.", + "properties": { + "account_holder_address": { "$ref": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": [ + "account_holder_address", + "account_holder_name", + "account_number", + "account_type", + "bank_address", + "bank_name", + "routing_number" + ], + "x-stripeResource": { "class_name": "Aba", "in_package": "" } + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "aba": { "$ref": "#/$defs/funding_instructions_bank_transfer_aba_record" }, + "iban": { "$ref": "#/$defs/funding_instructions_bank_transfer_iban_record" }, + "sort_code": { "$ref": "#/$defs/funding_instructions_bank_transfer_sort_code_record" }, + "spei": { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/funding_instructions_bank_transfer_zengin_record" } + }, + "required": ["type"], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": ["aba", "iban", "sort_code", "spei", "swift", "zengin"], + "x-stripeMostCommon": [ + "aba", + "iban", + "sort_code", + "spei", + "supported_networks", + "swift", + "type", + "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": "#/$defs/address" }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": [ + "account_holder_address", + "account_holder_name", + "bank_address", + "bic", + "country", + "iban" + ] + }, + "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": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": [ + "account_holder_address", + "account_holder_name", + "account_number", + "bank_address", + "sort_code" + ], + "x-stripeResource": { "class_name": "SortCodeRecords", "in_package": "" } + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "account_holder_address": { "$ref": "#/$defs/address" }, + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": "string" + }, + "bank_address": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": [ + "account_holder_address", + "account_holder_name", + "bank_address", + "bank_code", + "bank_name", + "clabe" + ] + }, + "funding_instructions_bank_transfer_swift_record": { + "description": "SWIFT Records contain U.S. bank account details per the SWIFT format.", + "properties": { + "account_holder_address": { "$ref": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": [ + "account_holder_address", + "account_holder_name", + "account_number", + "account_type", + "bank_address", + "bank_name", + "swift_code" + ] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "account_holder_address": { "$ref": "#/$defs/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": "#/$defs/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", + "account_holder_name", + "account_number", + "account_type", + "bank_address", + "bank_code", + "bank_name", + "branch_code", + "branch_name" + ], + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": ["account_holder_address", "bank_address"], + "x-stripeMostCommon": [ + "account_holder_address", + "account_holder_name", + "account_number", + "account_type", + "bank_address", + "bank_code", + "bank_name", + "branch_code", + "branch_name" + ] + }, + "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" + } + }, + "required": ["brand", "country", "exp_month", "exp_year", "last4"], + "title": "internal_card", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["brand", "country", "exp_month", "exp_year", "last4"] + }, + "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://api.stripe.com#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://docs.stripe.com/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://docs.stripe.com/billing/customer/balance).\n\nRelated guide: [Send invoices to customers](https://docs.stripe.com/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": "#/$defs/tax_id" }, + { "$ref": "#/$defs/deleted_tax_id" } + ], + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/tax_id" }, { "$ref": "#/$defs/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_overpaid": { + "description": "Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.", + "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": "#/$defs/application" }, + { "$ref": "#/$defs/deleted_application" } + ], + "description": "ID of the Connect Application that created the invoice.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/application" }, { "$ref": "#/$defs/deleted_application" }] + } + }, + "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://docs.stripe.com/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": "#/$defs/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 upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming" + ], + "nullable": true, + "type": "string" + }, + "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" + }, + "confirmation_secret": { + "anyOf": [{ "$ref": "#/$defs/invoices_resource_confirmation_secret" }], + "description": "The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.", + "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", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { "$ref": "#/$defs/invoice_setting_custom_field" }, + "nullable": true, + "type": "array" + }, + "customer": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "The ID of the customer to bill.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "The ID of the account representing the customer to bill.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_address": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/invoices_resource_invoice_tax_id" }, + "nullable": true, + "type": "array" + }, + "default_payment_method": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/payment_method" }] } + }, + "default_source": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_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": "#/$defs/payment_source" }] } + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { "$ref": "#/$defs/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" + }, + "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": "#/$defs/discount" }, + { "$ref": "#/$defs/deleted_discount" } + ], + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/discount" }, { "$ref": "#/$defs/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": "#/$defs/invoices_resource_from_invoice" }], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://docs.stripe.com/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. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.", + "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": "#/$defs/connect_account_reference" }, + "last_finalization_error": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/invoice" }], + "description": "The ID of the most recent non-draft revision of this invoice", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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://docs.stripe.com/billing/invoices/connect) documentation for details.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "parent": { + "anyOf": [{ "$ref": "#/$defs/billing_bill_resource_invoicing_parents_invoice_parent" }], + "description": "The parent that generated this invoice", + "nullable": true + }, + "payment_settings": { "$ref": "#/$defs/invoices_payment_settings" }, + "payments": { + "description": "Payments for this invoice. Use [invoice payment](/api/invoice-payment) to get more details.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { "$ref": "#/$defs/invoice_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, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoicesPaymentsListInvoicePayments", + "type": "object", + "x-expandableFields": ["data"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "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" + }, + "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": "#/$defs/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": "#/$defs/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": "#/$defs/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://docs.stripe.com/billing/invoices/workflow#workflow-overview)", + "enum": ["draft", "open", "paid", "uncollectible", "void"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { "$ref": "#/$defs/invoices_resource_status_transitions" }, + "subscription": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/subscription" }], + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/subscription" }] } + }, + "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" + }, + "test_clock": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/test_helpers.test_clock" } + ], + "description": "ID of the test clock this invoice belongs to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/test_helpers.test_clock" }] } + }, + "threshold_reason": { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/invoices_resource_pretax_credit_amount" }, + "nullable": true, + "type": "array" + }, + "total_taxes": { + "description": "The aggregate tax information of all line items.", + "items": { "$ref": "#/$defs/billing_bill_resource_invoicing_taxes_tax" }, + "nullable": true, + "type": "array" + }, + "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://docs.stripe.com/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": [ + "account_country", + "account_name", + "account_tax_ids", + "amount_due", + "amount_overpaid", + "amount_paid", + "amount_remaining", + "amount_shipping", + "application", + "attempt_count", + "attempted", + "automatic_tax", + "automatically_finalizes_at", + "billing_reason", + "collection_method", + "created", + "currency", + "custom_fields", + "customer", + "customer_account", + "customer_address", + "customer_email", + "customer_name", + "customer_phone", + "customer_shipping", + "customer_tax_exempt", + "default_payment_method", + "default_source", + "default_tax_rates", + "description", + "discounts", + "due_date", + "effective_at", + "ending_balance", + "footer", + "from_invoice", + "issuer", + "last_finalization_error", + "latest_revision", + "lines", + "livemode", + "metadata", + "next_payment_attempt", + "number", + "object", + "on_behalf_of", + "parent", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "receipt_number", + "rendering", + "shipping_cost", + "shipping_details", + "starting_balance", + "statement_descriptor", + "status", + "status_transitions", + "subtotal", + "subtotal_excluding_tax", + "test_clock", + "total", + "total_discount_amounts", + "total_excluding_tax", + "total_pretax_credit_amounts", + "total_taxes", + "webhooks_delivered_at" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "confirmation_secret", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discounts", + "from_invoice", + "issuer", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "parent", + "payment_settings", + "payments", + "rendering", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_pretax_credit_amounts", + "total_taxes" + ], + "x-resourceId": "invoice", + "x-stripeMostCommon": [ + "auto_advance", + "automatic_tax", + "collection_method", + "confirmation_secret", + "currency", + "customer", + "customer_account", + "description", + "hosted_invoice_url", + "id", + "lines", + "metadata", + "parent", + "payments", + "period_end", + "period_start", + "status", + "total" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/invoices/{invoice}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/invoices" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/invoices/{invoice}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/invoices/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/invoices" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/invoices/{invoice}" + }, + { + "method_name": "add_lines", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/add_lines" + }, + { + "method_name": "attach_payment", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/attach_payment" + }, + { + "method_name": "finalize_invoice", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/finalize" + }, + { + "method_name": "mark_uncollectible", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/mark_uncollectible" + }, + { + "method_name": "pay", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/pay" + }, + { + "method_name": "remove_lines", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/remove_lines" + }, + { + "method_name": "send_invoice", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/send" + }, + { + "method_name": "update_lines", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/update_lines" + }, + { + "method_name": "void_invoice", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/{invoice}/void" + }, + { + "method_name": "create_preview", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/invoices/create_preview" + } + ], + "x-stripeResource": { + "class_name": "Invoice", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "" + } + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "nullable": true, + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["enabled"] + }, + "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": [], + "x-stripeMostCommon": ["line_item_ids", "usage_gte"] + }, + "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": [], + "x-stripeMostCommon": ["end", "start"] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments, specified in the presentment currency.", + "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" + } + }, + "required": ["amount", "amount_type", "description"], + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "amount_type", "description"] + }, + "invoice_mandate_options_payto": { + "description": "", + "properties": { + "amount": { + "description": "The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit.", + "nullable": true, + "type": "integer" + }, + "amount_type": { + "description": "Only `maximum` is supported.", + "enum": ["fixed", "maximum"], + "nullable": true, + "type": "string" + }, + "purpose": { + "description": "The purpose for which payments are made. Has a default value based on your merchant category code.", + "enum": [ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["amount", "amount_type", "purpose"], + "title": "invoice_mandate_options_payto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "amount_type", "purpose"] + }, + "invoice_payment": { + "description": "Invoice Payments represent payments made against invoices. Invoice Payments can\nbe accessed in two ways:\n1. By expanding the `payments` field on the [Invoice](https://api.stripe.com#invoice) resource.\n2. By using the Invoice Payment retrieve and list endpoints.\n\nInvoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices.\nThis resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and\nmonitor the allocation details of the payments.", + "properties": { + "amount_paid": { + "description": "Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.", + "nullable": true, + "type": "integer" + }, + "amount_requested": { + "description": "Amount intended to be paid toward this invoice, in cents (or local equivalent)", + "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).", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/invoice" }, + { "$ref": "#/$defs/deleted_invoice" } + ], + "description": "The invoice that was paid.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/invoice" }, { "$ref": "#/$defs/deleted_invoice" }] + } + }, + "is_default": { + "description": "Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.", + "type": "boolean" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoice_payment"], + "type": "string" + }, + "payment": { "$ref": "#/$defs/invoices_payments_invoice_payment_associated_payment" }, + "status": { + "description": "The status of the payment, one of `open`, `paid`, or `canceled`.", + "maxLength": 5000, + "type": "string" + }, + "status_transitions": { + "$ref": "#/$defs/invoices_payments_invoice_payment_status_transitions" + } + }, + "required": [ + "amount_paid", + "amount_requested", + "created", + "currency", + "id", + "invoice", + "is_default", + "livemode", + "object", + "payment", + "status", + "status_transitions" + ], + "title": "InvoicesInvoicePayment", + "type": "object", + "x-expandableFields": ["invoice", "payment", "status_transitions"], + "x-resourceId": "invoice_payment", + "x-stripeMostCommon": [ + "amount_paid", + "amount_requested", + "id", + "invoice", + "is_default", + "payment", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/invoice_payments" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/invoice_payments/{invoice_payment}" + } + ], + "x-stripeResource": { + "class_name": "InvoicePayment", + "has_collection_class": true, + "in_package": "" + } + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method. The default value is `automatic`.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options", "verification_method"] + }, + "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" + } + }, + "required": ["transaction_type"], + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["transaction_type"] + }, + "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": [], + "x-stripeMostCommon": ["preferred_language"] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { "$ref": "#/$defs/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://docs.stripe.com/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://docs.stripe.com/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" + } + }, + "required": ["request_three_d_secure"], + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": ["installments"], + "x-stripeMostCommon": ["installments", "request_three_d_secure"] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/$defs/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" + } + }, + "required": ["funding_type"], + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": ["bank_transfer"], + "x-stripeMostCommon": ["bank_transfer", "funding_type"] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/$defs/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" + } + }, + "required": ["type"], + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"], + "x-stripeMostCommon": ["eu_bank_transfer", "type"] + }, + "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: `DE`, `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": [], + "x-stripeMostCommon": ["country"] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_payto": { + "description": "", + "properties": { "mandate_options": { "$ref": "#/$defs/invoice_mandate_options_payto" } }, + "title": "invoice_payment_method_options_payto", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options"] + }, + "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": "#/$defs/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method. The default value is `automatic`.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections"], + "x-stripeMostCommon": ["financial_connections", "verification_method"] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "filters": { + "$ref": "#/$defs/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" + } + }, + "required": ["prefetch"], + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": ["filters"], + "x-stripeMostCommon": ["filters", "permissions", "prefetch"] + }, + "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": [], + "x-stripeMostCommon": ["account_subcategories"] + }, + "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" + } + }, + "required": ["page_size"], + "title": "InvoiceRenderingPdf", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["page_size"] + }, + "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": [], + "x-stripeMostCommon": ["name", "value"] + }, + "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" + } + }, + "required": ["amount_tax_display", "template"], + "title": "InvoiceSettingCustomerRenderingOptions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount_tax_display", "template"] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { "$ref": "#/$defs/invoice_setting_custom_field" }, + "nullable": true, + "type": "array" + }, + "default_payment_method": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/payment_method" }] } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "rendering_options": { + "anyOf": [{ "$ref": "#/$defs/invoice_setting_customer_rendering_options" }], + "description": "Default options for invoice PDF rendering for this customer.", + "nullable": true + } + }, + "required": ["custom_fields", "default_payment_method", "footer", "rendering_options"], + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": ["custom_fields", "default_payment_method", "rendering_options"], + "x-stripeMostCommon": [ + "custom_fields", + "default_payment_method", + "footer", + "rendering_options" + ] + }, + "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": "#/$defs/tax_id" }, + { "$ref": "#/$defs/deleted_tax_id" } + ], + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/tax_id" }, { "$ref": "#/$defs/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": "#/$defs/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 + } + }, + "required": ["account_tax_ids", "days_until_due", "issuer"], + "title": "InvoiceSettingSubscriptionSchedulePhaseSetting", + "type": "object", + "x-expandableFields": ["account_tax_ids", "issuer"], + "x-stripeMostCommon": ["account_tax_ids", "days_until_due", "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": "#/$defs/tax_id" }, + { "$ref": "#/$defs/deleted_tax_id" } + ], + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/tax_id" }, { "$ref": "#/$defs/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": "#/$defs/connect_account_reference" } + }, + "required": ["account_tax_ids", "days_until_due", "issuer"], + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": ["account_tax_ids", "issuer"], + "x-stripeMostCommon": ["account_tax_ids", "days_until_due", "issuer"] + }, + "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": "#/$defs/invoice_item_threshold_reason" }, + "type": "array" + } + }, + "required": ["amount_gte", "item_reasons"], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": ["item_reasons"], + "x-stripeMostCommon": ["amount_gte", "item_reasons"] + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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 + }, + "payto": { + "anyOf": [{ "$ref": "#/$defs/invoice_payment_method_options_payto" }], + "description": "If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "sepa_debit": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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 + } + }, + "required": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "payto", + "sepa_debit", + "us_bank_account" + ], + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "payto", + "sepa_debit", + "us_bank_account" + ], + "x-stripeMostCommon": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "payto", + "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": "#/$defs/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", + "affirm", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "nz_bank_account", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "promptpay", + "revolut_pay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + } + }, + "required": ["default_mandate", "payment_method_options", "payment_method_types"], + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": ["payment_method_options"], + "x-stripeMostCommon": ["default_mandate", "payment_method_options", "payment_method_types"] + }, + "invoices_payments_invoice_payment_associated_payment": { + "description": "", + "properties": { + "charge": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/charge" }], + "description": "ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/charge" }] } + }, + "payment_intent": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_intent" }], + "description": "ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_intent" }] } + }, + "payment_record": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_record" }], + "description": "ID of the PaymentRecord associated with this payment when `type` is `payment_record`.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_record" }] } + }, + "type": { + "description": "Type of payment object associated with this invoice payment.", + "enum": ["charge", "payment_intent", "payment_record"], + "type": "string" + } + }, + "required": ["type"], + "title": "InvoicesPaymentsInvoicePaymentAssociatedPayment", + "type": "object", + "x-expandableFields": ["charge", "payment_intent", "payment_record"], + "x-stripeMostCommon": ["payment_intent", "payment_record", "type"] + }, + "invoices_payments_invoice_payment_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "The time that the payment was canceled.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "paid_at": { + "description": "The time that the payment succeeded.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": ["canceled_at", "paid_at"], + "title": "InvoicesPaymentsInvoicePaymentStatusTransitions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["canceled_at", "paid_at"] + }, + "invoices_resource_confirmation_secret": { + "description": "", + "properties": { + "client_secret": { + "description": "The client_secret of the payment that Stripe creates for the invoice after finalization.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["client_secret", "type"], + "title": "InvoicesResourceConfirmationSecret", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["client_secret", "type"] + }, + "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": "#/$defs/invoice" }], + "description": "The invoice that was cloned.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/invoice" }] } + } + }, + "required": ["action", "invoice"], + "title": "InvoicesResourceFromInvoice", + "type": "object", + "x-expandableFields": ["invoice"], + "x-stripeMostCommon": ["action", "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": "#/$defs/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" + } + }, + "required": ["amount_tax_display", "pdf", "template", "template_version"], + "title": "InvoicesResourceInvoiceRendering", + "type": "object", + "x-expandableFields": ["pdf"], + "x-stripeMostCommon": ["amount_tax_display", "pdf", "template", "template_version"] + }, + "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`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`", + "enum": [ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "lk_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", + "pl_nip", + "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", "value"], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["type", "value"] + }, + "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": "#/$defs/billing.credit_balance_transaction" } + ], + "description": "The credit balance transaction that was applied to get this pretax credit amount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/billing.credit_balance_transaction" }] + } + }, + "discount": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/discount" }, + { "$ref": "#/$defs/deleted_discount" } + ], + "description": "The discount that was applied to get this pretax credit amount.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/discount" }, { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["amount", "credit_balance_transaction", "discount", "type"] + }, + "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": "#/$defs/shipping_rate" }], + "description": "The ID of the ShippingRate for this invoice.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/shipping_rate" }] } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { "$ref": "#/$defs/line_items_tax_amount" }, + "type": "array" + } + }, + "required": ["amount_subtotal", "amount_tax", "amount_total", "shipping_rate"], + "title": "InvoicesResourceShippingCost", + "type": "object", + "x-expandableFields": ["shipping_rate", "taxes"], + "x-stripeMostCommon": [ + "amount_subtotal", + "amount_tax", + "amount_total", + "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" + } + }, + "required": ["finalized_at", "marked_uncollectible_at", "paid_at", "voided_at"], + "title": "InvoicesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["finalized_at", "marked_uncollectible_at", "paid_at", "voided_at"] + }, + "issuing.authorization": { + "description": "When an [issued card](https://docs.stripe.com/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://docs.stripe.com/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued card authorizations](https://docs.stripe.com/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": "#/$defs/issuing_authorization_amount_details" }], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/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": "#/$defs/balance_transaction" }, + "type": "array" + }, + "card": { "$ref": "#/$defs/issuing.card" }, + "cardholder": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/issuing.cardholder" } + ], + "description": "The cardholder to whom this authorization belongs.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/issuing_authorization_fraud_challenge" }, + "nullable": true, + "type": "array" + }, + "fuel": { + "anyOf": [{ "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/issuing_authorization_merchant_data" }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/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": "#/$defs/issuing_authorization_request" }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": ["closed", "expired", "pending", "reversed"], + "type": "string" + }, + "token": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/issuing.token" }], + "description": "[Token](https://docs.stripe.com/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": "#/$defs/issuing.token" }] } + }, + "transactions": { + "description": "List of [transactions](https://docs.stripe.com/api/issuing/transactions) associated with this authorization.", + "items": { "$ref": "#/$defs/issuing.transaction" }, + "type": "array" + }, + "treasury": { + "anyOf": [{ "$ref": "#/$defs/issuing_authorization_treasury" }], + "description": "[Treasury](https://docs.stripe.com/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://docs.stripe.com/api/treasury/financial_accounts).", + "nullable": true + }, + "verification_data": { "$ref": "#/$defs/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", + "amount_details", + "approved", + "authorization_method", + "balance_transactions", + "card", + "cardholder", + "created", + "currency", + "fleet", + "fuel", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "network_data", + "object", + "pending_request", + "request_history", + "status", + "transactions", + "verification_data", + "verified_by_fraud_challenge", + "wallet" + ], + "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", + "x-stripeMostCommon": [ + "amount", + "approved", + "card", + "cardholder", + "currency", + "id", + "metadata", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/authorizations" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/authorizations/{authorization}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/authorizations/{authorization}" + }, + { + "method_name": "approve", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/issuing/authorizations/{authorization}/approve" + }, + { + "method_name": "decline", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/issuing/authorizations/{authorization}/decline" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations" + }, + { + "method_name": "capture", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations/{authorization}/capture" + }, + { + "method_name": "expire", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations/{authorization}/expire" + }, + { + "method_name": "finalize_amount", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount" + }, + { + "method_name": "respond", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond" + }, + { + "method_name": "increment", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations/{authorization}/increment" + }, + { + "method_name": "reverse", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/authorizations/{authorization}/reverse" + } + ], + "x-stripeResource": { + "class_name": "Authorization", + "has_collection_class": true, + "in_package": "Issuing", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://docs.stripe.com/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": "#/$defs/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://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://docs.stripe.com/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" + }, + "latest_fraud_warning": { + "anyOf": [{ "$ref": "#/$defs/issuing_card_fraud_warning" }], + "description": "Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.", + "nullable": true + }, + "lifecycle_controls": { + "anyOf": [{ "$ref": "#/$defs/issuing_card_lifecycle_controls" }], + "description": "Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our [documentation](/issuing/controls/lifecycle-controls) for more details.", + "nullable": true + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://docs.stripe.com/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": "#/$defs/issuing.personalization_design" } + ], + "description": "The personalization design object belonging to this card.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/issuing.personalization_design" }] + } + }, + "replaced_by": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/issuing.card" }], + "description": "The latest card that replaces this card, if any.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/issuing.card" }] } + }, + "replacement_for": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/issuing.card" }], + "description": "The card this card replaces, if any.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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 + }, + "second_line": { + "description": "Text separate from cardholder name, printed on the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping": { + "anyOf": [{ "$ref": "#/$defs/issuing_card_shipping" }], + "description": "Where and how the card will be shipped.", + "nullable": true + }, + "spending_controls": { "$ref": "#/$defs/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": "#/$defs/issuing_card_wallets" }], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay).", + "nullable": true + } + }, + "required": [ + "brand", + "cancellation_reason", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "latest_fraud_warning", + "lifecycle_controls", + "livemode", + "metadata", + "object", + "personalization_design", + "replaced_by", + "replacement_for", + "replacement_reason", + "second_line", + "shipping", + "spending_controls", + "status", + "type", + "wallets" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "latest_fraud_warning", + "lifecycle_controls", + "personalization_design", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card", + "x-stripeMostCommon": [ + "cancellation_reason", + "cardholder", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "metadata", + "status", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/cards" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/cards/{card}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/issuing/cards" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/cards/{card}" + }, + { + "method_name": "deliver_card", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/cards/{card}/shipping/deliver" + }, + { + "method_name": "fail_card", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/cards/{card}/shipping/fail" + }, + { + "method_name": "return_card", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/cards/{card}/shipping/return" + }, + { + "method_name": "ship_card", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/cards/{card}/shipping/ship" + }, + { + "method_name": "submit_card", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/cards/{card}/shipping/submit" + } + ], + "x-stripeResource": { + "class_name": "Card", + "has_collection_class": true, + "in_package": "Issuing" + } + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://docs.stripe.com/issuing) cards.\n\nRelated guide: [How to create a cardholder](https://docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder)", + "properties": { + "billing": { "$ref": "#/$defs/issuing_cardholder_address" }, + "company": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/issuing_cardholder_individual" }], + "description": "Additional information about an `individual` cardholder.", + "nullable": true + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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://docs.stripe.com/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 `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`.\n This changes the language of the [3D Secure flow](https://docs.stripe.com/issuing/3d-secure) and one-time password messages sent to the cardholder.", + "items": { + "enum": ["de", "en", "es", "fr", "it"], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "requirements": { "$ref": "#/$defs/issuing_cardholder_requirements" }, + "spending_controls": { + "anyOf": [{ "$ref": "#/$defs/issuing_cardholder_authorization_controls" }], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://docs.stripe.com/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://docs.stripe.com/issuing/other/choose-cardholder) for more details.", + "enum": ["company", "individual"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "company", + "created", + "email", + "id", + "individual", + "livemode", + "metadata", + "name", + "object", + "phone_number", + "preferred_locales", + "requirements", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder", + "x-stripeMostCommon": ["billing", "email", "id", "metadata", "name", "phone_number"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/cardholders" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/cardholders/{cardholder}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/issuing/cardholders" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/cardholders/{cardholder}" + } + ], + "x-stripeResource": { + "class_name": "Cardholder", + "has_collection_class": true, + "in_package": "Issuing" + } + }, + "issuing.dispute": { + "description": "As a [card issuer](https://docs.stripe.com/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://docs.stripe.com/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "Disputed amount in the card's currency and in the [smallest currency unit](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/issuing_dispute_evidence" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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://docs.stripe.com/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": "#/$defs/issuing.transaction" } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/issuing.transaction" }] } + }, + "treasury": { + "anyOf": [{ "$ref": "#/$defs/issuing_dispute_treasury" }], + "description": "[Treasury](https://docs.stripe.com/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", + "x-stripeMostCommon": [ + "amount", + "balance_transactions", + "currency", + "evidence", + "id", + "metadata", + "status", + "transaction" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/disputes" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/disputes/{dispute}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/issuing/disputes" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/disputes/{dispute}" + }, + { + "method_name": "submit", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/issuing/disputes/{dispute}/submit" + } + ], + "x-stripeResource": { + "class_name": "Dispute", + "has_collection_class": true, + "in_package": "Issuing", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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": "#/$defs/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": "#/$defs/file" }] } + }, + "carrier_text": { + "anyOf": [{ "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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://docs.stripe.com/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": "#/$defs/issuing.physical_bundle" } + ], + "description": "The physical bundle object belonging to this personalization design.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/issuing.physical_bundle" }] } + }, + "preferences": { "$ref": "#/$defs/issuing_personalization_design_preferences" }, + "rejection_reasons": { "$ref": "#/$defs/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": [ + "card_logo", + "carrier_text", + "created", + "id", + "livemode", + "lookup_key", + "metadata", + "name", + "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", + "x-stripeMostCommon": [ + "card_logo", + "carrier_text", + "created", + "id", + "livemode", + "lookup_key", + "metadata", + "name", + "object", + "physical_bundle", + "preferences", + "rejection_reasons", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/personalization_designs" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/personalization_designs/{personalization_design}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/issuing/personalization_designs" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/personalization_designs/{personalization_design}" + }, + { + "method_name": "activate", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate" + }, + { + "method_name": "deactivate", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate" + }, + { + "method_name": "reject", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject" + } + ], + "x-stripeResource": { + "class_name": "PersonalizationDesign", + "has_collection_class": true, + "in_package": "Issuing" + } + }, + "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": "#/$defs/issuing_physical_bundle_features" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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", + "x-stripeMostCommon": ["features", "id", "livemode", "name", "object", "status", "type"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/physical_bundles" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/physical_bundles/{physical_bundle}" + } + ], + "x-stripeResource": { + "class_name": "PhysicalBundle", + "has_collection_class": true, + "in_package": "Issuing" + } + }, + "issuing.token": { + "description": "An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://docs.stripe.com/issuing), you can [view and manage these tokens](https://docs.stripe.com/issuing/controls/token-management) through Stripe.", + "properties": { + "card": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/issuing.card" }], + "description": "Card associated with this token.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "network": { + "description": "The token service provider / card network associated with the token.", + "enum": ["mastercard", "visa"], + "type": "string" + }, + "network_data": { "$ref": "#/$defs/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", + "device_fingerprint", + "id", + "livemode", + "network", + "network_updated_at", + "object", + "status" + ], + "title": "IssuingNetworkToken", + "type": "object", + "x-expandableFields": ["card", "network_data"], + "x-resourceId": "issuing.token", + "x-stripeMostCommon": [ + "card", + "created", + "device_fingerprint", + "id", + "last4", + "livemode", + "network", + "network_data", + "network_updated_at", + "object", + "status", + "wallet_provider" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/tokens" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/tokens/{token}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/tokens/{token}" + } + ], + "x-stripeResource": { + "class_name": "Token", + "has_collection_class": true, + "in_package": "Issuing" + } + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_amount_details" }], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).", + "nullable": true + }, + "authorization": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/issuing.authorization" } + ], + "description": "The `Authorization` object that led to this transaction.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/issuing.authorization" }] } + }, + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/balance_transaction" } + ], + "description": "ID of the [balance transaction](https://docs.stripe.com/api/balance_transactions) associated with this transaction.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/balance_transaction" }] } + }, + "card": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/issuing.card" }], + "description": "The card used to make this transaction.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/issuing.card" }] } + }, + "cardholder": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/issuing.cardholder" } + ], + "description": "The cardholder to whom this transaction belongs.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/issuing.dispute" }], + "description": "If you've disputed the transaction, the ID of the dispute.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/issuing.dispute" }] } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://docs.stripe.com/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": "#/$defs/issuing_authorization_merchant_data" }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/issuing_transaction_purchase_details" }], + "description": "Additional purchase information that is optionally provided by the merchant.", + "nullable": true + }, + "token": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/issuing.token" }], + "description": "[Token](https://docs.stripe.com/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": "#/$defs/issuing.token" }] } + }, + "treasury": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_treasury" }], + "description": "[Treasury](https://docs.stripe.com/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", + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "created", + "currency", + "dispute", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "network_data", + "object", + "type", + "wallet" + ], + "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", + "x-stripeMostCommon": [ + "amount", + "authorization", + "card", + "cardholder", + "currency", + "id", + "metadata", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/issuing/transactions" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/issuing/transactions/{transaction}" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/issuing/transactions/{transaction}" + }, + { + "method_name": "refund", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/transactions/{transaction}/refund" + }, + { + "method_name": "create_force_capture", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/transactions/create_force_capture" + }, + { + "method_name": "create_unlinked_refund", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/issuing/transactions/create_unlinked_refund" + } + ], + "x-stripeResource": { + "class_name": "Transaction", + "has_collection_class": true, + "in_package": "Issuing", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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" + } + }, + "required": ["atm_fee", "cashback_amount"], + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["atm_fee", "cashback_amount"] + }, + "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": [], + "x-stripeMostCommon": ["claimed_by", "type"] + }, + "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" + } + }, + "required": [ + "alphanumeric_id", + "driver_id", + "odometer", + "unspecified_id", + "user_id", + "vehicle_number" + ], + "title": "IssuingAuthorizationFleetCardholderPromptData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "alphanumeric_id", + "driver_id", + "odometer", + "unspecified_id", + "user_id", + "vehicle_number" + ] + }, + "issuing_authorization_fleet_data": { + "description": "", + "properties": { + "cardholder_prompt_data": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": ["cardholder_prompt_data", "purchase_type", "reported_breakdown", "service_type"], + "title": "IssuingAuthorizationFleetData", + "type": "object", + "x-expandableFields": ["cardholder_prompt_data", "reported_breakdown"], + "x-stripeMostCommon": [ + "cardholder_prompt_data", + "purchase_type", + "reported_breakdown", + "service_type" + ] + }, + "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" + } + }, + "required": ["gross_amount_decimal"], + "title": "IssuingAuthorizationFleetFuelPriceData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["gross_amount_decimal"] + }, + "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" + } + }, + "required": ["gross_amount_decimal"], + "title": "IssuingAuthorizationFleetNonFuelPriceData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["gross_amount_decimal"] + }, + "issuing_authorization_fleet_reported_breakdown": { + "description": "", + "properties": { + "fuel": { + "anyOf": [{ "$ref": "#/$defs/issuing_authorization_fleet_fuel_price_data" }], + "description": "Breakdown of fuel portion of the purchase.", + "nullable": true + }, + "non_fuel": { + "anyOf": [{ "$ref": "#/$defs/issuing_authorization_fleet_non_fuel_price_data" }], + "description": "Breakdown of non-fuel portion of the purchase.", + "nullable": true + }, + "tax": { + "anyOf": [{ "$ref": "#/$defs/issuing_authorization_fleet_tax_data" }], + "description": "Information about tax included in this transaction.", + "nullable": true + } + }, + "required": ["fuel", "non_fuel", "tax"], + "title": "IssuingAuthorizationFleetReportedBreakdown", + "type": "object", + "x-expandableFields": ["fuel", "non_fuel", "tax"], + "x-stripeMostCommon": ["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" + } + }, + "required": ["local_amount_decimal", "national_amount_decimal"], + "title": "IssuingAuthorizationFleetTaxData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["local_amount_decimal", "national_amount_decimal"] + }, + "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", "undeliverable_reason"], + "title": "IssuingAuthorizationFraudChallenge", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["channel", "status", "undeliverable_reason"] + }, + "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" + } + }, + "required": [ + "industry_product_code", + "quantity_decimal", + "type", + "unit", + "unit_cost_decimal" + ], + "title": "IssuingAuthorizationFuelData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "industry_product_code", + "quantity_decimal", + "type", + "unit", + "unit_cost_decimal" + ] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/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", + "city", + "country", + "name", + "network_id", + "postal_code", + "state", + "tax_id", + "terminal_id", + "url" + ], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "category", + "category_code", + "city", + "country", + "name", + "network_id", + "postal_code", + "state", + "tax_id", + "terminal_id", + "url" + ] + }, + "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" + } + }, + "required": ["acquiring_institution_id", "system_trace_audit_number", "transaction_id"], + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "acquiring_institution_id", + "system_trace_audit_number", + "transaction_id" + ] + }, + "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://docs.stripe.com/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [{ "$ref": "#/$defs/issuing_authorization_amount_details" }], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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", + "amount_details", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency", + "network_risk_score" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": ["amount_details"], + "x-stripeMostCommon": [ + "amount", + "amount_details", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency", + "network_risk_score" + ] + }, + "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://docs.stripe.com/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": "#/$defs/issuing_authorization_amount_details" }], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/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://docs.stripe.com/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", + "network_fallback", + "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", + "amount_details", + "approved", + "authorization_code", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "network_risk_score", + "reason", + "reason_message", + "requested_at" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": ["amount_details"], + "x-stripeMostCommon": [ + "amount", + "amount_details", + "approved", + "authorization_code", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "network_risk_score", + "reason", + "reason_message", + "requested_at" + ] + }, + "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": [], + "x-stripeMostCommon": ["result"] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://docs.stripe.com/api/treasury/received_credits) associated with this authorization", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://docs.stripe.com/api/treasury/received_debits) associated with this authorization", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://docs.stripe.com/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["received_credits", "received_debits", "transaction"], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["received_credits", "received_debits", "transaction"] + }, + "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": "#/$defs/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": "#/$defs/issuing_authorization_three_d_secure" }], + "description": "3D Secure details.", + "nullable": true + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "authentication_exemption", + "cvc_check", + "expiry_check", + "postal_code", + "three_d_secure" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": ["authentication_exemption", "three_d_secure"], + "x-stripeMostCommon": [ + "address_line1_check", + "address_postal_code_check", + "authentication_exemption", + "cvc_check", + "expiry_check", + "postal_code", + "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", "ineligible_reason"], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["eligible", "ineligible_reason"] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/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" + } + }, + "required": [ + "allowed_categories", + "allowed_merchant_countries", + "blocked_categories", + "blocked_merchant_countries", + "spending_limits", + "spending_limits_currency" + ], + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": ["spending_limits"], + "x-stripeMostCommon": [ + "allowed_categories", + "allowed_merchant_countries", + "blocked_categories", + "blocked_merchant_countries", + "spending_limits", + "spending_limits_currency" + ] + }, + "issuing_card_fraud_warning": { + "description": "", + "properties": { + "started_at": { + "description": "Timestamp of the most recent fraud warning.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "type": { + "description": "The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card.", + "enum": [ + "card_testing_exposure", + "fraud_dispute_filed", + "third_party_reported", + "user_indicated_fraud" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["started_at", "type"], + "title": "IssuingCardFraudWarning", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["started_at", "type"] + }, + "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", "ineligible_reason"], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["eligible", "ineligible_reason"] + }, + "issuing_card_lifecycle_conditions": { + "description": "", + "properties": { + "payment_count": { + "description": "The card is automatically cancelled when it makes this number of non-zero payment authorizations and transactions. The count includes penny authorizations, but doesn't include non-payment actions, such as authorization advice.", + "type": "integer" + } + }, + "required": ["payment_count"], + "title": "IssuingCardLifecycleConditions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["payment_count"] + }, + "issuing_card_lifecycle_controls": { + "description": "", + "properties": { "cancel_after": { "$ref": "#/$defs/issuing_card_lifecycle_conditions" } }, + "required": ["cancel_after"], + "title": "IssuingCardLifecycleControls", + "type": "object", + "x-expandableFields": ["cancel_after"], + "x-stripeMostCommon": ["cancel_after"] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { "$ref": "#/$defs/address" }, + "address_validation": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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", + "address_validation", + "carrier", + "customs", + "eta", + "name", + "phone_number", + "require_signature", + "service", + "status", + "tracking_number", + "tracking_url", + "type" + ], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": ["address", "address_validation", "customs"], + "x-stripeMostCommon": [ + "address", + "address_validation", + "carrier", + "customs", + "eta", + "name", + "phone_number", + "require_signature", + "service", + "status", + "tracking_number", + "tracking_url", + "type" + ] + }, + "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": "#/$defs/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", "normalized_address", "result"], + "title": "IssuingCardShippingAddressValidation", + "type": "object", + "x-expandableFields": ["normalized_address"], + "x-stripeMostCommon": ["mode", "normalized_address", "result"] + }, + "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" + } + }, + "required": ["eori_number"], + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["eori_number"] + }, + "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://docs.stripe.com/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://docs.stripe.com/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", "categories", "interval"], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "categories", "interval"] + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { "$ref": "#/$defs/issuing_card_apple_pay" }, + "google_pay": { "$ref": "#/$defs/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", "primary_account_identifier"], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": ["apple_pay", "google_pay"], + "x-stripeMostCommon": ["apple_pay", "google_pay", "primary_account_identifier"] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { "address": { "$ref": "#/$defs/address" } }, + "required": ["address"], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": ["address"], + "x-stripeMostCommon": ["address"] + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/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" + } + }, + "required": [ + "allowed_categories", + "allowed_merchant_countries", + "blocked_categories", + "blocked_merchant_countries", + "spending_limits", + "spending_limits_currency" + ], + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": ["spending_limits"], + "x-stripeMostCommon": [ + "allowed_categories", + "allowed_merchant_countries", + "blocked_categories", + "blocked_merchant_countries", + "spending_limits", + "spending_limits_currency" + ] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [{ "$ref": "#/$defs/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 + } + }, + "required": ["user_terms_acceptance"], + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": ["user_terms_acceptance"], + "x-stripeMostCommon": ["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": [], + "x-stripeMostCommon": ["tax_id_provided"] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/file" }], + "description": "The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/file" }] } + }, + "front": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/file" }], + "description": "The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/file" }] } + } + }, + "required": ["back", "front"], + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": ["back", "front"], + "x-stripeMostCommon": ["back", "front"] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [{ "$ref": "#/$defs/issuing_cardholder_card_issuing" }], + "description": "Information related to the card_issuing program for this cardholder.", + "nullable": true + }, + "dob": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/issuing_cardholder_verification" }], + "description": "Government-issued ID document for this cardholder.", + "nullable": true + } + }, + "required": ["dob", "first_name", "last_name", "verification"], + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": ["card_issuing", "dob", "verification"], + "x-stripeMostCommon": ["card_issuing", "dob", "first_name", "last_name", "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" + } + }, + "required": ["day", "month", "year"], + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["day", "month", "year"] + }, + "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" + } + }, + "required": ["disabled_reason", "past_due"], + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["disabled_reason", "past_due"] + }, + "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://docs.stripe.com/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://docs.stripe.com/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", "categories", "interval"], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "categories", "interval"] + }, + "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" + } + }, + "required": ["date", "ip", "user_agent"], + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [{ "$ref": "#/$defs/issuing_cardholder_id_document" }], + "description": "An identifying document, either a passport or local ID card.", + "nullable": true + } + }, + "required": ["document"], + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": ["document"], + "x-stripeMostCommon": ["document"] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "additional_documentation", + "canceled_at", + "cancellation_policy_provided", + "cancellation_reason", + "expected_at", + "explanation", + "product_description", + "product_type", + "return_status", + "returned_at" + ], + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": [ + "additional_documentation", + "canceled_at", + "cancellation_policy_provided", + "cancellation_reason", + "expected_at", + "explanation", + "product_description", + "product_type", + "return_status", + "returned_at" + ] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/file" }] } + }, + "card_statement": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/file" }] } + }, + "cash_receipt": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/file" }] } + }, + "check_image": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image", + "explanation", + "original_transaction" + ], + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ], + "x-stripeMostCommon": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image", + "explanation", + "original_transaction" + ] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { "$ref": "#/$defs/issuing_dispute_canceled_evidence" }, + "duplicate": { "$ref": "#/$defs/issuing_dispute_duplicate_evidence" }, + "fraudulent": { "$ref": "#/$defs/issuing_dispute_fraudulent_evidence" }, + "merchandise_not_as_described": { + "$ref": "#/$defs/issuing_dispute_merchandise_not_as_described_evidence" + }, + "no_valid_authorization": { + "$ref": "#/$defs/issuing_dispute_no_valid_authorization_evidence" + }, + "not_received": { "$ref": "#/$defs/issuing_dispute_not_received_evidence" }, + "other": { "$ref": "#/$defs/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": "#/$defs/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" + ], + "x-stripeMostCommon": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "reason", + "service_not_as_described" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/file" }] } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["additional_documentation", "explanation"], + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": ["additional_documentation", "explanation"] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "additional_documentation", + "explanation", + "received_at", + "return_description", + "return_status", + "returned_at" + ], + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": [ + "additional_documentation", + "explanation", + "received_at", + "return_description", + "return_status", + "returned_at" + ] + }, + "issuing_dispute_no_valid_authorization_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/file" }] } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["additional_documentation", "explanation"], + "title": "IssuingDisputeNoValidAuthorizationEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": ["additional_documentation", "explanation"] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "additional_documentation", + "expected_at", + "explanation", + "product_description", + "product_type" + ], + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": [ + "additional_documentation", + "expected_at", + "explanation", + "product_description", + "product_type" + ] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "additional_documentation", + "explanation", + "product_description", + "product_type" + ], + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": [ + "additional_documentation", + "explanation", + "product_description", + "product_type" + ] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "additional_documentation", + "canceled_at", + "cancellation_reason", + "explanation", + "received_at" + ], + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"], + "x-stripeMostCommon": [ + "additional_documentation", + "canceled_at", + "cancellation_reason", + "explanation", + "received_at" + ] + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://docs.stripe.com/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://docs.stripe.com/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["debit_reversal", "received_debit"], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["debit_reversal", "received_debit"] + }, + "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": [], + "x-stripeMostCommon": ["line1", "postal_code"] + }, + "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": [], + "x-stripeMostCommon": [ + "device_fingerprint", + "ip_address", + "location", + "name", + "phone_number", + "type" + ] + }, + "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": [], + "x-stripeMostCommon": [ + "card_reference_id", + "token_reference_id", + "token_requestor_id", + "token_requestor_name" + ] + }, + "issuing_network_token_network_data": { + "description": "", + "properties": { + "device": { "$ref": "#/$defs/issuing_network_token_device" }, + "mastercard": { "$ref": "#/$defs/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": "#/$defs/issuing_network_token_visa" }, + "wallet_provider": { "$ref": "#/$defs/issuing_network_token_wallet_provider" } + }, + "required": ["type"], + "title": "IssuingNetworkTokenNetworkData", + "type": "object", + "x-expandableFields": ["device", "mastercard", "visa", "wallet_provider"], + "x-stripeMostCommon": ["device", "mastercard", "type", "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, + "nullable": true, + "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": [], + "x-stripeMostCommon": [ + "card_reference_id", + "token_reference_id", + "token_requestor_id", + "token_risk_score" + ] + }, + "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": "#/$defs/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"], + "x-stripeMostCommon": [ + "account_id", + "account_trust_score", + "card_number_source", + "cardholder_address", + "cardholder_name", + "device_trust_score", + "hashed_account_email_address", + "reason_codes", + "suggested_decision", + "suggested_decision_version" + ] + }, + "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" + } + }, + "required": ["footer_body", "footer_title", "header_body", "header_title"], + "title": "IssuingPersonalizationDesignCarrierText", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["footer_body", "footer_title", "header_body", "header_title"] + }, + "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", "is_platform_default"], + "title": "IssuingPersonalizationDesignPreferences", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["is_default", "is_platform_default"] + }, + "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" + } + }, + "required": ["card_logo", "carrier_text"], + "title": "IssuingPersonalizationDesignRejectionReasons", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["card_logo", "carrier_text"] + }, + "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": [], + "x-stripeMostCommon": ["card_logo", "carrier_text", "second_line"] + }, + "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" + } + }, + "required": ["atm_fee", "cashback_amount"], + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["atm_fee", "cashback_amount"] + }, + "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" + } + }, + "required": ["driver_id", "odometer", "unspecified_id", "user_id", "vehicle_number"], + "title": "IssuingTransactionFleetCardholderPromptData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["driver_id", "odometer", "unspecified_id", "user_id", "vehicle_number"] + }, + "issuing_transaction_fleet_data": { + "description": "", + "properties": { + "cardholder_prompt_data": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": ["cardholder_prompt_data", "purchase_type", "reported_breakdown", "service_type"], + "title": "IssuingTransactionFleetData", + "type": "object", + "x-expandableFields": ["cardholder_prompt_data", "reported_breakdown"], + "x-stripeMostCommon": [ + "cardholder_prompt_data", + "purchase_type", + "reported_breakdown", + "service_type" + ] + }, + "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" + } + }, + "required": ["gross_amount_decimal"], + "title": "IssuingTransactionFleetFuelPriceData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["gross_amount_decimal"] + }, + "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" + } + }, + "required": ["gross_amount_decimal"], + "title": "IssuingTransactionFleetNonFuelPriceData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["gross_amount_decimal"] + }, + "issuing_transaction_fleet_reported_breakdown": { + "description": "", + "properties": { + "fuel": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_fleet_fuel_price_data" }], + "description": "Breakdown of fuel portion of the purchase.", + "nullable": true + }, + "non_fuel": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_fleet_non_fuel_price_data" }], + "description": "Breakdown of non-fuel portion of the purchase.", + "nullable": true + }, + "tax": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_fleet_tax_data" }], + "description": "Information about tax included in this transaction.", + "nullable": true + } + }, + "required": ["fuel", "non_fuel", "tax"], + "title": "IssuingTransactionFleetReportedBreakdown", + "type": "object", + "x-expandableFields": ["fuel", "non_fuel", "tax"], + "x-stripeMostCommon": ["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" + } + }, + "required": ["local_amount_decimal", "national_amount_decimal"], + "title": "IssuingTransactionFleetTaxData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["local_amount_decimal", "national_amount_decimal"] + }, + "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": "#/$defs/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" + } + }, + "required": ["departure_at", "passenger_name", "refundable", "segments", "travel_agency"], + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": ["segments"], + "x-stripeMostCommon": [ + "departure_at", + "passenger_name", + "refundable", + "segments", + "travel_agency" + ] + }, + "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" + } + }, + "required": [ + "arrival_airport_code", + "carrier", + "departure_airport_code", + "flight_number", + "service_class", + "stopover_allowed" + ], + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "arrival_airport_code", + "carrier", + "departure_airport_code", + "flight_number", + "service_class", + "stopover_allowed" + ] + }, + "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": [ + "industry_product_code", + "quantity_decimal", + "type", + "unit", + "unit_cost_decimal" + ], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "industry_product_code", + "quantity_decimal", + "type", + "unit", + "unit_cost_decimal" + ] + }, + "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" + } + }, + "required": ["check_in_at", "nights"], + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["check_in_at", "nights"] + }, + "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" + } + }, + "required": ["authorization_code", "processing_date", "transaction_id"], + "title": "IssuingTransactionNetworkData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["authorization_code", "processing_date", "transaction_id"] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "fleet": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_fleet_data" }], + "description": "Fleet-specific information for transactions using Fleet cards.", + "nullable": true + }, + "flight": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_flight_data" }], + "description": "Information about the flight that was purchased with this transaction.", + "nullable": true + }, + "fuel": { + "anyOf": [{ "$ref": "#/$defs/issuing_transaction_fuel_data" }], + "description": "Information about fuel that was purchased with this transaction.", + "nullable": true + }, + "lodging": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/issuing_transaction_receipt_data" }, + "nullable": true, + "type": "array" + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["fleet", "flight", "fuel", "lodging", "receipt", "reference"], + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": ["fleet", "flight", "fuel", "lodging", "receipt"], + "x-stripeMostCommon": ["fleet", "flight", "fuel", "lodging", "receipt", "reference"] + }, + "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" + } + }, + "required": ["description", "quantity", "total", "unit_cost"], + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["description", "quantity", "total", "unit_cost"] + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://docs.stripe.com/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://docs.stripe.com/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["received_credit", "received_debit"], + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["received_credit", "received_debit"] + }, + "klarna_address": { + "description": "", + "properties": { + "country": { + "description": "The payer address country", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["country"], + "title": "klarna_address", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["country"] + }, + "klarna_payer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [{ "$ref": "#/$defs/klarna_address" }], + "description": "The payer's address", + "nullable": true + } + }, + "required": ["address"], + "title": "klarna_payer_details", + "type": "object", + "x-expandableFields": ["address"], + "x-stripeMostCommon": ["address"] + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { "$ref": "#/$defs/address" }, + "address_kana": { + "anyOf": [{ "$ref": "#/$defs/legal_entity_japan_address" }], + "description": "The Kana variation of the company's primary address (Japan only).", + "nullable": true + }, + "address_kanji": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/api/accounts/update#update_account-company-directors_provided).", + "type": "boolean" + }, + "directorship_declaration": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "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://docs.stripe.com/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": "#/$defs/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": { + "description": "This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.", + "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" + }, + "registration_date": { "$ref": "#/$defs/legal_entity_registration_date" }, + "representative_declaration": { + "anyOf": [{ "$ref": "#/$defs/legal_entity_representative_declaration" }], + "description": "This hash is used to attest that the representative is authorized to act as the representative of their legal entity.", + "nullable": true + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://docs.stripe.com/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": "#/$defs/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", + "registration_date", + "representative_declaration", + "verification" + ], + "x-stripeMostCommon": [ + "address", + "address_kana", + "address_kanji", + "directors_provided", + "directorship_declaration", + "executives_provided", + "export_license_id", + "export_purpose_code", + "name", + "name_kana", + "name_kanji", + "owners_provided", + "ownership_declaration", + "ownership_exemption_reason", + "phone", + "registration_date", + "structure", + "tax_id_provided", + "tax_id_registrar", + "vat_id_provided", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { "$ref": "#/$defs/legal_entity_company_verification_document" } + }, + "required": ["document"], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": ["document"], + "x-stripeMostCommon": ["document"] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/file" }], + "description": "The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file).", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/file" }], + "description": "The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](/file-upload#uploading-a-file).", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/file" }] } + } + }, + "required": ["back", "details", "details_code", "front"], + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": ["back", "front"], + "x-stripeMostCommon": ["back", "details", "details_code", "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" + } + }, + "required": ["date", "ip", "user_agent"], + "title": "LegalEntityDirectorshipDeclaration", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "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" + } + }, + "required": ["day", "month", "year"], + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["day", "month", "year"] + }, + "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" + } + }, + "required": ["city", "country", "line1", "line2", "postal_code", "state", "town"], + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["city", "country", "line1", "line2", "postal_code", "state", "town"] + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/legal_entity_person_verification_document" }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Please refer [guide](https://docs.stripe.com/connect/handling-api-verification) to handle verification updates.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["status"], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": ["additional_document", "document"], + "x-stripeMostCommon": ["additional_document", "details", "details_code", "document", "status"] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/file" }], + "description": "The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/file" }], + "description": "The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/file" }] } + } + }, + "required": ["back", "details", "details_code", "front"], + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": ["back", "front"], + "x-stripeMostCommon": ["back", "details", "details_code", "front"] + }, + "legal_entity_registration_date": { + "description": "", + "properties": { + "day": { + "description": "The day of registration, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of registration, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of registration.", + "nullable": true, + "type": "integer" + } + }, + "required": ["day", "month", "year"], + "title": "LegalEntityRegistrationDate", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["day", "month", "year"] + }, + "legal_entity_representative_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the representative declaration attestation was made.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the representative declaration attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user-agent string from the browser where the representative declaration attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["date", "ip", "user_agent"], + "title": "LegalEntityRepresentativeDeclaration", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "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" + } + }, + "required": ["date", "ip", "user_agent"], + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "level3": { + "description": "", + "properties": { + "customer_reference": { "maxLength": 5000, "type": "string" }, + "line_items": { "items": { "$ref": "#/$defs/level3_line_items" }, "type": "array" }, + "merchant_reference": { "maxLength": 5000, "type": "string" }, + "shipping_address_zip": { "maxLength": 5000, "type": "string" }, + "shipping_amount": { "type": "integer" }, + "shipping_from_zip": { "maxLength": 5000, "type": "string" } + }, + "required": ["line_items", "merchant_reference"], + "title": "Level3", + "type": "object", + "x-expandableFields": ["line_items"], + "x-stripeMostCommon": [ + "customer_reference", + "line_items", + "merchant_reference", + "shipping_address_zip", + "shipping_amount", + "shipping_from_zip" + ] + }, + "level3_line_items": { + "description": "", + "properties": { + "discount_amount": { "nullable": true, "type": "integer" }, + "product_code": { "maxLength": 5000, "type": "string" }, + "product_description": { "maxLength": 5000, "type": "string" }, + "quantity": { "nullable": true, "type": "integer" }, + "tax_amount": { "nullable": true, "type": "integer" }, + "unit_cost": { "nullable": true, "type": "integer" } + }, + "required": [ + "discount_amount", + "product_code", + "product_description", + "quantity", + "tax_amount", + "unit_cost" + ], + "title": "Level3LineItems", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "discount_amount", + "product_code", + "product_description", + "quantity", + "tax_amount", + "unit_cost" + ] + }, + "line_item": { + "description": "Invoice Line Items represent the individual lines within an [invoice](https://docs.stripe.com/api/invoices) and only exist within the context of an invoice.\n\nEach line item is backed by either an [invoice item](https://docs.stripe.com/api/invoiceitems) or a [subscription item](https://docs.stripe.com/api/subscription_items).", + "properties": { + "amount": { + "description": "The amount, 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" + }, + "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": "#/$defs/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": "#/$defs/discount" }], + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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" + }, + "parent": { + "anyOf": [ + { + "$ref": "#/$defs/billing_bill_resource_invoicing_lines_parents_invoice_line_item_parent" + } + ], + "description": "The parent that generated this line item.", + "nullable": true + }, + "period": { "$ref": "#/$defs/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": "#/$defs/invoices_resource_pretax_credit_amount" }, + "nullable": true, + "type": "array" + }, + "pricing": { + "anyOf": [{ "$ref": "#/$defs/billing_bill_resource_invoicing_pricing_pricing" }], + "description": "The pricing information of the line item.", + "nullable": true + }, + "quantity": { + "description": "Quantity of units for the invoice line item in integer format, with any decimal precision truncated. For the line item's full-precision decimal quantity, use `quantity_decimal`. This field will be deprecated in favor of `quantity_decimal` in a future version. If the line item is a proration or subscription, the quantity of the subscription that the proration was computed for.", + "nullable": true, + "type": "integer" + }, + "quantity_decimal": { + "description": "Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "subscription": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/subscription" }], + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/subscription" }] } + }, + "subtotal": { + "description": "The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes.", + "type": "integer" + }, + "taxes": { + "description": "The tax information of the line item.", + "items": { "$ref": "#/$defs/billing_bill_resource_invoicing_taxes_tax" }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "amount", + "currency", + "description", + "discount_amounts", + "discountable", + "discounts", + "id", + "invoice", + "livemode", + "metadata", + "object", + "parent", + "period", + "pretax_credit_amounts", + "pricing", + "quantity", + "quantity_decimal", + "subscription", + "subtotal", + "taxes" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "parent", + "period", + "pretax_credit_amounts", + "pricing", + "subscription", + "taxes" + ], + "x-resourceId": "line_item", + "x-stripeMostCommon": [ + "amount", + "currency", + "description", + "id", + "invoice", + "metadata", + "parent", + "period", + "pricing", + "quantity_decimal" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/invoices/{invoice}/lines" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/invoices/{invoice}/lines" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/invoices/{invoice}/lines/{line_item_id}" + } + ], + "x-stripeResource": { + "class_name": "InvoiceLineItem", + "has_collection_class": true, + "in_package": "" + } + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { "description": "Amount of tax applied for this rate.", "type": "integer" }, + "rate": { "$ref": "#/$defs/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", "taxability_reason", "taxable_amount"], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": ["rate"], + "x-stripeMostCommon": ["amount", "rate", "taxability_reason", "taxable_amount"] + }, + "linked_account_options_common": { + "description": "", + "properties": { + "filters": { + "$ref": "#/$defs/payment_flows_private_payment_methods_financial_connections_common_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" + } + }, + "required": ["prefetch"], + "title": "linked_account_options_common", + "type": "object", + "x-expandableFields": ["filters"], + "x-stripeMostCommon": ["filters", "permissions", "prefetch", "return_url"] + }, + "mandate": { + "description": "A Mandate is a record of the permission that your customer gives you to debit their payment method.", + "properties": { + "customer_acceptance": { "$ref": "#/$defs/customer_acceptance" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "multi_use": { "$ref": "#/$defs/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": "#/$defs/payment_method" }], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "payment_method_details": { "$ref": "#/$defs/mandate_payment_method_details" }, + "single_use": { "$ref": "#/$defs/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", + "x-stripeMostCommon": [ + "customer_acceptance", + "id", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/mandates/{mandate}" + } + ], + "x-stripeResource": { "class_name": "Mandate", "in_package": "" } + }, + "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": ["interval_description", "payment_schedule", "transaction_type"], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "default_for", + "interval_description", + "payment_schedule", + "transaction_type" + ], + "x-stripeResource": { "class_name": "AcssDebit", "in_package": "" } + }, + "mandate_amazon_pay": { + "description": "", + "properties": {}, + "title": "mandate_amazon_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "AmazonPay", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["url"] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "display_name": { + "description": "The display name for the account on this mandate.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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" + }, + "service_user_number": { + "description": "The service user number for the account on this mandate.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "display_name", + "network_status", + "reference", + "revocation_reason", + "service_user_number", + "url" + ], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "display_name", + "network_status", + "reference", + "revocation_reason", + "service_user_number", + "url" + ] + }, + "mandate_cashapp": { + "description": "", + "properties": {}, + "title": "mandate_cashapp", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "Cashapp", "in_package": "" } + }, + "mandate_kakao_pay": { + "description": "", + "properties": {}, + "title": "mandate_kakao_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "KakaoPay", "in_package": "" } + }, + "mandate_klarna": { + "description": "", + "properties": {}, + "title": "mandate_klarna", + "type": "object", + "x-expandableFields": [] + }, + "mandate_kr_card": { + "description": "", + "properties": {}, + "title": "mandate_kr_card", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "KrCard", "in_package": "" } + }, + "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_naver_pay": { + "description": "", + "properties": {}, + "title": "mandate_naver_pay", + "type": "object", + "x-expandableFields": [] + }, + "mandate_nz_bank_account": { + "description": "", + "properties": {}, + "title": "mandate_nz_bank_account", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "NzBankAccount", "in_package": "" } + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { "$ref": "#/$defs/mandate_acss_debit" }, + "amazon_pay": { "$ref": "#/$defs/mandate_amazon_pay" }, + "au_becs_debit": { "$ref": "#/$defs/mandate_au_becs_debit" }, + "bacs_debit": { "$ref": "#/$defs/mandate_bacs_debit" }, + "card": { "$ref": "#/$defs/card_mandate_payment_method_details" }, + "cashapp": { "$ref": "#/$defs/mandate_cashapp" }, + "kakao_pay": { "$ref": "#/$defs/mandate_kakao_pay" }, + "klarna": { "$ref": "#/$defs/mandate_klarna" }, + "kr_card": { "$ref": "#/$defs/mandate_kr_card" }, + "link": { "$ref": "#/$defs/mandate_link" }, + "naver_pay": { "$ref": "#/$defs/mandate_naver_pay" }, + "nz_bank_account": { "$ref": "#/$defs/mandate_nz_bank_account" }, + "paypal": { "$ref": "#/$defs/mandate_paypal" }, + "payto": { "$ref": "#/$defs/mandate_payto" }, + "revolut_pay": { "$ref": "#/$defs/mandate_revolut_pay" }, + "sepa_debit": { "$ref": "#/$defs/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" + }, + "upi": { "$ref": "#/$defs/mandate_upi" }, + "us_bank_account": { "$ref": "#/$defs/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", + "klarna", + "kr_card", + "link", + "naver_pay", + "nz_bank_account", + "paypal", + "payto", + "revolut_pay", + "sepa_debit", + "upi", + "us_bank_account" + ], + "x-stripeMostCommon": [ + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "card", + "cashapp", + "kakao_pay", + "klarna", + "kr_card", + "link", + "naver_pay", + "nz_bank_account", + "paypal", + "payto", + "revolut_pay", + "sepa_debit", + "type", + "upi", + "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" + } + }, + "required": ["billing_agreement_id", "payer_id"], + "title": "mandate_paypal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["billing_agreement_id", "payer_id"] + }, + "mandate_payto": { + "description": "", + "properties": { + "amount": { + "description": "Amount that will be collected. It is required when `amount_type` is `fixed`.", + "nullable": true, + "type": "integer" + }, + "amount_type": { + "description": "The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.", + "enum": ["fixed", "maximum"], + "type": "string" + }, + "end_date": { + "description": "Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "The periodicity at which payments will be collected. Defaults to `adhoc`.", + "enum": [ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly" + ], + "type": "string" + }, + "payments_per_period": { + "description": "The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.", + "nullable": true, + "type": "integer" + }, + "purpose": { + "description": "The purpose for which payments are made. Has a default value based on your merchant category code.", + "enum": [ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility" + ], + "nullable": true, + "type": "string" + }, + "start_date": { + "description": "Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_type", + "end_date", + "payment_schedule", + "payments_per_period", + "purpose", + "start_date" + ], + "title": "mandate_payto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "amount", + "amount_type", + "end_date", + "payment_schedule", + "payments_per_period", + "purpose", + "start_date" + ], + "x-stripeResource": { "class_name": "Payto", "in_package": "" } + }, + "mandate_revolut_pay": { + "description": "", + "properties": {}, + "title": "mandate_revolut_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "RevolutPay", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["reference", "url"], + "x-stripeResource": { "class_name": "SepaDebit", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["amount", "currency"] + }, + "mandate_upi": { + "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": 20, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "End date of the mandate or subscription.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": ["amount", "amount_type", "description", "end_date"], + "title": "mandate_upi", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "amount_type", "description", "end_date"], + "x-stripeResource": { "class_name": "UPI", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["collection_method"], + "x-stripeResource": { "class_name": "UsBankAccount", "in_package": "" } + }, + "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", "preferred"], + "title": "networks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["available", "preferred"] + }, + "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" + } + }, + "required": ["ip_address", "user_agent"], + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["ip_address", "user_agent"] + }, + "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": [], + "x-stripeMostCommon": ["height", "length", "weight", "width"] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "discount_amount": { + "description": "The total discount applied on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.\n\nThis field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field.", + "type": "integer" + }, + "error": { "$ref": "#/$defs/payment_flows_amount_details_resource_error" }, + "line_items": { + "description": "A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 200 line items.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { "$ref": "#/$defs/payment_intent_amount_details_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": "PaymentFlowsAmountDetailsResourceLineItemsList", + "type": "object", + "x-expandableFields": ["data"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "shipping": { "$ref": "#/$defs/payment_flows_amount_details_resource_shipping" }, + "tax": { "$ref": "#/$defs/payment_flows_amount_details_resource_tax" }, + "tip": { "$ref": "#/$defs/payment_flows_amount_details_client_resource_tip" } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": ["error", "line_items", "shipping", "tax", "tip"], + "x-stripeMostCommon": ["discount_amount", "error", "line_items", "shipping", "tax", "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": [], + "x-stripeMostCommon": ["amount"] + }, + "payment_flows_amount_details_resource_error": { + "description": "", + "properties": { + "code": { + "description": "The code of the error that occurred when validating the current amount details.", + "enum": [ + "amount_details_amount_mismatch", + "amount_details_tax_shipping_discount_greater_than_amount" + ], + "nullable": true, + "type": "string" + }, + "message": { + "description": "A message providing more details about the error.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["code", "message"], + "title": "PaymentFlowsAmountDetailsResourceError", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["code", "message"] + }, + "payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_payment_method_options": { + "description": "", + "properties": { + "card": { + "$ref": "#/$defs/payment_flows_private_payment_methods_card_payment_intent_amount_details_line_item_payment_method_options" + }, + "card_present": { + "$ref": "#/$defs/payment_flows_private_payment_methods_card_present_amount_details_line_item_payment_method_options" + }, + "klarna": { + "$ref": "#/$defs/payment_flows_private_payment_methods_klarna_payment_intent_amount_details_line_item_payment_method_options" + }, + "paypal": { + "$ref": "#/$defs/payment_flows_private_payment_methods_paypal_amount_details_line_item_payment_method_options" + } + }, + "title": "PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": ["card", "card_present", "klarna", "paypal"], + "x-stripeMostCommon": ["card", "card_present", "klarna", "paypal"] + }, + "payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_tax": { + "description": "", + "properties": { + "total_tax_amount": { + "description": "The total amount of tax on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0.\n\nThis field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field.", + "type": "integer" + } + }, + "required": ["total_tax_amount"], + "title": "PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTax", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["total_tax_amount"] + }, + "payment_flows_amount_details_resource_shipping": { + "description": "", + "properties": { + "amount": { + "description": "If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than or equal to 0.", + "nullable": true, + "type": "integer" + }, + "from_postal_code": { + "description": "If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "to_postal_code": { + "description": "If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["amount", "from_postal_code", "to_postal_code"], + "title": "PaymentFlowsAmountDetailsResourceShipping", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "from_postal_code", "to_postal_code"] + }, + "payment_flows_amount_details_resource_tax": { + "description": "", + "properties": { + "total_tax_amount": { + "description": "The total amount of tax on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0.\n\nThis field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field.", + "nullable": true, + "type": "integer" + } + }, + "required": ["total_tax_amount"], + "title": "PaymentFlowsAmountDetailsResourceTax", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["total_tax_amount"] + }, + "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://docs.stripe.com/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": [], + "x-stripeMostCommon": ["allow_redirects", "enabled"] + }, + "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://docs.stripe.com/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" + } + }, + "required": ["enabled"], + "title": "PaymentFlowsAutomaticPaymentMethodsSetupIntent", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["allow_redirects", "enabled"] + }, + "payment_flows_payment_details": { + "description": "", + "properties": { + "customer_reference": { + "description": "A unique value to identify the customer. This field is available only for card payments.\n\nThis field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "order_reference": { + "description": "A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates.\n\nFor Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["customer_reference", "order_reference"], + "title": "PaymentFlowsPaymentDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["customer_reference", "order_reference"] + }, + "payment_flows_payment_intent_async_workflows": { + "description": "", + "properties": { + "inputs": { "$ref": "#/$defs/payment_flows_payment_intent_async_workflows_resource_inputs" } + }, + "title": "PaymentFlowsPaymentIntentAsyncWorkflows", + "type": "object", + "x-expandableFields": ["inputs"], + "x-stripeMostCommon": ["inputs"] + }, + "payment_flows_payment_intent_async_workflows_resource_inputs": { + "description": "", + "properties": { + "tax": { + "$ref": "#/$defs/payment_flows_payment_intent_async_workflows_resource_inputs_resource_tax" + } + }, + "title": "PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputs", + "type": "object", + "x-expandableFields": ["tax"], + "x-stripeMostCommon": ["tax"] + }, + "payment_flows_payment_intent_async_workflows_resource_inputs_resource_tax": { + "description": "", + "properties": { + "calculation": { + "description": "The [TaxCalculation](https://docs.stripe.com/api/tax/calculations) id", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["calculation"], + "title": "PaymentFlowsPaymentIntentAsyncWorkflowsResourceInputsResourceTax", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["calculation"] + }, + "payment_flows_payment_intent_presentment_details": { + "description": "", + "properties": { + "presentment_amount": { + "description": "Amount intended to be collected by this payment, denominated in `presentment_currency`.", + "type": "integer" + }, + "presentment_currency": { + "description": "Currency presented to the customer during payment.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["presentment_amount", "presentment_currency"], + "title": "PaymentFlowsPaymentIntentPresentmentDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["presentment_amount", "presentment_currency"] + }, + "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" + } + }, + "required": ["fingerprint", "transaction_id"], + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "fingerprint", "transaction_id"] + }, + "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": [], + "x-stripeMostCommon": ["status"] + }, + "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": [], + "x-stripeMostCommon": ["status"] + }, + "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": [], + "x-stripeMostCommon": ["maximum_amount_capturable", "status"] + }, + "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": [], + "x-stripeMostCommon": ["status"] + }, + "payment_flows_private_payment_methods_card_payment_intent_amount_details_line_item_payment_method_options": { + "description": "", + "properties": { "commodity_code": { "maxLength": 5000, "nullable": true, "type": "string" } }, + "required": ["commodity_code"], + "title": "PaymentFlowsPrivatePaymentMethodsCardPaymentIntentAmountDetailsLineItemPaymentMethodOptions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["commodity_code"] + }, + "payment_flows_private_payment_methods_card_present_amount_details_line_item_payment_method_options": { + "description": "", + "properties": { "commodity_code": { "maxLength": 5000, "nullable": true, "type": "string" } }, + "required": ["commodity_code"], + "title": "PaymentFlowsPrivatePaymentMethodsCardPresentAmountDetailsLineItemPaymentMethodOptions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["commodity_code"] + }, + "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": [], + "x-stripeMostCommon": ["type"] + }, + "payment_flows_private_payment_methods_financial_connections_common_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": "PaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFilters", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["account_subcategories"] + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "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" + } + }, + "required": ["day", "month", "year"], + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["day", "month", "year"] + }, + "payment_flows_private_payment_methods_klarna_payment_intent_amount_details_line_item_payment_method_options": { + "description": "", + "properties": { + "image_url": { "maxLength": 2048, "nullable": true, "type": "string" }, + "product_url": { "maxLength": 2048, "nullable": true, "type": "string" }, + "reference": { "maxLength": 255, "nullable": true, "type": "string" }, + "subscription_reference": { "maxLength": 2048, "nullable": true, "type": "string" } + }, + "required": ["image_url", "product_url", "reference", "subscription_reference"], + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaPaymentIntentAmountDetailsLineItemPaymentMethodOptions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["image_url", "product_url", "reference", "subscription_reference"] + }, + "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" + }, + "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": "PaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["capture_method"] + }, + "payment_flows_private_payment_methods_paypal_amount_details_line_item_payment_method_options": { + "description": "", + "properties": { + "category": { + "description": "Type of the line item.", + "enum": ["digital_goods", "donation", "physical_goods"], + "type": "string" + }, + "description": { + "description": "Description of the line item.", + "maxLength": 5000, + "type": "string" + }, + "sold_by": { + "description": "The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers).", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsPaypalAmountDetailsLineItemPaymentMethodOptions", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["category", "description", "sold_by"] + }, + "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": [], + "x-stripeMostCommon": ["capture_method"] + }, + "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](/payments/paymentintents/lifecycle)\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://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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": { "$ref": "#/$defs/payment_flows_amount_details" }, + "amount_received": { + "description": "Amount that this PaymentIntent collects.", + "type": "integer" + }, + "application": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/application" }], + "description": "ID of the Connect application that created the PaymentIntent.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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 amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts).", + "nullable": true, + "type": "integer" + }, + "automatic_payment_methods": { + "anyOf": [{ "$ref": "#/$defs/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`, `automatic`, or `expired`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "expired", + "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://docs.stripe.com/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": "#/$defs/customer" }, + { "$ref": "#/$defs/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://api.stripe.com#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": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "ID of the Account representing the customer that this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Accounts cannot be used with this PaymentIntent.\n\nIf [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead.", + "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" + }, + "excluded_payment_method_types": { + "description": "The list of payment method types to exclude from use with this payment.", + "items": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "sofort", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "hooks": { "$ref": "#/$defs/payment_flows_payment_intent_async_workflows" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_payment_error": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/charge" }], + "description": "ID of the latest [Charge object](https://docs.stripe.com/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/charge" }] } + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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://docs.stripe.com/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).", + "type": "object" + }, + "next_action": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/account" }], + "description": "You can specify the settlement merchant as the\nconnected account using the `on_behalf_of` attribute on the charge. See the PaymentIntents [use case for connected accounts](/payments/connected-accounts) for details.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "payment_details": { "$ref": "#/$defs/payment_flows_payment_details" }, + "payment_method": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_method" }], + "description": "ID of the payment method used in this PaymentIntent.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "payment_method_configuration_details": { + "anyOf": [ + { "$ref": "#/$defs/payment_method_config_biz_payment_method_configuration_details" } + ], + "description": "Information about the [payment method configuration](https://docs.stripe.com/api/payment_method_configurations) used for this PaymentIntent.", + "nullable": true + }, + "payment_method_options": { + "anyOf": [{ "$ref": "#/$defs/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. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "presentment_details": { + "$ref": "#/$defs/payment_flows_payment_intent_presentment_details" + }, + "processing": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/review" }], + "description": "ID of the review associated with this PaymentIntent, if any.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/shipping" }], + "description": "Shipping information for this PaymentIntent.", + "nullable": true + }, + "source": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/payment_source" }, + { "$ref": "#/$defs/deleted_payment_source" } + ], + "description": "This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { "$ref": "#/$defs/payment_source" }, + { "$ref": "#/$defs/deleted_payment_source" } + ] + } + }, + "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://docs.stripe.com/payments/intents#intent-statuses).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "transfer_data": { + "anyOf": [{ "$ref": "#/$defs/transfer_data" }], + "description": "The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://docs.stripe.com/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://docs.stripe.com/connect/separate-charges-and-transfers).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_capturable", + "amount_received", + "application", + "application_fee_amount", + "automatic_payment_methods", + "canceled_at", + "cancellation_reason", + "capture_method", + "client_secret", + "confirmation_method", + "created", + "currency", + "customer", + "customer_account", + "description", + "excluded_payment_method_types", + "id", + "last_payment_error", + "latest_charge", + "livemode", + "metadata", + "next_action", + "object", + "on_behalf_of", + "payment_method", + "payment_method_configuration_details", + "payment_method_options", + "payment_method_types", + "processing", + "receipt_email", + "review", + "setup_future_usage", + "shipping", + "source", + "statement_descriptor", + "statement_descriptor_suffix", + "status", + "transfer_group" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "hooks", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_details", + "payment_method", + "payment_method_configuration_details", + "payment_method_options", + "presentment_details", + "processing", + "review", + "shipping", + "source", + "transfer_data" + ], + "x-resourceId": "payment_intent", + "x-stripeMostCommon": [ + "amount", + "automatic_payment_methods", + "client_secret", + "currency", + "customer", + "customer_account", + "description", + "id", + "last_payment_error", + "latest_charge", + "metadata", + "next_action", + "payment_method", + "receipt_email", + "setup_future_usage", + "shipping", + "statement_descriptor", + "statement_descriptor_suffix", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/payment_intents" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/payment_intents/{intent}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/payment_intents/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/payment_intents" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/payment_intents/{intent}" + }, + { + "method_name": "apply_customer_balance", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_intents/{intent}/apply_customer_balance" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_intents/{intent}/cancel" + }, + { + "method_name": "capture", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_intents/{intent}/capture" + }, + { + "method_name": "confirm", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_intents/{intent}/confirm" + }, + { + "method_name": "increment_authorization", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_intents/{intent}/increment_authorization" + }, + { + "method_name": "verify_microdeposits", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_intents/{intent}/verify_microdeposits" + } + ], + "x-stripeResource": { + "class_name": "PaymentIntent", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "" + } + }, + "payment_intent_amount_details_line_item": { + "description": "", + "properties": { + "discount_amount": { + "description": "The discount applied on this line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.\n\nThis field is mutually exclusive with the `amount_details[discount_amount]` field.", + "nullable": true, + "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": ["payment_intent_amount_details_line_item"], + "type": "string" + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/$defs/payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_payment_method_options" + } + ], + "description": "Payment method-specific information for line items.", + "nullable": true + }, + "product_code": { + "description": "The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_name": { + "description": "The product name of the line item. Required for L3 rates. At most 1024 characters long.\n\nFor Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For PayPal, this field is truncated to 127 characters.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The quantity of items. Required for L3 rates. An integer greater than 0.", + "type": "integer" + }, + "tax": { + "anyOf": [ + { + "$ref": "#/$defs/payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_tax" + } + ], + "description": "Contains information about the tax on the item.", + "nullable": true + }, + "unit_cost": { + "description": "The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.", + "type": "integer" + }, + "unit_of_measure": { + "description": "A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "discount_amount", + "id", + "object", + "payment_method_options", + "product_code", + "product_name", + "quantity", + "tax", + "unit_cost", + "unit_of_measure" + ], + "title": "PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItem", + "type": "object", + "x-expandableFields": ["payment_method_options", "tax"], + "x-resourceId": "payment_intent_amount_details_line_item", + "x-stripeMostCommon": [ + "discount_amount", + "id", + "object", + "payment_method_options", + "product_code", + "product_name", + "quantity", + "tax", + "unit_cost", + "unit_of_measure" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/payment_intents/{intent}/amount_details_line_items", + "shared_version_of": "payment_intent_amount_details_line_item" + } + ], + "x-stripeResource": { + "class_name": "PaymentIntentAmountDetailsLineItem", + "has_collection_class": true, + "in_package": "" + } + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/$defs/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": ["customer_notification"], + "x-stripeMostCommon": ["customer_notification"], + "x-stripeResource": { "class_name": "Card", "in_package": "" } + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/$defs/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { "$ref": "#/$defs/payment_intent_next_action_boleto" }, + "card_await_notification": { + "$ref": "#/$defs/payment_intent_next_action_card_await_notification" + }, + "cashapp_handle_redirect_or_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code" + }, + "display_bank_transfer_instructions": { + "$ref": "#/$defs/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { "$ref": "#/$defs/payment_intent_next_action_konbini" }, + "multibanco_display_details": { + "$ref": "#/$defs/payment_intent_next_action_display_multibanco_details" + }, + "oxxo_display_details": { + "$ref": "#/$defs/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { "$ref": "#/$defs/payment_intent_next_action_pix_display_qr_code" }, + "promptpay_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { "$ref": "#/$defs/payment_intent_next_action_redirect_to_url" }, + "swish_handle_redirect_or_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_swish_handle_redirect_or_display_qr_code" + }, + "type": { + "description": "Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "upi_handle_redirect_or_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_upi_handle_redirect_or_display_qr_code" + }, + "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": "#/$defs/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/$defs/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/$defs/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", + "upi_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" + ], + "x-stripeMostCommon": [ + "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", + "type", + "upi_handle_redirect_or_display_qr_code", + "use_stripe_sdk", + "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" + } + }, + "required": ["native_data", "native_url", "return_url", "url"], + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["native_data", "native_url", "return_url", "url"], + "x-stripeResource": { "class_name": "NextActionAlipayHandleRedirect", "in_package": "" } + }, + "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" + } + }, + "required": ["expires_at", "hosted_voucher_url", "number", "pdf"], + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["expires_at", "hosted_voucher_url", "number", "pdf"], + "x-stripeResource": { "class_name": "NextActionDisplayBoletoDetails", "in_package": "" } + }, + "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" + } + }, + "required": ["charge_attempt_at", "customer_approval_required"], + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["charge_attempt_at", "customer_approval_required"], + "x-stripeResource": { "class_name": "NextActionCardAwaitNotification", "in_package": "" } + }, + "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": "#/$defs/payment_intent_next_action_cashapp_qr_code" } + }, + "required": ["hosted_instructions_url", "mobile_auth_url", "qr_code"], + "title": "PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode", + "type": "object", + "x-expandableFields": ["qr_code"], + "x-stripeMostCommon": ["hosted_instructions_url", "mobile_auth_url", "qr_code"], + "x-stripeResource": { "class_name": "CashappHandleRedirectOrDisplayQrCode", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["expires_at", "image_url_png", "image_url_svg"], + "x-stripeResource": { "class_name": "CashappQrCode", "in_package": "" } + }, + "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": "#/$defs/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": ["amount_remaining", "currency", "hosted_instructions_url", "reference", "type"], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": ["financial_addresses"], + "x-stripeMostCommon": [ + "amount_remaining", + "currency", + "financial_addresses", + "hosted_instructions_url", + "reference", + "type" + ], + "x-stripeResource": { + "class_name": "NextActionDisplayBankTransferInstructions", + "in_package": "" + } + }, + "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" + } + }, + "required": ["entity", "expires_at", "hosted_voucher_url", "reference"], + "title": "PaymentIntentNextActionDisplayMultibancoDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["entity", "expires_at", "hosted_voucher_url", "reference"], + "x-stripeResource": { "class_name": "NextActionMultibancoDisplayDetails", "in_package": "" } + }, + "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" + } + }, + "required": ["expires_after", "hosted_voucher_url", "number"], + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["expires_after", "hosted_voucher_url", "number"], + "x-stripeResource": { "class_name": "NextActionOxxoDisplayDetails", "in_package": "" } + }, + "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": "#/$defs/payment_intent_next_action_konbini_stores" } + }, + "required": ["expires_at", "hosted_voucher_url", "stores"], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": ["stores"], + "x-stripeMostCommon": ["expires_at", "hosted_voucher_url", "stores"], + "x-stripeResource": { "class_name": "NextActionKonbiniDisplayDetails", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["confirmation_number", "payment_code"], + "x-stripeResource": { "class_name": "Familymart", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["confirmation_number", "payment_code"], + "x-stripeResource": { "class_name": "Lawson", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["confirmation_number", "payment_code"], + "x-stripeResource": { "class_name": "Ministop", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["confirmation_number", "payment_code"], + "x-stripeResource": { "class_name": "Seicomart", "in_package": "" } + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [{ "$ref": "#/$defs/payment_intent_next_action_konbini_familymart" }], + "description": "FamilyMart instruction details.", + "nullable": true + }, + "lawson": { + "anyOf": [{ "$ref": "#/$defs/payment_intent_next_action_konbini_lawson" }], + "description": "Lawson instruction details.", + "nullable": true + }, + "ministop": { + "anyOf": [{ "$ref": "#/$defs/payment_intent_next_action_konbini_ministop" }], + "description": "Ministop instruction details.", + "nullable": true + }, + "seicomart": { + "anyOf": [{ "$ref": "#/$defs/payment_intent_next_action_konbini_seicomart" }], + "description": "Seicomart instruction details.", + "nullable": true + } + }, + "required": ["familymart", "lawson", "ministop", "seicomart"], + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": ["familymart", "lawson", "ministop", "seicomart"], + "x-stripeMostCommon": ["familymart", "lawson", "ministop", "seicomart"], + "x-stripeResource": { "class_name": "Stores", "in_package": "" } + }, + "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", "hosted_instructions_url", "image_url_png", "image_url_svg"], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["data", "hosted_instructions_url", "image_url_png", "image_url_svg"], + "x-stripeResource": { "class_name": "PaynowDisplayQrCode", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": [ + "data", + "expires_at", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "x-stripeResource": { "class_name": "PixDisplayQrCode", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["data", "hosted_instructions_url", "image_url_png", "image_url_svg"], + "x-stripeResource": { "class_name": "PromptpayDisplayQrCode", "in_package": "" } + }, + "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" + } + }, + "required": ["return_url", "url"], + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["return_url", "url"], + "x-stripeResource": { "class_name": "NextActionRedirectToUrl", "in_package": "" } + }, + "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" + }, + "mobile_auth_url": { + "description": "The url for mobile redirect based auth (for internal use only and not typically available in standard API requests).", + "maxLength": 5000, + "type": "string" + }, + "qr_code": { "$ref": "#/$defs/payment_intent_next_action_swish_qr_code" } + }, + "required": ["hosted_instructions_url", "mobile_auth_url", "qr_code"], + "title": "PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode", + "type": "object", + "x-expandableFields": ["qr_code"], + "x-stripeMostCommon": ["hosted_instructions_url", "mobile_auth_url", "qr_code"], + "x-stripeResource": { "class_name": "SwishHandleRedirectOrDisplayQrCode", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["data", "image_url_png", "image_url_svg"], + "x-stripeResource": { "class_name": "SwishQrCode", "in_package": "" } + }, + "payment_intent_next_action_upi_handle_redirect_or_display_qr_code": { + "description": "", + "properties": { + "hosted_instructions_url": { + "description": "The URL to the hosted UPI instructions page, which allows customers to view the QR code.", + "maxLength": 5000, + "type": "string" + }, + "qr_code": { "$ref": "#/$defs/payment_intent_next_action_upiqr_code" } + }, + "required": ["hosted_instructions_url", "qr_code"], + "title": "PaymentIntentNextActionUpiHandleRedirectOrDisplayQrCode", + "type": "object", + "x-expandableFields": ["qr_code"], + "x-stripeMostCommon": ["hosted_instructions_url", "qr_code"], + "x-stripeResource": { "class_name": "UPIHandleRedirectOrDisplayQrCode", "in_package": "" } + }, + "payment_intent_next_action_upiqr_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": "PaymentIntentNextActionUPIQRCode", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["expires_at", "image_url_png", "image_url_svg"], + "x-stripeResource": { "class_name": "UPIQRCode", "in_package": "" } + }, + "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", "microdeposit_type"], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["arrival_date", "hosted_verification_url", "microdeposit_type"] + }, + "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": [], + "x-stripeMostCommon": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "x-stripeResource": { "class_name": "WechatPayDisplayQrCode", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "x-stripeResource": { "class_name": "WechatPayRedirectToAndroidApp", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["native_url"], + "x-stripeResource": { "class_name": "WechatPayRedirectToIosApp", "in_package": "" } + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { "$ref": "#/$defs/payment_intent_payment_method_options_acss_debit" }, + "affirm": { "$ref": "#/$defs/payment_method_options_affirm" }, + "afterpay_clearpay": { "$ref": "#/$defs/payment_method_options_afterpay_clearpay" }, + "alipay": { "$ref": "#/$defs/payment_method_options_alipay" }, + "alma": { "$ref": "#/$defs/payment_method_options_alma" }, + "amazon_pay": { "$ref": "#/$defs/payment_method_options_amazon_pay" }, + "au_becs_debit": { "$ref": "#/$defs/payment_intent_payment_method_options_au_becs_debit" }, + "bacs_debit": { "$ref": "#/$defs/payment_intent_payment_method_options_bacs_debit" }, + "bancontact": { "$ref": "#/$defs/payment_method_options_bancontact" }, + "billie": { "$ref": "#/$defs/payment_method_options_billie" }, + "blik": { "$ref": "#/$defs/payment_intent_payment_method_options_blik" }, + "boleto": { "$ref": "#/$defs/payment_method_options_boleto" }, + "card": { "$ref": "#/$defs/payment_intent_payment_method_options_card" }, + "card_present": { "$ref": "#/$defs/payment_method_options_card_present" }, + "cashapp": { "$ref": "#/$defs/payment_method_options_cashapp" }, + "crypto": { "$ref": "#/$defs/payment_method_options_crypto" }, + "customer_balance": { "$ref": "#/$defs/payment_method_options_customer_balance" }, + "eps": { "$ref": "#/$defs/payment_intent_payment_method_options_eps" }, + "fpx": { "$ref": "#/$defs/payment_method_options_fpx" }, + "giropay": { "$ref": "#/$defs/payment_method_options_giropay" }, + "grabpay": { "$ref": "#/$defs/payment_method_options_grabpay" }, + "ideal": { "$ref": "#/$defs/payment_method_options_ideal" }, + "interac_present": { "$ref": "#/$defs/payment_method_options_interac_present" }, + "kakao_pay": { + "$ref": "#/$defs/payment_flows_private_payment_methods_kakao_pay_payment_method_options" + }, + "klarna": { "$ref": "#/$defs/payment_method_options_klarna" }, + "konbini": { "$ref": "#/$defs/payment_method_options_konbini" }, + "kr_card": { "$ref": "#/$defs/payment_method_options_kr_card" }, + "link": { "$ref": "#/$defs/payment_intent_payment_method_options_link" }, + "mb_way": { "$ref": "#/$defs/payment_method_options_mb_way" }, + "mobilepay": { "$ref": "#/$defs/payment_intent_payment_method_options_mobilepay" }, + "multibanco": { "$ref": "#/$defs/payment_method_options_multibanco" }, + "naver_pay": { + "$ref": "#/$defs/payment_flows_private_payment_methods_naver_pay_payment_method_options" + }, + "nz_bank_account": { + "$ref": "#/$defs/payment_intent_payment_method_options_nz_bank_account" + }, + "oxxo": { "$ref": "#/$defs/payment_method_options_oxxo" }, + "p24": { "$ref": "#/$defs/payment_method_options_p24" }, + "pay_by_bank": { "$ref": "#/$defs/payment_method_options_pay_by_bank" }, + "payco": { + "$ref": "#/$defs/payment_flows_private_payment_methods_payco_payment_method_options" + }, + "paynow": { "$ref": "#/$defs/payment_method_options_paynow" }, + "paypal": { "$ref": "#/$defs/payment_method_options_paypal" }, + "payto": { "$ref": "#/$defs/payment_intent_payment_method_options_payto" }, + "pix": { "$ref": "#/$defs/payment_method_options_pix" }, + "promptpay": { "$ref": "#/$defs/payment_method_options_promptpay" }, + "revolut_pay": { "$ref": "#/$defs/payment_method_options_revolut_pay" }, + "samsung_pay": { + "$ref": "#/$defs/payment_flows_private_payment_methods_samsung_pay_payment_method_options" + }, + "satispay": { "$ref": "#/$defs/payment_method_options_satispay" }, + "sepa_debit": { "$ref": "#/$defs/payment_intent_payment_method_options_sepa_debit" }, + "sofort": { "$ref": "#/$defs/payment_method_options_sofort" }, + "swish": { "$ref": "#/$defs/payment_intent_payment_method_options_swish" }, + "twint": { "$ref": "#/$defs/payment_method_options_twint" }, + "upi": { "$ref": "#/$defs/payment_method_options_upi" }, + "us_bank_account": { + "$ref": "#/$defs/payment_intent_payment_method_options_us_bank_account" + }, + "wechat_pay": { "$ref": "#/$defs/payment_method_options_wechat_pay" }, + "zip": { "$ref": "#/$defs/payment_method_options_zip" } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "sofort", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip" + ], + "x-stripeMostCommon": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "sofort", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip" + ] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/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. The default value is `automatic`.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": [ + "mandate_options", + "setup_future_usage", + "target_date", + "verification_method" + ] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage", "target_date"] + }, + "payment_intent_payment_method_options_bacs_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["mandate_options", "setup_future_usage", "target_date"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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", + "x-stripeBypassValidation": true + }, + "installments": { + "anyOf": [{ "$ref": "#/$defs/payment_method_options_card_installments" }], + "description": "Installment details for this payment.\n\nFor more information, see the [installments integration guide](https://docs.stripe.com/payments/installments).", + "nullable": true + }, + "mandate_options": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/payments/extended-authorization) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_incremental_authorization": { + "description": "Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_multicapture": { + "description": "Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent.", + "enum": ["if_available", "never"], + "type": "string" + }, + "request_overcapture": { + "description": "Request ability to [overcapture](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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" + } + }, + "required": ["installments", "mandate_options", "network", "request_three_d_secure"], + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": ["installments", "mandate_options"], + "x-stripeMostCommon": [ + "capture_method", + "installments", + "mandate_options", + "network", + "request_extended_authorization", + "request_incremental_authorization", + "request_multicapture", + "request_overcapture", + "request_three_d_secure", + "require_cvc_recollection", + "setup_future_usage", + "statement_descriptor_suffix_kana", + "statement_descriptor_suffix_kanji" + ] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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" + }, + "persistent_token": { + "description": "[Deprecated] This is a legacy parameter that no longer has any function.", + "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" + } + }, + "required": ["persistent_token"], + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["capture_method", "persistent_token", "setup_future_usage"] + }, + "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" + } + }, + "required": ["interval_description", "payment_schedule", "transaction_type"], + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "custom_mandate_url", + "interval_description", + "payment_schedule", + "transaction_type" + ] + }, + "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": [], + "x-stripeMostCommon": ["reference_prefix"], + "x-stripeResource": { "class_name": "BacsDebitMandateOptions", "in_package": "" } + }, + "payment_intent_payment_method_options_mandate_options_payto": { + "description": "", + "properties": { + "amount": { + "description": "Amount that will be collected. It is required when `amount_type` is `fixed`.", + "nullable": true, + "type": "integer" + }, + "amount_type": { + "description": "The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.", + "enum": ["fixed", "maximum"], + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "The periodicity at which payments will be collected. Defaults to `adhoc`.", + "enum": [ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly" + ], + "nullable": true, + "type": "string" + }, + "payments_per_period": { + "description": "The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.", + "nullable": true, + "type": "integer" + }, + "purpose": { + "description": "The purpose for which payments are made. Has a default value based on your merchant category code.", + "enum": [ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_type", + "end_date", + "payment_schedule", + "payments_per_period", + "purpose" + ], + "title": "payment_intent_payment_method_options_mandate_options_payto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "amount", + "amount_type", + "end_date", + "payment_schedule", + "payments_per_period", + "purpose" + ] + }, + "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": [], + "x-stripeMostCommon": ["reference_prefix"], + "x-stripeResource": { "class_name": "SepaDebitMandateOptions", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "payment_intent_payment_method_options_nz_bank_account": { + "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_nz_bank_account", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["setup_future_usage", "target_date"] + }, + "payment_intent_payment_method_options_payto": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/payment_intent_payment_method_options_mandate_options_payto" + }, + "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_payto", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options", "setup_future_usage"] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["mandate_options", "setup_future_usage", "target_date"] + }, + "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" + } + }, + "required": ["reference"], + "title": "payment_intent_payment_method_options_swish", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "setup_future_usage"] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { "$ref": "#/$defs/linked_account_options_common" }, + "mandate_options": { + "$ref": "#/$defs/payment_method_options_us_bank_account_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" + }, + "transaction_purpose": { + "description": "The purpose of the transaction.", + "enum": ["goods", "other", "services", "unspecified"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method. The default value is `automatic`.", + "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"], + "x-stripeMostCommon": [ + "financial_connections", + "mandate_options", + "setup_future_usage", + "target_date", + "transaction_purpose", + "verification_method" + ] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["card", "type"] + }, + "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" + } + }, + "required": ["approval_requested", "completes_at"], + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["approval_requested", "completes_at"], + "x-stripeResource": { "class_name": "CustomerNotification", "in_package": "" } + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://docs.stripe.com/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://docs.stripe.com/payments/payment-methods) and [More Payment Scenarios](https://docs.stripe.com/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { "$ref": "#/$defs/payment_method_acss_debit" }, + "affirm": { "$ref": "#/$defs/payment_method_affirm" }, + "afterpay_clearpay": { "$ref": "#/$defs/payment_method_afterpay_clearpay" }, + "alipay": { "$ref": "#/$defs/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": "#/$defs/payment_method_alma" }, + "amazon_pay": { "$ref": "#/$defs/payment_method_amazon_pay" }, + "au_becs_debit": { "$ref": "#/$defs/payment_method_au_becs_debit" }, + "bacs_debit": { "$ref": "#/$defs/payment_method_bacs_debit" }, + "bancontact": { "$ref": "#/$defs/payment_method_bancontact" }, + "billie": { "$ref": "#/$defs/payment_method_billie" }, + "billing_details": { "$ref": "#/$defs/billing_details" }, + "blik": { "$ref": "#/$defs/payment_method_blik" }, + "boleto": { "$ref": "#/$defs/payment_method_boleto" }, + "card": { "$ref": "#/$defs/payment_method_card" }, + "card_present": { "$ref": "#/$defs/payment_method_card_present" }, + "cashapp": { "$ref": "#/$defs/payment_method_cashapp" }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "crypto": { "$ref": "#/$defs/payment_method_crypto" }, + "custom": { "$ref": "#/$defs/payment_method_custom" }, + "customer": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/customer" }] } + }, + "customer_account": { "maxLength": 5000, "nullable": true, "type": "string" }, + "customer_balance": { "$ref": "#/$defs/payment_method_customer_balance" }, + "eps": { "$ref": "#/$defs/payment_method_eps" }, + "fpx": { "$ref": "#/$defs/payment_method_fpx" }, + "giropay": { "$ref": "#/$defs/payment_method_giropay" }, + "grabpay": { "$ref": "#/$defs/payment_method_grabpay" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { "$ref": "#/$defs/payment_method_ideal" }, + "interac_present": { "$ref": "#/$defs/payment_method_interac_present" }, + "kakao_pay": { "$ref": "#/$defs/payment_method_kakao_pay" }, + "klarna": { "$ref": "#/$defs/payment_method_klarna" }, + "konbini": { "$ref": "#/$defs/payment_method_konbini" }, + "kr_card": { "$ref": "#/$defs/payment_method_kr_card" }, + "link": { "$ref": "#/$defs/payment_method_link" }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "mb_way": { "$ref": "#/$defs/payment_method_mb_way" }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/payment_method_mobilepay" }, + "multibanco": { "$ref": "#/$defs/payment_method_multibanco" }, + "naver_pay": { "$ref": "#/$defs/payment_method_naver_pay" }, + "nz_bank_account": { "$ref": "#/$defs/payment_method_nz_bank_account" }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_method"], + "type": "string" + }, + "oxxo": { "$ref": "#/$defs/payment_method_oxxo" }, + "p24": { "$ref": "#/$defs/payment_method_p24" }, + "pay_by_bank": { "$ref": "#/$defs/payment_method_pay_by_bank" }, + "payco": { "$ref": "#/$defs/payment_method_payco" }, + "paynow": { "$ref": "#/$defs/payment_method_paynow" }, + "paypal": { "$ref": "#/$defs/payment_method_paypal" }, + "payto": { "$ref": "#/$defs/payment_method_payto" }, + "pix": { "$ref": "#/$defs/payment_method_pix" }, + "promptpay": { "$ref": "#/$defs/payment_method_promptpay" }, + "radar_options": { "$ref": "#/$defs/radar_radar_options" }, + "revolut_pay": { "$ref": "#/$defs/payment_method_revolut_pay" }, + "samsung_pay": { "$ref": "#/$defs/payment_method_samsung_pay" }, + "satispay": { "$ref": "#/$defs/payment_method_satispay" }, + "sepa_debit": { "$ref": "#/$defs/payment_method_sepa_debit" }, + "sofort": { "$ref": "#/$defs/payment_method_sofort" }, + "swish": { "$ref": "#/$defs/payment_method_swish" }, + "twint": { "$ref": "#/$defs/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", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "sofort", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "upi": { "$ref": "#/$defs/payment_method_upi" }, + "us_bank_account": { "$ref": "#/$defs/payment_method_us_bank_account" }, + "wechat_pay": { "$ref": "#/$defs/payment_method_wechat_pay" }, + "zip": { "$ref": "#/$defs/payment_method_zip" } + }, + "required": [ + "billing_details", + "created", + "customer", + "customer_account", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "radar_options", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "sofort", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip" + ], + "x-resourceId": "payment_method", + "x-stripeMostCommon": [ + "billing_details", + "customer", + "customer_account", + "id", + "metadata", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/payment_methods" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/payment_methods/{payment_method}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/payment_methods" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/payment_methods/{payment_method}" + }, + { + "method_name": "attach", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_methods/{payment_method}/attach" + }, + { + "method_name": "detach", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_methods/{payment_method}/detach" + } + ], + "x-stripeResource": { + "class_name": "PaymentMethod", + "has_collection_class": true, + "in_package": "" + } + }, + "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" + } + }, + "required": ["bank_name", "fingerprint", "institution_number", "last4", "transit_number"], + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "bank_name", + "fingerprint", + "institution_number", + "last4", + "transit_number" + ] + }, + "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" + } + }, + "required": ["bsb_number", "fingerprint", "last4"], + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bsb_number", "fingerprint", "last4"] + }, + "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" + } + }, + "required": ["fingerprint", "last4", "sort_code"], + "title": "payment_method_bacs_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["fingerprint", "last4", "sort_code"] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_billie": { + "description": "", + "properties": {}, + "title": "payment_method_billie", + "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": [], + "x-stripeMostCommon": ["tax_id"] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [{ "$ref": "#/$defs/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" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)", + "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": "#/$defs/payment_method_card_generated_card" }], + "description": "Details of the original PaymentMethod that created this object.", + "nullable": true + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/three_d_secure_usage" }], + "description": "Contains details on how this Card may be used for 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [{ "$ref": "#/$defs/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", + "checks", + "country", + "display_brand", + "exp_month", + "exp_year", + "funding", + "generated_from", + "last4", + "networks", + "regulated_status", + "three_d_secure_usage", + "wallet" + ], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ], + "x-stripeMostCommon": [ + "brand", + "checks", + "country", + "description", + "display_brand", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "generated_from", + "iin", + "issuer", + "last4", + "networks", + "regulated_status", + "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" + } + }, + "required": ["address_line1_check", "address_postal_code_check", "cvc_check"], + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["address_line1_check", "address_postal_code_check", "cvc_check"] + }, + "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": "#/$defs/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": "#/$defs/setup_attempt" }], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/setup_attempt" }] } + } + }, + "required": ["charge", "payment_method_details", "setup_attempt"], + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": ["payment_method_details", "setup_attempt"], + "x-stripeMostCommon": ["charge", "payment_method_details", "setup_attempt"] + }, + "payment_method_card_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `cartes_bancaires`, `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. (For internal use only and not typically available in standard API requests.)", + "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" + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "anyOf": [{ "$ref": "#/$defs/payment_method_card_present_networks" }], + "description": "Contains information about card networks that can be used to process the payment.", + "nullable": true + }, + "offline": { + "anyOf": [{ "$ref": "#/$defs/payment_method_details_card_present_offline" }], + "description": "Details about payment methods collected offline.", + "nullable": true + }, + "preferred_locales": { + "description": "The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.", + "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": "#/$defs/payment_flows_private_payment_methods_card_present_common_wallet" + } + }, + "required": [ + "brand", + "brand_product", + "cardholder_name", + "country", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "last4", + "networks", + "offline", + "preferred_locales", + "read_method" + ], + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": ["networks", "offline", "wallet"], + "x-stripeMostCommon": [ + "brand", + "brand_product", + "cardholder_name", + "country", + "description", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "iin", + "issuer", + "last4", + "networks", + "offline", + "preferred_locales", + "read_method", + "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", "preferred"], + "title": "payment_method_card_present_networks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["available", "preferred"] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/$defs/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { "$ref": "#/$defs/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": "#/$defs/payment_method_card_wallet_google_pay" }, + "link": { "$ref": "#/$defs/payment_method_card_wallet_link" }, + "masterpass": { "$ref": "#/$defs/payment_method_card_wallet_masterpass" }, + "samsung_pay": { "$ref": "#/$defs/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": "#/$defs/payment_method_card_wallet_visa_checkout" } + }, + "required": ["dynamic_last4", "type"], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "x-stripeMostCommon": [ + "amex_express_checkout", + "apple_pay", + "dynamic_last4", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "type", + "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": "#/$defs/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": "#/$defs/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 + } + }, + "required": ["billing_address", "email", "name", "shipping_address"], + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"], + "x-stripeMostCommon": ["billing_address", "email", "name", "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": "#/$defs/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": "#/$defs/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 + } + }, + "required": ["billing_address", "email", "name", "shipping_address"], + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"], + "x-stripeMostCommon": ["billing_address", "email", "name", "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" + } + }, + "required": ["buyer_id", "cashtag"], + "title": "payment_method_cashapp", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "cashtag"] + }, + "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", "parent"], + "title": "PaymentMethodConfigBizPaymentMethodConfigurationDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["id", "parent"] + }, + "payment_method_crypto": { + "description": "", + "properties": {}, + "title": "payment_method_crypto", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "Crypto", "in_package": "" } + }, + "payment_method_custom": { + "description": "", + "properties": { + "display_name": { + "description": "Display name of the Dashboard-only CustomPaymentMethodType.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "logo": { + "anyOf": [{ "$ref": "#/$defs/custom_logo" }], + "description": "Contains information about the Dashboard-only CustomPaymentMethodType logo.", + "nullable": true + }, + "type": { + "description": "ID of the Dashboard-only CustomPaymentMethodType. Not expandable.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["display_name", "logo", "type"], + "title": "payment_method_custom", + "type": "object", + "x-expandableFields": ["logo"], + "x-stripeMostCommon": ["display_name", "logo", "type"], + "x-stripeResource": { "class_name": "Custom", "in_package": "" } + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { "$ref": "#/$defs/payment_method_details_ach_credit_transfer" }, + "ach_debit": { "$ref": "#/$defs/payment_method_details_ach_debit" }, + "acss_debit": { "$ref": "#/$defs/payment_method_details_acss_debit" }, + "affirm": { "$ref": "#/$defs/payment_method_details_affirm" }, + "afterpay_clearpay": { "$ref": "#/$defs/payment_method_details_afterpay_clearpay" }, + "alipay": { "$ref": "#/$defs/payment_flows_private_payment_methods_alipay_details" }, + "alma": { "$ref": "#/$defs/payment_method_details_alma" }, + "amazon_pay": { "$ref": "#/$defs/payment_method_details_amazon_pay" }, + "au_becs_debit": { "$ref": "#/$defs/payment_method_details_au_becs_debit" }, + "bacs_debit": { "$ref": "#/$defs/payment_method_details_bacs_debit" }, + "bancontact": { "$ref": "#/$defs/payment_method_details_bancontact" }, + "billie": { "$ref": "#/$defs/payment_method_details_billie" }, + "blik": { "$ref": "#/$defs/payment_method_details_blik" }, + "boleto": { "$ref": "#/$defs/payment_method_details_boleto" }, + "card": { "$ref": "#/$defs/payment_method_details_card" }, + "card_present": { "$ref": "#/$defs/payment_method_details_card_present" }, + "cashapp": { "$ref": "#/$defs/payment_method_details_cashapp" }, + "crypto": { "$ref": "#/$defs/payment_method_details_crypto" }, + "customer_balance": { "$ref": "#/$defs/payment_method_details_customer_balance" }, + "eps": { "$ref": "#/$defs/payment_method_details_eps" }, + "fpx": { "$ref": "#/$defs/payment_method_details_fpx" }, + "giropay": { "$ref": "#/$defs/payment_method_details_giropay" }, + "grabpay": { "$ref": "#/$defs/payment_method_details_grabpay" }, + "ideal": { "$ref": "#/$defs/payment_method_details_ideal" }, + "interac_present": { "$ref": "#/$defs/payment_method_details_interac_present" }, + "kakao_pay": { "$ref": "#/$defs/payment_method_details_kakao_pay" }, + "klarna": { "$ref": "#/$defs/payment_method_details_klarna" }, + "konbini": { "$ref": "#/$defs/payment_method_details_konbini" }, + "kr_card": { "$ref": "#/$defs/payment_method_details_kr_card" }, + "link": { "$ref": "#/$defs/payment_method_details_link" }, + "mb_way": { "$ref": "#/$defs/payment_method_details_mb_way" }, + "mobilepay": { "$ref": "#/$defs/payment_method_details_mobilepay" }, + "multibanco": { "$ref": "#/$defs/payment_method_details_multibanco" }, + "naver_pay": { "$ref": "#/$defs/payment_method_details_naver_pay" }, + "nz_bank_account": { "$ref": "#/$defs/payment_method_details_nz_bank_account" }, + "oxxo": { "$ref": "#/$defs/payment_method_details_oxxo" }, + "p24": { "$ref": "#/$defs/payment_method_details_p24" }, + "pay_by_bank": { "$ref": "#/$defs/payment_method_details_pay_by_bank" }, + "payco": { "$ref": "#/$defs/payment_method_details_payco" }, + "paynow": { "$ref": "#/$defs/payment_method_details_paynow" }, + "paypal": { "$ref": "#/$defs/payment_method_details_paypal" }, + "payto": { "$ref": "#/$defs/payment_method_details_payto" }, + "pix": { "$ref": "#/$defs/payment_method_details_pix" }, + "promptpay": { "$ref": "#/$defs/payment_method_details_promptpay" }, + "revolut_pay": { "$ref": "#/$defs/payment_method_details_revolut_pay" }, + "samsung_pay": { "$ref": "#/$defs/payment_method_details_samsung_pay" }, + "satispay": { "$ref": "#/$defs/payment_method_details_satispay" }, + "sepa_credit_transfer": { "$ref": "#/$defs/payment_method_details_sepa_credit_transfer" }, + "sepa_debit": { "$ref": "#/$defs/payment_method_details_sepa_debit" }, + "sofort": { "$ref": "#/$defs/payment_method_details_sofort" }, + "stripe_account": { "$ref": "#/$defs/payment_method_details_stripe_account" }, + "swish": { "$ref": "#/$defs/payment_method_details_swish" }, + "twint": { "$ref": "#/$defs/payment_method_details_twint" }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://docs.stripe.com/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" + }, + "upi": { "$ref": "#/$defs/payment_method_details_upi" }, + "us_bank_account": { "$ref": "#/$defs/payment_method_details_us_bank_account" }, + "wechat": { "$ref": "#/$defs/payment_method_details_wechat" }, + "wechat_pay": { "$ref": "#/$defs/payment_method_details_wechat_pay" }, + "zip": { "$ref": "#/$defs/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", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "stripe_account", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat", + "wechat_pay", + "zip" + ], + "x-stripeMostCommon": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "stripe_account", + "swish", + "twint", + "type", + "upi", + "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" + } + }, + "required": ["account_number", "bank_name", "routing_number", "swift_code"], + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["account_number", "bank_name", "routing_number", "swift_code"] + }, + "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" + } + }, + "required": [ + "account_holder_type", + "bank_name", + "country", + "fingerprint", + "last4", + "routing_number" + ], + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "account_holder_type", + "bank_name", + "country", + "fingerprint", + "last4", + "routing_number" + ] + }, + "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" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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" + } + }, + "required": ["bank_name", "fingerprint", "institution_number", "last4", "transit_number"], + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "bank_name", + "expected_debit_date", + "fingerprint", + "institution_number", + "last4", + "mandate", + "transit_number" + ] + }, + "payment_method_details_affirm": { + "description": "", + "properties": { + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "type": "string" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "transaction_id": { + "description": "The Affirm transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["location", "reader", "transaction_id"] + }, + "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" + } + }, + "required": ["order_id", "reference"], + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["order_id", "reference"] + }, + "payment_method_details_alma": { + "description": "", + "properties": { + "installments": { "$ref": "#/$defs/alma_installments" }, + "transaction_id": { + "description": "The Alma transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_alma", + "type": "object", + "x-expandableFields": ["installments"], + "x-stripeMostCommon": ["installments", "transaction_id"] + }, + "payment_method_details_amazon_pay": { + "description": "", + "properties": { + "funding": { "$ref": "#/$defs/amazon_pay_underlying_payment_method_funding_details" }, + "transaction_id": { + "description": "The Amazon Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_amazon_pay", + "type": "object", + "x-expandableFields": ["funding"], + "x-stripeMostCommon": ["funding", "transaction_id"] + }, + "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" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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" + } + }, + "required": ["bsb_number", "fingerprint", "last4"], + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bsb_number", "expected_debit_date", "fingerprint", "last4", "mandate"] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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, + "nullable": true, + "type": "string" + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["fingerprint", "last4", "mandate", "sort_code"], + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["expected_debit_date", "fingerprint", "last4", "mandate", "sort_code"] + }, + "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": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + } + }, + "required": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ] + }, + "payment_method_details_billie": { + "description": "", + "properties": { + "transaction_id": { + "description": "The Billie transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_billie", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["transaction_id"] + }, + "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" + } + }, + "required": ["buyer_id"], + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id"] + }, + "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": [], + "x-stripeMostCommon": ["tax_id"] + }, + "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`, `cartes_bancaires`, `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": "#/$defs/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" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)", + "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": "#/$defs/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" + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "incremental_authorization": { + "$ref": "#/$defs/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization" + }, + "installments": { + "anyOf": [{ "$ref": "#/$defs/payment_method_details_card_installments" }], + "description": "Installment details for this payment.\n\nFor more information, see the [installments integration guide](https://docs.stripe.com/payments/installments).", + "nullable": true + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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" + }, + "moto": { + "description": "True if this payment was marked as MOTO and out of scope for SCA.", + "nullable": true, + "type": "boolean" + }, + "multicapture": { + "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/three_d_secure_details_charge" }], + "description": "Populated if this transaction used 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [{ "$ref": "#/$defs/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": [ + "amount_authorized", + "authorization_code", + "brand", + "checks", + "country", + "exp_month", + "exp_year", + "funding", + "installments", + "last4", + "mandate", + "network", + "network_transaction_id", + "regulated_status", + "three_d_secure", + "wallet" + ], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "extended_authorization", + "incremental_authorization", + "installments", + "multicapture", + "network_token", + "overcapture", + "three_d_secure", + "wallet" + ], + "x-stripeMostCommon": [ + "amount_authorized", + "authorization_code", + "brand", + "capture_before", + "checks", + "country", + "description", + "exp_month", + "exp_year", + "extended_authorization", + "fingerprint", + "funding", + "iin", + "incremental_authorization", + "installments", + "issuer", + "last4", + "mandate", + "moto", + "multicapture", + "network", + "network_token", + "network_transaction_id", + "overcapture", + "regulated_status", + "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" + } + }, + "required": ["address_line1_check", "address_postal_code_check", "cvc_check"], + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["address_line1_check", "address_postal_code_check", "cvc_check"] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [{ "$ref": "#/$defs/payment_method_details_card_installments_plan" }], + "description": "Installment plan selected for the payment.", + "nullable": true + } + }, + "required": ["plan"], + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": ["plan"], + "x-stripeMostCommon": ["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`, `bonus`, or `revolving`.", + "enum": ["bonus", "fixed_count", "revolving"], + "type": "string" + } + }, + "required": ["count", "interval", "type"], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["count", "interval", "type"] + }, + "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": [], + "x-stripeMostCommon": ["used"] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "nullable": true, + "type": "integer" + }, + "brand": { + "description": "Card brand. Can be `amex`, `cartes_bancaires`, `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. (For internal use only and not typically available in standard API requests.)", + "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" + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "incremental_authorization_supported": { + "description": "Whether this [PaymentIntent](https://docs.stripe.com/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://docs.stripe.com/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. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "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": "#/$defs/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": "The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.", + "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" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "receipt": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/payment_flows_private_payment_methods_card_present_common_wallet" + } + }, + "required": [ + "amount_authorized", + "brand", + "brand_product", + "cardholder_name", + "country", + "emv_auth_data", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "generated_card", + "incremental_authorization_supported", + "last4", + "network", + "network_transaction_id", + "offline", + "overcapture_supported", + "preferred_locales", + "read_method", + "receipt" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": ["offline", "receipt", "wallet"], + "x-stripeMostCommon": [ + "amount_authorized", + "brand", + "brand_product", + "capture_before", + "cardholder_name", + "country", + "description", + "emv_auth_data", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "generated_card", + "iin", + "incremental_authorization_supported", + "issuer", + "last4", + "location", + "network", + "network_transaction_id", + "offline", + "overcapture_supported", + "preferred_locales", + "read_method", + "reader", + "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" + } + }, + "required": ["stored_at", "type"], + "title": "payment_method_details_card_present_offline", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["stored_at", "type"], + "x-stripeResource": { "class_name": "Offline", "in_package": "" } + }, + "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": "The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application_preferred_name": { + "description": "The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.", + "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": "Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "description": "A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_status_information": { + "description": "An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "application_cryptogram", + "application_preferred_name", + "authorization_code", + "authorization_response_code", + "cardholder_verification_method", + "dedicated_file_name", + "terminal_verification_results", + "transaction_status_information" + ], + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "account_type", + "application_cryptogram", + "application_preferred_name", + "authorization_code", + "authorization_response_code", + "cardholder_verification_method", + "dedicated_file_name", + "terminal_verification_results", + "transaction_status_information" + ] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/$defs/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { "$ref": "#/$defs/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": "#/$defs/payment_method_details_card_wallet_google_pay" }, + "link": { "$ref": "#/$defs/payment_method_details_card_wallet_link" }, + "masterpass": { "$ref": "#/$defs/payment_method_details_card_wallet_masterpass" }, + "samsung_pay": { "$ref": "#/$defs/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": "#/$defs/payment_method_details_card_wallet_visa_checkout" } + }, + "required": ["dynamic_last4", "type"], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "x-stripeMostCommon": [ + "amex_express_checkout", + "apple_pay", + "dynamic_last4", + "google_pay", + "link", + "masterpass", + "samsung_pay", + "type", + "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": "#/$defs/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": "#/$defs/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 + } + }, + "required": ["billing_address", "email", "name", "shipping_address"], + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"], + "x-stripeMostCommon": ["billing_address", "email", "name", "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": "#/$defs/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": "#/$defs/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 + } + }, + "required": ["billing_address", "email", "name", "shipping_address"], + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"], + "x-stripeMostCommon": ["billing_address", "email", "name", "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" + }, + "transaction_id": { + "description": "A unique and immutable identifier of payments assigned by Cash App", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "cashtag", "transaction_id"], + "title": "payment_method_details_cashapp", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "cashtag", "transaction_id"] + }, + "payment_method_details_crypto": { + "description": "", + "properties": { + "buyer_address": { + "description": "The wallet address of the customer.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The blockchain network that the transaction was sent on.", + "enum": ["base", "ethereum", "polygon", "solana", "tempo"], + "type": "string" + }, + "token_currency": { + "description": "The token currency that the transaction was sent with.", + "enum": ["usdc", "usdg", "usdp"], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction_hash": { + "description": "The blockchain transaction hash of the crypto payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_crypto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_address", "network", "token_currency", "transaction_hash"], + "x-stripeResource": { "class_name": "Crypto", "in_package": "" } + }, + "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" + } + }, + "required": ["bank", "verified_name"], + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank", "verified_name"] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type, if provided. Can be one of `individual` or `company`.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "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": ["account_holder_type", "bank", "transaction_id"], + "title": "payment_method_details_fpx", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["account_holder_type", "bank", "transaction_id"] + }, + "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" + } + }, + "required": ["bank_code", "bank_name", "bic", "verified_name"], + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank_code", "bank_name", "bic", "verified_name"] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["transaction_id"] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "adyen", + "asn_bank", + "bunq", + "buut", + "finom", + "handelsbanken", + "ing", + "knab", + "mollie", + "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", + "ADYBNL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "BUUTNL2A", + "FNOMNL22", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MLLENL2A", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/mandate" }] } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction ID generated by iDEAL.", + "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" + } + }, + "required": [ + "bank", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "transaction_id", + "verified_name" + ], + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "transaction_id", + "verified_name" + ] + }, + "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. (For internal use only and not typically available in standard API requests.)", + "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" + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "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": "The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.", + "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" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "receipt": { + "anyOf": [{ "$ref": "#/$defs/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": [ + "brand", + "cardholder_name", + "country", + "emv_auth_data", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "generated_card", + "last4", + "network", + "network_transaction_id", + "preferred_locales", + "read_method", + "receipt" + ], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": ["receipt"], + "x-stripeMostCommon": [ + "brand", + "cardholder_name", + "country", + "description", + "emv_auth_data", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "generated_card", + "iin", + "issuer", + "last4", + "location", + "network", + "network_transaction_id", + "preferred_locales", + "read_method", + "reader", + "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": "The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application_preferred_name": { + "description": "The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.", + "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": "Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "description": "A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_status_information": { + "description": "An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "application_cryptogram", + "application_preferred_name", + "authorization_code", + "authorization_response_code", + "cardholder_verification_method", + "dedicated_file_name", + "terminal_verification_results", + "transaction_status_information" + ], + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "account_type", + "application_cryptogram", + "application_preferred_name", + "authorization_code", + "authorization_response_code", + "cardholder_verification_method", + "dedicated_file_name", + "terminal_verification_results", + "transaction_status_information" + ], + "x-stripeResource": { "class_name": "Receipt", "in_package": "" } + }, + "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" + }, + "transaction_id": { + "description": "The Kakao Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_kakao_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "KakaoPay", "in_package": "" } + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "payer_details": { + "anyOf": [{ "$ref": "#/$defs/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" + } + }, + "required": ["payer_details", "payment_method_category", "preferred_locale"], + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": ["payer_details"], + "x-stripeMostCommon": ["payer_details", "payment_method_category", "preferred_locale"] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [{ "$ref": "#/$defs/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 + } + }, + "required": ["store"], + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": ["store"], + "x-stripeMostCommon": ["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", + "x-stripeBypassValidation": true + } + }, + "required": ["chain"], + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["chain"] + }, + "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" + }, + "transaction_id": { + "description": "The Korean Card transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["brand", "buyer_id", "last4", "transaction_id"], + "title": "payment_method_details_kr_card", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["brand", "buyer_id", "last4", "transaction_id"], + "x-stripeResource": { "class_name": "KrCard", "in_package": "" } + }, + "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" + } + }, + "required": ["country"], + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["country"] + }, + "payment_method_details_mb_way": { + "description": "", + "properties": {}, + "title": "payment_method_details_mb_way", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "MbWay", "in_package": "" } + }, + "payment_method_details_mobilepay": { + "description": "", + "properties": { + "card": { + "anyOf": [{ "$ref": "#/$defs/internal_card" }], + "description": "Internal card details", + "nullable": true + } + }, + "required": ["card"], + "title": "payment_method_details_mobilepay", + "type": "object", + "x-expandableFields": ["card"], + "x-stripeMostCommon": ["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" + } + }, + "required": ["entity", "reference"], + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["entity", "reference"] + }, + "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" + }, + "transaction_id": { + "description": "The Naver Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_naver_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "NaverPay", "in_package": "" } + }, + "payment_method_details_nz_bank_account": { + "description": "", + "properties": { + "account_holder_name": { + "description": "The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_code": { + "description": "The numeric code for the bank account's bank.", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "type": "string" + }, + "branch_code": { + "description": "The numeric code for the bank account's bank branch.", + "maxLength": 5000, + "type": "string" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "suffix": { + "description": "The suffix of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "bank_code", + "bank_name", + "branch_code", + "last4", + "suffix" + ], + "title": "payment_method_details_nz_bank_account", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "account_holder_name", + "bank_code", + "bank_name", + "branch_code", + "expected_debit_date", + "last4", + "suffix" + ] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["number"], + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["number"] + }, + "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" + } + }, + "required": ["bank", "reference", "verified_name"], + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank", "reference", "verified_name"] + }, + "payment_method_details_passthrough_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `cartes_bancaires`, `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" + } + }, + "required": ["brand", "country", "exp_month", "exp_year", "funding", "last4"], + "title": "payment_method_details_passthrough_card", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["brand", "country", "exp_month", "exp_year", "funding", "last4"] + }, + "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" + }, + "transaction_id": { + "description": "The Payco transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_payco", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "Payco", "in_package": "" } + }, + "payment_method_details_payment_record_affirm": { + "description": "", + "properties": { + "location": { + "description": "ID of the location that this reader is assigned to.", + "maxLength": 5000, + "type": "string" + }, + "reader": { + "description": "ID of the reader this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "transaction_id": { + "description": "The Affirm transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_payment_record_affirm", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["location", "reader", "transaction_id"] + }, + "payment_method_details_payment_record_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" + } + }, + "required": ["order_id", "reference"], + "title": "payment_method_details_payment_record_afterpay_clearpay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["order_id", "reference"] + }, + "payment_method_details_payment_record_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": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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. Can 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 (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "title": "payment_method_details_payment_record_bancontact", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ] + }, + "payment_method_details_payment_record_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "payment_method_details_payment_record_boleto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["tax_id"] + }, + "payment_method_details_payment_record_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" + }, + "transaction_id": { + "description": "A unique and immutable identifier of payments assigned by Cash App.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "cashtag", "transaction_id"], + "title": "payment_method_details_payment_record_cashapp", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "cashtag", "transaction_id"] + }, + "payment_method_details_payment_record_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 (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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bank_code", "bank_name", "bic", "verified_name"], + "title": "payment_method_details_payment_record_giropay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank_code", "bank_name", "bic", "verified_name"] + }, + "payment_method_details_payment_record_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "adyen", + "asn_bank", + "bunq", + "buut", + "finom", + "handelsbanken", + "ing", + "knab", + "mollie", + "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", + "ADYBNL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "BUUTNL2A", + "FNOMNL22", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MLLENL2A", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/mandate" }] } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction ID generated by iDEAL.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "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.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "bank", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "transaction_id", + "verified_name" + ], + "title": "payment_method_details_payment_record_ideal", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "transaction_id", + "verified_name" + ] + }, + "payment_method_details_payment_record_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" + }, + "transaction_id": { + "description": "The Kakao Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_payment_record_kakao_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "KakaoPay", "in_package": "" } + }, + "payment_method_details_payment_record_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_konbini_details_resource_store" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed.", + "nullable": true + } + }, + "required": ["store"], + "title": "payment_method_details_payment_record_konbini", + "type": "object", + "x-expandableFields": ["store"], + "x-stripeMostCommon": ["store"] + }, + "payment_method_details_payment_record_mb_way": { + "description": "", + "properties": {}, + "title": "payment_method_details_payment_record_mb_way", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "MbWay", "in_package": "" } + }, + "payment_method_details_payment_record_mobilepay": { + "description": "", + "properties": { + "card": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_mobilepay_details_resource_card" + } + ], + "description": "Internal card details", + "nullable": true + } + }, + "required": ["card"], + "title": "payment_method_details_payment_record_mobilepay", + "type": "object", + "x-expandableFields": ["card"], + "x-stripeMostCommon": ["card"] + }, + "payment_method_details_payment_record_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" + } + }, + "required": ["entity", "reference"], + "title": "payment_method_details_payment_record_multibanco", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["entity", "reference"] + }, + "payment_method_details_payment_record_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" + }, + "transaction_id": { + "description": "The Naver Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_payment_record_naver_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"] + }, + "payment_method_details_payment_record_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["number"], + "title": "payment_method_details_payment_record_oxxo", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["number"] + }, + "payment_method_details_payment_record_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" + }, + "transaction_id": { + "description": "The Payco transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_payment_record_payco", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "Payco", "in_package": "" } + }, + "payment_method_details_payment_record_paynow": { + "description": "", + "properties": { + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "type": "string" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["reference"], + "title": "payment_method_details_payment_record_paynow", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["location", "reader", "reference"] + }, + "payment_method_details_payment_record_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_payment_record_pix", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank_transaction_id"] + }, + "payment_method_details_payment_record_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["reference"], + "title": "payment_method_details_payment_record_promptpay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference"] + }, + "payment_method_details_payment_record_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" + }, + "transaction_id": { + "description": "The Samsung Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_payment_record_samsung_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "SamsungPay", "in_package": "" } + }, + "payment_method_details_payment_record_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" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bank_code", "branch_code", "country", "fingerprint", "last4", "mandate"], + "title": "payment_method_details_payment_record_sepa_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "bank_code", + "branch_code", + "country", + "expected_debit_date", + "fingerprint", + "last4", + "mandate" + ] + }, + "payment_method_details_payment_record_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": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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. Can 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 (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "bank_code", + "bank_name", + "bic", + "country", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "title": "payment_method_details_payment_record_sofort", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank_code", + "bank_name", + "bic", + "country", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ] + }, + "payment_method_details_payment_record_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" + } + }, + "required": ["fingerprint", "payment_reference", "verified_phone_last4"], + "title": "payment_method_details_payment_record_swish", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["fingerprint", "payment_reference", "verified_phone_last4"] + }, + "payment_method_details_payment_record_twint": { + "description": "", + "properties": {}, + "title": "payment_method_details_payment_record_twint", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_payment_record_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either 'individual' or 'company'.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "The type of the bank account. This can be either 'checking' or 'savings'.", + "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" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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": "#/$defs/mandate" }], + "description": "ID of the mandate used to make this payment.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/mandate" }] } + }, + "payment_reference": { + "description": "The ACH payment reference for this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "The routing number for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "account_holder_type", + "account_type", + "bank_name", + "fingerprint", + "last4", + "payment_reference", + "routing_number" + ], + "title": "payment_method_details_payment_record_us_bank_account", + "type": "object", + "x-expandableFields": ["mandate"], + "x-stripeMostCommon": [ + "account_holder_type", + "account_type", + "bank_name", + "expected_debit_date", + "fingerprint", + "last4", + "mandate", + "payment_reference", + "routing_number" + ] + }, + "payment_method_details_payment_record_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" + }, + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "type": "string" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["fingerprint", "transaction_id"], + "title": "payment_method_details_payment_record_wechat_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["fingerprint", "location", "reader", "transaction_id"] + }, + "payment_method_details_payment_record_zip": { + "description": "", + "properties": {}, + "title": "payment_method_details_payment_record_zip", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "type": "string" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["reference"], + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["location", "reader", "reference"] + }, + "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": "#/$defs/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" + } + }, + "required": [ + "country", + "payer_email", + "payer_id", + "payer_name", + "seller_protection", + "transaction_id" + ], + "title": "payment_method_details_paypal", + "type": "object", + "x-expandableFields": ["seller_protection"], + "x-stripeMostCommon": [ + "country", + "payer_email", + "payer_id", + "payer_name", + "seller_protection", + "transaction_id" + ] + }, + "payment_method_details_payto": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch 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" + }, + "pay_id": { + "description": "The PayID alias for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bsb_number", "last4", "pay_id"], + "title": "payment_method_details_payto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bsb_number", "last4", "mandate", "pay_id"] + }, + "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": [], + "x-stripeMostCommon": ["bank_transaction_id"] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["reference"], + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference"] + }, + "payment_method_details_revolut_pay": { + "description": "", + "properties": { + "funding": { "$ref": "#/$defs/revolut_pay_underlying_payment_method_funding_details" }, + "transaction_id": { + "description": "The Revolut Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_revolut_pay", + "type": "object", + "x-expandableFields": ["funding"], + "x-stripeMostCommon": ["funding", "transaction_id"] + }, + "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" + }, + "transaction_id": { + "description": "The Samsung Pay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["buyer_id", "transaction_id"], + "title": "payment_method_details_samsung_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "transaction_id"], + "x-stripeResource": { "class_name": "SamsungPay", "in_package": "" } + }, + "payment_method_details_satispay": { + "description": "", + "properties": { + "transaction_id": { + "description": "The Satispay transaction ID associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["transaction_id"], + "title": "payment_method_details_satispay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["transaction_id"] + }, + "payment_method_details_sepa_credit_transfer": { + "description": "", + "properties": { + "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" + }, + "iban": { + "description": "IBAN of the bank account to transfer funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bank_name", "bic", "iban"], + "title": "payment_method_details_sepa_credit_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank_name", "bic", "iban"] + }, + "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" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bank_code", "branch_code", "country", "fingerprint", "last4", "mandate"], + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "bank_code", + "branch_code", + "country", + "expected_debit_date", + "fingerprint", + "last4", + "mandate" + ] + }, + "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": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + } + }, + "required": [ + "bank_code", + "bank_name", + "bic", + "country", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank_code", + "bank_name", + "bic", + "country", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ] + }, + "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" + } + }, + "required": ["fingerprint", "payment_reference", "verified_phone_last4"], + "title": "payment_method_details_swish", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["fingerprint", "payment_reference", "verified_phone_last4"] + }, + "payment_method_details_twint": { + "description": "", + "properties": {}, + "title": "payment_method_details_twint", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_upi": { + "description": "", + "properties": { + "vpa": { + "description": "Customer's unique Virtual Payment Address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["vpa"], + "title": "payment_method_details_upi", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["vpa"] + }, + "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" + }, + "expected_debit_date": { + "description": "Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.", + "maxLength": 5000, + "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": "#/$defs/mandate" }], + "description": "ID of the mandate used to make this payment.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + } + }, + "required": [ + "account_holder_type", + "account_type", + "bank_name", + "fingerprint", + "last4", + "payment_reference", + "routing_number" + ], + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": ["mandate"], + "x-stripeMostCommon": [ + "account_holder_type", + "account_type", + "bank_name", + "expected_debit_date", + "fingerprint", + "last4", + "mandate", + "payment_reference", + "routing_number" + ] + }, + "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" + }, + "location": { + "description": "ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.", + "maxLength": 5000, + "type": "string" + }, + "reader": { + "description": "ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.", + "maxLength": 5000, + "type": "string" + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["fingerprint", "transaction_id"], + "title": "payment_method_details_wechat_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["fingerprint", "location", "reader", "transaction_id"] + }, + "payment_method_details_zip": { + "description": "", + "properties": {}, + "title": "payment_method_details_zip", + "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" + } + }, + "required": ["bank"], + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank"] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type, if provided. Can be one of `individual` or `company`.", + "enum": ["company", "individual"], + "nullable": true, + "type": "string" + }, + "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": ["account_holder_type", "bank"], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["account_holder_type", "bank"] + }, + "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`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "adyen", + "asn_bank", + "bunq", + "buut", + "finom", + "handelsbanken", + "ing", + "knab", + "mollie", + "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", + "ADYBNL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "BUUTNL2A", + "FNOMNL22", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MLLENL2A", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["bank", "bic"], + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank", "bic"] + }, + "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. (For internal use only and not typically available in standard API requests.)", + "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" + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "anyOf": [{ "$ref": "#/$defs/payment_method_card_present_networks" }], + "description": "Contains information about card networks that can be used to process the payment.", + "nullable": true + }, + "preferred_locales": { + "description": "The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.", + "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": [ + "brand", + "cardholder_name", + "country", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "last4", + "networks", + "preferred_locales", + "read_method" + ], + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": ["networks"], + "x-stripeMostCommon": [ + "brand", + "cardholder_name", + "country", + "description", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "iin", + "issuer", + "last4", + "networks", + "preferred_locales", + "read_method" + ] + }, + "payment_method_kakao_pay": { + "description": "", + "properties": {}, + "title": "payment_method_kakao_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "KakaoPay", "in_package": "" } + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [{ "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["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" + } + }, + "required": ["brand", "last4"], + "title": "payment_method_kr_card", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["brand", "last4"], + "x-stripeResource": { "class_name": "KrCard", "in_package": "" } + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "persistent_token": { + "description": "[Deprecated] This is a legacy parameter that no longer has any function.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["email"], + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["email", "persistent_token"] + }, + "payment_method_mb_way": { + "description": "", + "properties": {}, + "title": "payment_method_mb_way", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "MbWay", "in_package": "" } + }, + "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": { + "buyer_id": { + "description": "Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Whether to fund this transaction with Naver Pay points or a card.", + "enum": ["card", "points"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["buyer_id", "funding"], + "title": "payment_method_naver_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id", "funding"], + "x-stripeResource": { "class_name": "NaverPay", "in_package": "" } + }, + "payment_method_nz_bank_account": { + "description": "", + "properties": { + "account_holder_name": { + "description": "The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_code": { + "description": "The numeric code for the bank account's bank.", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "type": "string" + }, + "branch_code": { + "description": "The numeric code for the bank account's bank branch.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "suffix": { + "description": "The suffix of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "bank_code", + "bank_name", + "branch_code", + "last4", + "suffix" + ], + "title": "payment_method_nz_bank_account", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "account_holder_name", + "bank_code", + "bank_name", + "branch_code", + "last4", + "suffix" + ] + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "preferred_locale", "setup_future_usage"] + }, + "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 + } + }, + "required": ["reference"], + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["capture_method", "reference", "setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["capture_method"] + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["preferred_language", "setup_future_usage"] + }, + "payment_method_options_billie": { + "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_billie", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["capture_method"] + }, + "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": [], + "x-stripeMostCommon": ["expires_after_days", "setup_future_usage"] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { "$ref": "#/$defs/payment_method_details_card_installments_plan" }, + "nullable": true, + "type": "array" + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [{ "$ref": "#/$defs/payment_method_details_card_installments_plan" }], + "description": "Installment plan selected for this PaymentIntent.", + "nullable": true + } + }, + "required": ["available_plans", "enabled", "plan"], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": ["available_plans", "plan"], + "x-stripeMostCommon": ["available_plans", "enabled", "plan"] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments, specified in the presentment currency.", + "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", + "description", + "end_date", + "interval", + "interval_count", + "reference", + "start_date", + "supported_types" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "amount", + "amount_type", + "description", + "end_date", + "interval", + "interval_count", + "reference", + "start_date", + "supported_types" + ], + "x-stripeResource": { "class_name": "MandateOptions", "in_package": "" } + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual", "manual_preferred"], + "type": "string" + }, + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity)", + "nullable": true, + "type": "boolean" + }, + "request_incremental_authorization_support": { + "description": "Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support.", + "nullable": true, + "type": "boolean" + }, + "routing": { "$ref": "#/$defs/payment_method_options_card_present_routing" } + }, + "required": ["request_extended_authorization", "request_incremental_authorization_support"], + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": ["routing"], + "x-stripeMostCommon": [ + "capture_method", + "request_extended_authorization", + "request_incremental_authorization_support", + "routing" + ] + }, + "payment_method_options_card_present_routing": { + "description": "", + "properties": { + "requested_priority": { + "description": "Requested routing priority", + "enum": ["domestic", "international"], + "nullable": true, + "type": "string" + } + }, + "required": ["requested_priority"], + "title": "payment_method_options_card_present_routing", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["requested_priority"], + "x-stripeResource": { "class_name": "Routing", "in_package": "" } + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "payment_method_options_crypto": { + "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_method_options_crypto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/$defs/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" + } + }, + "required": ["funding_type"], + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": ["bank_transfer"], + "x-stripeMostCommon": ["bank_transfer", "funding_type", "setup_future_usage"] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/$defs/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 + } + }, + "required": ["type"], + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"], + "x-stripeMostCommon": ["eu_bank_transfer", "requested_address_types", "type"] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `DE`, `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": [], + "x-stripeMostCommon": ["country"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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", "off_session", "on_session"], + "type": "string" + } + }, + "required": ["preferred_locale"], + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["capture_method", "preferred_locale", "setup_future_usage"] + }, + "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" + } + }, + "required": [ + "confirmation_number", + "expires_after_days", + "expires_at", + "product_description" + ], + "title": "payment_method_options_konbini", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "confirmation_number", + "expires_after_days", + "expires_at", + "product_description", + "setup_future_usage" + ] + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "payment_method_options_mandate_options_upi": { + "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": 20, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "End date of the mandate or subscription.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": ["amount", "amount_type", "description", "end_date"], + "title": "payment_method_options_mandate_options_upi", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "amount_type", "description", "end_date"] + }, + "payment_method_options_mb_way": { + "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_mb_way", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["expires_after_days", "setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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" + } + }, + "required": ["preferred_locale", "reference"], + "title": "payment_method_options_paypal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "capture_method", + "preferred_locale", + "reference", + "setup_future_usage" + ] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "amount_includes_iof": { + "description": "Determines if the amount includes the IOF tax.", + "enum": ["always", "never"], + "type": "string" + }, + "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", + "x-stripeBypassValidation": true + } + }, + "required": ["expires_after_seconds", "expires_at"], + "title": "payment_method_options_pix", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "amount_includes_iof", + "expires_after_seconds", + "expires_at", + "setup_future_usage" + ] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["capture_method", "setup_future_usage"] + }, + "payment_method_options_satispay": { + "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_satispay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["capture_method"] + }, + "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" + } + }, + "required": ["preferred_language"], + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["preferred_language", "setup_future_usage"] + }, + "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", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_twint", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "payment_method_options_upi": { + "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": ["off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_method_options_upi", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["collection_method"] + }, + "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" + } + }, + "required": ["app_id", "client"], + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["app_id", "client", "setup_future_usage"] + }, + "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": [], + "x-stripeMostCommon": ["setup_future_usage"] + }, + "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 + } + }, + "required": ["bank"], + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bank"] + }, + "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": [], + "x-stripeResource": { "class_name": "Payco", "in_package": "" } + }, + "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" + } + }, + "required": ["country", "payer_email", "payer_id"], + "title": "payment_method_paypal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["country", "payer_email", "payer_id"] + }, + "payment_method_payto": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch 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" + }, + "pay_id": { + "description": "The PayID alias for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["bsb_number", "last4", "pay_id"], + "title": "payment_method_payto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["bsb_number", "last4", "pay_id"] + }, + "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": [], + "x-stripeResource": { "class_name": "SamsungPay", "in_package": "" } + }, + "payment_method_satispay": { + "description": "", + "properties": {}, + "title": "payment_method_satispay", + "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": "#/$defs/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" + } + }, + "required": ["bank_code", "branch_code", "country", "fingerprint", "generated_from", "last4"], + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": ["generated_from"], + "x-stripeMostCommon": [ + "bank_code", + "branch_code", + "country", + "fingerprint", + "generated_from", + "last4" + ] + }, + "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" + } + }, + "required": ["country"], + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["country"] + }, + "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_upi": { + "description": "", + "properties": { + "vpa": { + "description": "Customer's unique Virtual Payment Address", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["vpa"], + "title": "payment_method_upi", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["vpa"] + }, + "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": "#/$defs/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": "#/$defs/payment_method_us_bank_account_status_details" }], + "description": "Contains information about the future reusability of this PaymentMethod.", + "nullable": true + } + }, + "required": [ + "account_holder_type", + "account_type", + "bank_name", + "financial_connections_account", + "fingerprint", + "last4", + "networks", + "routing_number", + "status_details" + ], + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": ["networks", "status_details"], + "x-stripeMostCommon": [ + "account_holder_type", + "account_type", + "bank_name", + "financial_connections_account", + "fingerprint", + "last4", + "networks", + "routing_number", + "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", + "tokenized_account_number_deactivated" + ], + "nullable": true, + "type": "string" + } + }, + "required": ["network_code", "reason"], + "title": "payment_method_us_bank_account_blocked", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["network_code", "reason"] + }, + "payment_method_us_bank_account_status_details": { + "description": "", + "properties": { "blocked": { "$ref": "#/$defs/payment_method_us_bank_account_blocked" } }, + "title": "payment_method_us_bank_account_status_details", + "type": "object", + "x-expandableFields": ["blocked"], + "x-stripeMostCommon": ["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_record": { + "description": "A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe.\nFor example, you can create a Payment Record to model a payment made on a different payment processor,\nin order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or\nmore Payment Attempt Records, which represent individual attempts made on a payment network.", + "properties": { + "amount": { "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" }, + "amount_authorized": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" + }, + "amount_canceled": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" + }, + "amount_failed": { "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" }, + "amount_guaranteed": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" + }, + "amount_refunded": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" + }, + "amount_requested": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_amount" + }, + "application": { + "description": "ID of the Connect application that created the PaymentRecord.", + "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_details": { + "anyOf": [ + { "$ref": "#/$defs/payments_primitives_payment_records_resource_customer_details" } + ], + "description": "Customer information for this payment.", + "nullable": true + }, + "customer_presence": { + "description": "Indicates whether the customer was present in your checkout flow during this payment.", + "enum": ["off_session", "on_session"], + "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" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "latest_payment_attempt_record": { + "description": "ID of the latest Payment Attempt Record attached to this Payment Record.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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_record"], + "type": "string" + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_details" + } + ], + "description": "Information about the Payment Method debited for this payment.", + "nullable": true + }, + "processor_details": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_processor_details" + }, + "reported_by": { + "description": "Indicates who reported the payment.", + "enum": ["self", "stripe"], + "type": "string" + }, + "shipping_details": { + "anyOf": [ + { "$ref": "#/$defs/payments_primitives_payment_records_resource_shipping_details" } + ], + "description": "Shipping information for this payment.", + "nullable": true + } + }, + "required": [ + "amount", + "amount_authorized", + "amount_canceled", + "amount_failed", + "amount_guaranteed", + "amount_refunded", + "amount_requested", + "application", + "created", + "customer_details", + "customer_presence", + "description", + "id", + "latest_payment_attempt_record", + "livemode", + "metadata", + "object", + "payment_method_details", + "processor_details", + "reported_by", + "shipping_details" + ], + "title": "PaymentRecord", + "type": "object", + "x-expandableFields": [ + "amount", + "amount_authorized", + "amount_canceled", + "amount_failed", + "amount_guaranteed", + "amount_refunded", + "amount_requested", + "customer_details", + "payment_method_details", + "processor_details", + "shipping_details" + ], + "x-resourceId": "payment_record", + "x-stripeMostCommon": [ + "amount", + "amount_authorized", + "amount_canceled", + "amount_failed", + "amount_guaranteed", + "amount_refunded", + "amount_requested", + "customer_details", + "customer_presence", + "description", + "id", + "metadata", + "payment_method_details", + "processor_details", + "shipping_details" + ], + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/payment_records/{id}" + }, + { + "method_name": "report_payment_attempt", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/{id}/report_payment_attempt" + }, + { + "method_name": "report_payment_attempt_canceled", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/{id}/report_payment_attempt_canceled" + }, + { + "method_name": "report_payment_attempt_failed", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/{id}/report_payment_attempt_failed" + }, + { + "method_name": "report_payment_attempt_guaranteed", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/{id}/report_payment_attempt_guaranteed" + }, + { + "method_name": "report_payment_attempt_informational", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/{id}/report_payment_attempt_informational" + }, + { + "method_name": "report_refund", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/{id}/report_refund" + }, + { + "method_name": "report_payment", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payment_records/report_payment" + } + ], + "x-stripeResource": { "class_name": "PaymentRecord", "in_package": "" } + }, + "payment_source": { + "anyOf": [ + { "$ref": "#/$defs/account" }, + { "$ref": "#/$defs/bank_account" }, + { "$ref": "#/$defs/card" }, + { "$ref": "#/$defs/source" } + ], + "title": "Polymorphic", + "x-resourceId": "payment_source", + "x-stripeBypassValidation": true, + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/customers/{customer}/sources" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/customers/{customer}/sources" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/sources/{id}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/sources/{id}" + }, + { + "method_name": "create", + "method_on": "collection", + "method_type": "create", + "operation": "post", + "path": "/v1/customers/{customer}/sources" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/customers/{customer}/sources" + } + ], + "x-stripeResource": { "class_name": "PaymentSource", "has_collection_class": true } + }, + "payments_primitives_payment_records_resource_address": { + "description": "A representation of a physical address.", + "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, such as the street, PO Box, or company name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2, such as the 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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["city", "country", "line1", "line2", "postal_code", "state"], + "title": "PaymentsPrimitivesPaymentRecordsResourceAddress", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["city", "country", "line1", "line2", "postal_code", "state"] + }, + "payments_primitives_payment_records_resource_amount": { + "description": "A representation of an amount of money, consisting of an amount and a currency.", + "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" + }, + "value": { + "description": "A positive integer representing the amount in the currency's [minor unit](https://docs.stripe.com/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.", + "type": "integer" + } + }, + "required": ["currency", "value"], + "title": "PaymentsPrimitivesPaymentRecordsResourceAmount", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["currency", "value"] + }, + "payments_primitives_payment_records_resource_billing_details": { + "description": "Billing details used by the customer for this payment.", + "properties": { + "address": { "$ref": "#/$defs/payments_primitives_payment_records_resource_address" }, + "email": { + "description": "The billing email associated with the method of payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "The billing name associated with the method of payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "The billing phone number associated with the method of payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["address", "email", "name", "phone"], + "title": "PaymentsPrimitivesPaymentRecordsResourceBillingDetails", + "type": "object", + "x-expandableFields": ["address"], + "x-stripeMostCommon": ["address", "email", "name", "phone"] + }, + "payments_primitives_payment_records_resource_customer_details": { + "description": "Information about the customer for this payment.", + "properties": { + "customer": { + "description": "ID of the Stripe Customer associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "The customer's name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["customer", "email", "name", "phone"], + "title": "PaymentsPrimitivesPaymentRecordsResourceCustomerDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["customer", "email", "name", "phone"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details": { + "description": "Details of the card used for this payment attempt.", + "properties": { + "authorization_code": { + "description": "The authorization code of the payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "brand": { + "description": "Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "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": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_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" + }, + "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.", + "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`.", + "enum": ["credit", "debit", "prepaid", "unknown"], + "nullable": true, + "type": "string" + }, + "iin": { + "description": "Issuer identification number of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_installments" + } + ], + "description": "Installment details for this payment.", + "nullable": true + }, + "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" + }, + "moto": { + "description": "True if this payment was marked as MOTO and out of scope for SCA.", + "nullable": true, + "type": "boolean" + }, + "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`.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "network_advice_code": { + "description": "Advice code from the card network for the failed payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_decline_code": { + "description": "Decline code from the card network for the failed payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_token": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_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" + }, + "stored_credential_usage": { + "description": "The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`.", + "enum": ["recurring", "unscheduled"], + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_three_d_secure" + } + ], + "description": "Populated if this transaction used 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet.", + "nullable": true + } + }, + "required": [ + "authorization_code", + "brand", + "checks", + "country", + "description", + "exp_month", + "exp_year", + "funding", + "iin", + "installments", + "issuer", + "last4", + "network", + "network_advice_code", + "network_decline_code", + "network_transaction_id", + "stored_credential_usage", + "three_d_secure", + "wallet" + ], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetails", + "type": "object", + "x-expandableFields": ["checks", "installments", "network_token", "three_d_secure", "wallet"], + "x-stripeMostCommon": [ + "authorization_code", + "brand", + "capture_before", + "checks", + "country", + "description", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "iin", + "installments", + "issuer", + "last4", + "moto", + "network", + "network_advice_code", + "network_decline_code", + "network_token", + "network_transaction_id", + "stored_credential_usage", + "three_d_secure", + "wallet" + ] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If you provide a value for `address.line1`, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "enum": ["fail", "pass", "unavailable", "unchecked"], + "nullable": true, + "type": "string" + }, + "address_postal_code_check": { + "description": "If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "enum": ["fail", "pass", "unavailable", "unchecked"], + "nullable": true, + "type": "string" + }, + "cvc_check": { + "description": "If you provide a CVC, the check results is one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "enum": ["fail", "pass", "unavailable", "unchecked"], + "nullable": true, + "type": "string" + } + }, + "required": ["address_line1_check", "address_postal_code_check", "cvc_check"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceChecks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["address_line1_check", "address_postal_code_check", "cvc_check"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_installment_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. One of `month`.", + "enum": ["month"], + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`, `revolving`, or `bonus`.", + "enum": ["bonus", "fixed_count", "revolving"], + "type": "string" + } + }, + "required": ["count", "interval", "type"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceInstallmentPlan", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["count", "interval", "type"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_installment_plan" + } + ], + "description": "Installment plan selected for the payment.", + "nullable": true + } + }, + "required": ["plan"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceInstallments", + "type": "object", + "x-expandableFields": ["plan"], + "x-stripeMostCommon": ["plan"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_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": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceNetworkToken", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["used"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_three_d_secure": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: Indicates how the issuing bank authenticated the customer.", + "enum": ["challenge", "frictionless"], + "nullable": true, + "type": "string" + }, + "cryptogram": { + "description": "The 3D Secure cryptogram, also known as the \"authentication value\" (AAV, CAVV or AEVV).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "electronic_commerce_indicator": { + "description": "The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed.", + "enum": ["01", "02", "03", "04", "05", "06", "07"], + "nullable": true, + "type": "string" + }, + "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 the outcome of Stripe's internal risk assessment.", + "nullable": true, + "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 on the `result`.", + "enum": [ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected" + ], + "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" + } + }, + "required": [ + "authentication_flow", + "cryptogram", + "electronic_commerce_indicator", + "exemption_indicator", + "exemption_indicator_applied", + "result", + "result_reason", + "version" + ], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceThreeDSecure", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "authentication_flow", + "cryptogram", + "electronic_commerce_indicator", + "exemption_indicator", + "exemption_indicator_applied", + "result", + "result_reason", + "version" + ] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": "string" + }, + "google_pay": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_google_pay" + }, + "type": { + "description": "The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWallet", + "type": "object", + "x-expandableFields": ["apple_pay", "google_pay"], + "x-stripeMostCommon": ["apple_pay", "dynamic_last4", "google_pay", "type"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_apple_pay": { + "description": "", + "properties": { + "type": { + "description": "Type of the apple_pay transaction, one of `apple_pay` or `apple_pay_later`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceApplePay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["type"] + }, + "payments_primitives_payment_records_resource_payment_method_card_details_resource_wallet_resource_google_pay": { + "description": "", + "properties": {}, + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCardDetailsResourceWalletResourceGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "payments_primitives_payment_records_resource_payment_method_custom_details": { + "description": "Custom Payment Methods represent Payment Method types not modeled directly in\nthe Stripe API. This resource consists of details about the custom payment method\nused for this payment attempt.", + "properties": { + "display_name": { + "description": "Display name for the custom (user-defined) payment method type used to make this payment.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The custom payment method type associated with this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["display_name", "type"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["display_name", "type"] + }, + "payments_primitives_payment_records_resource_payment_method_details": { + "description": "Details about the Payment Method used in this payment attempt.", + "properties": { + "ach_credit_transfer": { "$ref": "#/$defs/payment_method_details_ach_credit_transfer" }, + "ach_debit": { "$ref": "#/$defs/payment_method_details_ach_debit" }, + "acss_debit": { "$ref": "#/$defs/payment_method_details_acss_debit" }, + "affirm": { "$ref": "#/$defs/payment_method_details_payment_record_affirm" }, + "afterpay_clearpay": { + "$ref": "#/$defs/payment_method_details_payment_record_afterpay_clearpay" + }, + "alipay": { "$ref": "#/$defs/payment_flows_private_payment_methods_alipay_details" }, + "alma": { "$ref": "#/$defs/payment_method_details_alma" }, + "amazon_pay": { "$ref": "#/$defs/payment_method_details_amazon_pay" }, + "au_becs_debit": { "$ref": "#/$defs/payment_method_details_au_becs_debit" }, + "bacs_debit": { "$ref": "#/$defs/payment_method_details_bacs_debit" }, + "bancontact": { "$ref": "#/$defs/payment_method_details_payment_record_bancontact" }, + "billie": { "$ref": "#/$defs/payment_method_details_billie" }, + "billing_details": { + "anyOf": [ + { "$ref": "#/$defs/payments_primitives_payment_records_resource_billing_details" } + ], + "description": "The billing details associated with the method of payment.", + "nullable": true + }, + "blik": { "$ref": "#/$defs/payment_method_details_blik" }, + "boleto": { "$ref": "#/$defs/payment_method_details_payment_record_boleto" }, + "card": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_card_details" + }, + "card_present": { "$ref": "#/$defs/payment_method_details_card_present" }, + "cashapp": { "$ref": "#/$defs/payment_method_details_payment_record_cashapp" }, + "crypto": { "$ref": "#/$defs/payment_method_details_crypto" }, + "custom": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_payment_method_custom_details" + }, + "customer_balance": { "$ref": "#/$defs/payment_method_details_customer_balance" }, + "eps": { "$ref": "#/$defs/payment_method_details_eps" }, + "fpx": { "$ref": "#/$defs/payment_method_details_fpx" }, + "giropay": { "$ref": "#/$defs/payment_method_details_payment_record_giropay" }, + "grabpay": { "$ref": "#/$defs/payment_method_details_grabpay" }, + "ideal": { "$ref": "#/$defs/payment_method_details_payment_record_ideal" }, + "interac_present": { "$ref": "#/$defs/payment_method_details_interac_present" }, + "kakao_pay": { "$ref": "#/$defs/payment_method_details_payment_record_kakao_pay" }, + "klarna": { "$ref": "#/$defs/payment_method_details_klarna" }, + "konbini": { "$ref": "#/$defs/payment_method_details_payment_record_konbini" }, + "kr_card": { "$ref": "#/$defs/payment_method_details_kr_card" }, + "link": { "$ref": "#/$defs/payment_method_details_link" }, + "mb_way": { "$ref": "#/$defs/payment_method_details_payment_record_mb_way" }, + "mobilepay": { "$ref": "#/$defs/payment_method_details_payment_record_mobilepay" }, + "multibanco": { "$ref": "#/$defs/payment_method_details_payment_record_multibanco" }, + "naver_pay": { "$ref": "#/$defs/payment_method_details_payment_record_naver_pay" }, + "nz_bank_account": { "$ref": "#/$defs/payment_method_details_nz_bank_account" }, + "oxxo": { "$ref": "#/$defs/payment_method_details_payment_record_oxxo" }, + "p24": { "$ref": "#/$defs/payment_method_details_p24" }, + "pay_by_bank": { "$ref": "#/$defs/payment_method_details_pay_by_bank" }, + "payco": { "$ref": "#/$defs/payment_method_details_payment_record_payco" }, + "payment_method": { + "description": "ID of the Stripe PaymentMethod used to make this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "paynow": { "$ref": "#/$defs/payment_method_details_payment_record_paynow" }, + "paypal": { "$ref": "#/$defs/payment_method_details_paypal" }, + "payto": { "$ref": "#/$defs/payment_method_details_payto" }, + "pix": { "$ref": "#/$defs/payment_method_details_payment_record_pix" }, + "promptpay": { "$ref": "#/$defs/payment_method_details_payment_record_promptpay" }, + "revolut_pay": { "$ref": "#/$defs/payment_method_details_revolut_pay" }, + "samsung_pay": { "$ref": "#/$defs/payment_method_details_payment_record_samsung_pay" }, + "satispay": { "$ref": "#/$defs/payment_method_details_satispay" }, + "sepa_credit_transfer": { "$ref": "#/$defs/payment_method_details_sepa_credit_transfer" }, + "sepa_debit": { "$ref": "#/$defs/payment_method_details_payment_record_sepa_debit" }, + "sofort": { "$ref": "#/$defs/payment_method_details_payment_record_sofort" }, + "stripe_account": { "$ref": "#/$defs/payment_method_details_stripe_account" }, + "swish": { "$ref": "#/$defs/payment_method_details_payment_record_swish" }, + "twint": { "$ref": "#/$defs/payment_method_details_payment_record_twint" }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://docs.stripe.com/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" + }, + "upi": { "$ref": "#/$defs/payment_method_details_upi" }, + "us_bank_account": { + "$ref": "#/$defs/payment_method_details_payment_record_us_bank_account" + }, + "wechat": { "$ref": "#/$defs/payment_method_details_wechat" }, + "wechat_pay": { "$ref": "#/$defs/payment_method_details_payment_record_wechat_pay" }, + "zip": { "$ref": "#/$defs/payment_method_details_payment_record_zip" } + }, + "required": ["billing_details", "payment_method", "type"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "stripe_account", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat", + "wechat_pay", + "zip" + ], + "x-stripeMostCommon": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "payment_method", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sofort", + "stripe_account", + "swish", + "twint", + "type", + "upi", + "us_bank_account", + "wechat", + "wechat_pay", + "zip" + ] + }, + "payments_primitives_payment_records_resource_payment_method_konbini_details_resource_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", + "x-stripeBypassValidation": true + } + }, + "required": ["chain"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodKonbiniDetailsResourceStore", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["chain"] + }, + "payments_primitives_payment_records_resource_payment_method_mobilepay_details_resource_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" + } + }, + "required": ["brand", "country", "exp_month", "exp_year", "last4"], + "title": "PaymentsPrimitivesPaymentRecordsResourcePaymentMethodMobilepayDetailsResourceCard", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["brand", "country", "exp_month", "exp_year", "last4"] + }, + "payments_primitives_payment_records_resource_processor_details": { + "description": "Processor information associated with this payment.", + "properties": { + "custom": { + "$ref": "#/$defs/payments_primitives_payment_records_resource_processor_details_resource_custom_details" + }, + "type": { + "description": "The processor used for this payment attempt.", + "enum": ["custom"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "PaymentsPrimitivesPaymentRecordsResourceProcessorDetails", + "type": "object", + "x-expandableFields": ["custom"], + "x-stripeMostCommon": ["custom", "type"] + }, + "payments_primitives_payment_records_resource_processor_details_resource_custom_details": { + "description": "Custom processors represent payment processors not modeled directly in\nthe Stripe API. This resource consists of details about the custom processor\nused for this payment attempt.", + "properties": { + "payment_reference": { + "description": "An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["payment_reference"], + "title": "PaymentsPrimitivesPaymentRecordsResourceProcessorDetailsResourceCustomDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["payment_reference"] + }, + "payments_primitives_payment_records_resource_shipping_details": { + "description": "The customer's shipping information associated with this payment.", + "properties": { + "address": { "$ref": "#/$defs/payments_primitives_payment_records_resource_address" }, + "name": { + "description": "The shipping recipient's name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "The shipping recipient's phone number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["address", "name", "phone"], + "title": "PaymentsPrimitivesPaymentRecordsResourceShippingDetails", + "type": "object", + "x-expandableFields": ["address"], + "x-stripeMostCommon": ["address", "name", "phone"] + }, + "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://docs.stripe.com/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": "#/$defs/application_fee" }], + "description": "The application fee (if any) for the payout. [See the Connect documentation](https://docs.stripe.com/connect/instant-payouts#monetization-and-fees) for details.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/application_fee" }] } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/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": "#/$defs/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": "#/$defs/external_account" }, + { "$ref": "#/$defs/deleted_external_account" } + ], + "description": "ID of the bank account or card the payout is sent to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { "$ref": "#/$defs/external_account" }, + { "$ref": "#/$defs/deleted_external_account" } + ] + } + }, + "failure_balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/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": "#/$defs/balance_transaction" }] } + }, + "failure_code": { + "description": "Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://docs.stripe.com/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/payout" }], + "description": "If the payout reverses another, this is the ID of the original payout.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payout" }] } + }, + "payout_method": { + "description": "ID of the v2 FinancialAccount the funds are sent to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reconciliation_status": { + "description": "If `completed`, you can use the [Balance Transactions API](https://docs.stripe.com/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": "#/$defs/payout" }], + "description": "If the payout reverses, this is the ID of the payout that reverses this payout.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/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", + "application_fee", + "application_fee_amount", + "arrival_date", + "automatic", + "balance_transaction", + "created", + "currency", + "description", + "destination", + "failure_balance_transaction", + "failure_code", + "failure_message", + "id", + "livemode", + "metadata", + "method", + "object", + "original_payout", + "payout_method", + "reconciliation_status", + "reversed_by", + "source_type", + "statement_descriptor", + "status", + "trace_id", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "application_fee", + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by", + "trace_id" + ], + "x-resourceId": "payout", + "x-stripeMostCommon": [ + "amount", + "arrival_date", + "currency", + "description", + "id", + "metadata", + "statement_descriptor", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/payouts" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/payouts/{payout}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/payouts" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/payouts/{payout}" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payouts/{payout}/cancel" + }, + { + "method_name": "reverse", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/payouts/{payout}/reverse" + } + ], + "x-stripeResource": { + "class_name": "Payout", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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", "value"], + "title": "PayoutsTraceID", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["status", "value"] + }, + "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": ["dispute_categories", "status"], + "title": "paypal_seller_protection", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["dispute_categories", "status"] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.\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": "#/$defs/person_additional_tos_acceptances" }, + "address": { "$ref": "#/$defs/address" }, + "address_kana": { + "anyOf": [{ "$ref": "#/$defs/legal_entity_japan_address" }], + "description": "The Kana variation of the person's address (Japan only).", + "nullable": true + }, + "address_kanji": { + "anyOf": [{ "$ref": "#/$defs/legal_entity_japan_address" }], + "description": "The Kanji variation of the person's address (Japan only).", + "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": "#/$defs/legal_entity_dob" }, + "email": { + "description": "The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "future_requirements": { + "anyOf": [{ "$ref": "#/$defs/person_future_requirements" }], + "description": "Information about the [upcoming new requirements for this person](https://docs.stripe.com/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.", + "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. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.", + "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://docs.stripe.com/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": "#/$defs/address" }, + "relationship": { "$ref": "#/$defs/person_relationship" }, + "requirements": { + "anyOf": [{ "$ref": "#/$defs/person_requirements" }], + "description": "Information about the requirements for this person, including what information needs to be collected, and by when.", + "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" + }, + "us_cfpb_data": { + "anyOf": [{ "$ref": "#/$defs/person_us_cfpb_data" }], + "description": "Demographic data related to the person.", + "nullable": true + }, + "verification": { "$ref": "#/$defs/legal_entity_person_verification" } + }, + "required": ["created", "id", "object"], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "additional_tos_acceptances", + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "us_cfpb_data", + "verification" + ], + "x-resourceId": "person", + "x-stripeMostCommon": [ + "account", + "address", + "dob", + "email", + "first_name", + "id", + "last_name", + "metadata", + "phone", + "relationship", + "requirements" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/accounts/{account}/persons/{person}" + }, + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/accounts/{account}/persons" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/accounts/{account}/persons" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/accounts/{account}/persons/{person}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/accounts/{account}/persons/{person}" + }, + { + "method_name": "create", + "method_on": "collection", + "method_type": "create", + "operation": "post", + "path": "/v1/accounts/{account}/persons" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/accounts/{account}/persons" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/accounts/{account}/persons/{person}" + } + ], + "x-stripeResource": { "class_name": "Person", "has_collection_class": true, "in_package": "" } + }, + "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" + } + }, + "required": ["date", "ip", "user_agent"], + "title": "PersonAdditionalTOSAcceptance", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["date", "ip", "user_agent"] + }, + "person_additional_tos_acceptances": { + "description": "", + "properties": { + "account": { + "anyOf": [{ "$ref": "#/$defs/person_additional_tos_acceptance" }], + "description": "Details on the legal guardian's acceptance of the main Stripe service agreement.", + "nullable": true + } + }, + "required": ["account"], + "title": "PersonAdditionalTOSAcceptances", + "type": "object", + "x-expandableFields": ["account"], + "x-stripeMostCommon": ["account"] + }, + "person_ethnicity_details": { + "description": "", + "properties": { + "ethnicity": { + "description": "The persons ethnicity", + "items": { + "enum": [ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "ethnicity_other": { + "description": "Please specify your origin, when other is selected.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["ethnicity", "ethnicity_other"], + "title": "PersonEthnicityDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["ethnicity", "ethnicity_other"] + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.", + "items": { "$ref": "#/$defs/account_requirements_alternative" }, + "nullable": true, + "type": "array" + }, + "currently_due": { + "description": "Fields that need to be resolved to keep the person's account enabled. If not resolved 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": "Details about validation and verification failures for `due` requirements that must be resolved.", + "items": { "$ref": "#/$defs/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 haven't been resolved by the account's `requirements.current_deadline`. These fields need to be resolved to enable the person's account. `future_requirements.past_due` is a subset of `requirements.past_due`.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + } + }, + "required": [ + "alternatives", + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"], + "x-stripeMostCommon": [ + "alternatives", + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ] + }, + "person_race_details": { + "description": "", + "properties": { + "race": { + "description": "The persons race.", + "items": { + "enum": [ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "race_other": { + "description": "Please specify your race, when other is selected.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["race", "race_other"], + "title": "PersonRaceDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["race", "race_other"] + }, + "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" + } + }, + "required": [ + "authorizer", + "director", + "executive", + "legal_guardian", + "owner", + "percent_ownership", + "representative", + "title" + ], + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "authorizer", + "director", + "executive", + "legal_guardian", + "owner", + "percent_ownership", + "representative", + "title" + ] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be resolved by providing the corresponding alternative fields instead. Many alternatives can list the same `original_fields_due`, and any of these alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing `original_fields_due` also serves as a pathway for attempting to resolve the fields again.", + "items": { "$ref": "#/$defs/account_requirements_alternative" }, + "nullable": true, + "type": "array" + }, + "currently_due": { + "description": "Fields that need to be resolved to keep the person's account enabled. If not resolved by the account's `current_deadline`, these fields will appear in `past_due` as well, and the account is disabled.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "errors": { + "description": "Details about validation and verification failures for `due` requirements that must be resolved.", + "items": { "$ref": "#/$defs/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 haven't been resolved by `current_deadline`. These fields need to be resolved to enable the person's account.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending.", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + } + }, + "required": [ + "alternatives", + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"], + "x-stripeMostCommon": [ + "alternatives", + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ] + }, + "person_us_cfpb_data": { + "description": "", + "properties": { + "ethnicity_details": { + "anyOf": [{ "$ref": "#/$defs/person_ethnicity_details" }], + "description": "The persons ethnicity details", + "nullable": true + }, + "race_details": { + "anyOf": [{ "$ref": "#/$defs/person_race_details" }], + "description": "The persons race details", + "nullable": true + }, + "self_identified_gender": { + "description": "The persons self-identified gender", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["ethnicity_details", "race_details", "self_identified_gender"], + "title": "PersonUSCfpbData", + "type": "object", + "x-expandableFields": ["ethnicity_details", "race_details"], + "x-stripeMostCommon": ["ethnicity_details", "race_details", "self_identified_gender"] + }, + "plan": { + "description": "You can now model subscriptions more flexibly using the [Prices API](https://api.stripe.com#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://api.stripe.com#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://docs.stripe.com/billing/subscriptions/set-up-subscription) and more about [products and prices](https://docs.stripe.com/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the plan can be used for new purchases.", + "type": "boolean" + }, + "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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/product" }, + { "$ref": "#/$defs/deleted_product" } + ], + "description": "The product whose pricing this plan determines.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/product" }, { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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://docs.stripe.com/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", + "amount", + "amount_decimal", + "billing_scheme", + "created", + "currency", + "id", + "interval", + "interval_count", + "livemode", + "metadata", + "meter", + "nickname", + "object", + "product", + "tiers_mode", + "transform_usage", + "trial_period_days", + "usage_type" + ], + "title": "Plan", + "type": "object", + "x-expandableFields": ["product", "tiers", "transform_usage"], + "x-resourceId": "plan", + "x-stripeMostCommon": [ + "active", + "amount", + "currency", + "id", + "interval", + "metadata", + "nickname", + "product" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/plans/{plan}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/plans" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/plans/{plan}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/plans" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/plans/{plan}" + } + ], + "x-stripeResource": { "class_name": "Plan", "has_collection_class": true, "in_package": "" } + }, + "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" + } + }, + "required": [ + "flat_amount", + "flat_amount_decimal", + "unit_amount", + "unit_amount_decimal", + "up_to" + ], + "title": "PlanTier", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "flat_amount", + "flat_amount_decimal", + "unit_amount", + "unit_amount_decimal", + "up_to" + ] + }, + "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.", + "enum": ["charge", "payout"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "PlatformEarningFeeSource", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["charge", "payout", "type"] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://api.stripe.com#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://docs.stripe.com/billing/subscriptions/set-up-subscription), [create an invoice](https://docs.stripe.com/billing/invoices/create), and more about [products and prices](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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://docs.stripe.com/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": "#/$defs/product" }, + { "$ref": "#/$defs/deleted_product" } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/product" }, { "$ref": "#/$defs/deleted_product" }] + } + }, + "recurring": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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": "#/$defs/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": "#/$defs/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", + "custom_unit_amount", + "id", + "livemode", + "lookup_key", + "metadata", + "nickname", + "object", + "product", + "recurring", + "tax_behavior", + "tiers_mode", + "transform_quantity", + "type", + "unit_amount", + "unit_amount_decimal" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price", + "x-stripeMostCommon": [ + "active", + "currency", + "id", + "metadata", + "nickname", + "product", + "recurring", + "tax_behavior", + "type", + "unit_amount" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/prices" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/prices/{price}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/prices/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/prices" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/prices/{price}" + } + ], + "x-stripeResource": { + "class_name": "Price", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "" + } + }, + "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" + } + }, + "required": [ + "flat_amount", + "flat_amount_decimal", + "unit_amount", + "unit_amount_decimal", + "up_to" + ], + "title": "PriceTier", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "flat_amount", + "flat_amount_decimal", + "unit_amount", + "unit_amount_decimal", + "up_to" + ] + }, + "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://api.stripe.com#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://docs.stripe.com/payment-links),\n[accept payments with Checkout](https://docs.stripe.com/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://docs.stripe.com/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": "#/$defs/price" }], + "description": "The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "marketing_features": { + "description": "A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table).", + "items": { "$ref": "#/$defs/product_marketing_feature" }, + "type": "array" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/tax_code" }], + "description": "A [tax code](https://docs.stripe.com/tax/tax-categories) ID.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/tax_code" }] } + }, + "type": { + "description": "The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.", + "enum": ["good", "service"], + "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": 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", + "description", + "id", + "images", + "livemode", + "marketing_features", + "metadata", + "name", + "object", + "package_dimensions", + "shippable", + "type", + "updated", + "url" + ], + "title": "Product", + "type": "object", + "x-expandableFields": [ + "default_price", + "marketing_features", + "package_dimensions", + "tax_code" + ], + "x-resourceId": "product", + "x-stripeMostCommon": [ + "active", + "default_price", + "description", + "id", + "metadata", + "name", + "tax_code" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/products/{id}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/products" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/products/{id}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/products/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/products" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/products/{id}" + } + ], + "x-stripeResource": { + "class_name": "Product", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "" + } + }, + "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": [], + "x-stripeMostCommon": ["name"] + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for an underlying promotion.\nYou can create multiple codes for a single promotion.\n\nIf you enable promotion codes in your [customer portal configuration](https://docs.stripe.com/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal.\nCustomers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.", + "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), digits (0-9), and dashes (-).", + "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" + }, + "customer": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "The customer who can use this promotion code.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "The account representing the customer who can use this promotion code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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://docs.stripe.com/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" + }, + "promotion": { "$ref": "#/$defs/promotion_codes_resource_promotion" }, + "restrictions": { "$ref": "#/$defs/promotion_codes_resource_restrictions" }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "created", + "customer", + "customer_account", + "expires_at", + "id", + "livemode", + "max_redemptions", + "metadata", + "object", + "promotion", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": ["customer", "promotion", "restrictions"], + "x-resourceId": "promotion_code", + "x-stripeMostCommon": ["code", "id", "metadata", "promotion"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/promotion_codes" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/promotion_codes/{promotion_code}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/promotion_codes" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/promotion_codes/{promotion_code}" + } + ], + "x-stripeResource": { + "class_name": "PromotionCode", + "has_collection_class": true, + "in_package": "" + } + }, + "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": [], + "x-stripeMostCommon": ["minimum_amount"] + }, + "promotion_codes_resource_promotion": { + "description": "", + "properties": { + "coupon": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/coupon" }], + "description": "If promotion `type` is `coupon`, the coupon for this promotion.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/coupon" }] } + }, + "type": { "description": "The type of promotion.", "enum": ["coupon"], "type": "string" } + }, + "required": ["coupon", "type"], + "title": "PromotionCodesResourcePromotion", + "type": "object", + "x-expandableFields": ["coupon"], + "x-stripeMostCommon": ["coupon", "type"] + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { "$ref": "#/$defs/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", "minimum_amount", "minimum_amount_currency"], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": ["currency_options"], + "x-stripeMostCommon": [ + "currency_options", + "first_time_transaction", + "minimum_amount", + "minimum_amount_currency" + ] + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "A [Radar Session](https://docs.stripe.com/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": [], + "x-stripeMostCommon": ["session"] + }, + "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" + } + }, + "required": ["city", "country", "latitude", "longitude", "region"], + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["city", "country", "latitude", "longitude", "region"] + }, + "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" + } + }, + "required": ["browser", "device", "platform", "version"], + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["browser", "device", "platform", "version"] + }, + "recurring": { + "description": "", + "properties": { + "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" + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://docs.stripe.com/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": ["interval", "interval_count", "meter", "trial_period_days", "usage_type"], + "title": "Recurring", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["interval"] + }, + "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://docs.stripe.com/refunds)", + "properties": { + "amount": { "description": "Amount, in cents (or local equivalent).", "type": "integer" }, + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/balance_transaction" } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/balance_transaction" }] } + }, + "charge": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/charge" }], + "description": "ID of the charge that's refunded.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/refund_destination_details" }, + "failure_balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/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": "#/$defs/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://docs.stripe.com/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": "#/$defs/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": "#/$defs/payment_intent" }], + "description": "ID of the PaymentIntent that's refunded.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_intent" }] } + }, + "pending_reason": { + "description": "Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`.", + "enum": ["charge_pending", "insufficient_funds", "processing"], + "type": "string" + }, + "presentment_details": { + "$ref": "#/$defs/payment_flows_payment_intent_presentment_details" + }, + "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": "#/$defs/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": "#/$defs/transfer_reversal" }] } + }, + "status": { + "description": "Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://docs.stripe.com/refunds#failed-refunds).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transfer_reversal": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/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": "#/$defs/transfer_reversal" }] } + } + }, + "required": [ + "amount", + "balance_transaction", + "charge", + "created", + "currency", + "id", + "metadata", + "object", + "payment_intent", + "reason", + "receipt_number", + "source_transfer_reversal", + "status", + "transfer_reversal" + ], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "destination_details", + "failure_balance_transaction", + "next_action", + "payment_intent", + "presentment_details", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund", + "x-stripeMostCommon": [ + "amount", + "charge", + "currency", + "description", + "id", + "metadata", + "payment_intent", + "reason", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/charges/{charge}/refunds" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/charges/{charge}/refunds/{refund}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/refunds" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/refunds/{refund}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/refunds" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/refunds/{refund}" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/refunds/{refund}/cancel" + }, + { + "method_name": "expire", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/refunds/{refund}/expire" + } + ], + "x-stripeResource": { + "class_name": "Refund", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "refund_destination_details": { + "description": "", + "properties": { + "affirm": { "$ref": "#/$defs/destination_details_unimplemented" }, + "afterpay_clearpay": { "$ref": "#/$defs/destination_details_unimplemented" }, + "alipay": { "$ref": "#/$defs/destination_details_unimplemented" }, + "alma": { "$ref": "#/$defs/destination_details_unimplemented" }, + "amazon_pay": { "$ref": "#/$defs/destination_details_unimplemented" }, + "au_bank_transfer": { "$ref": "#/$defs/destination_details_unimplemented" }, + "blik": { "$ref": "#/$defs/refund_destination_details_blik" }, + "br_bank_transfer": { "$ref": "#/$defs/refund_destination_details_br_bank_transfer" }, + "card": { "$ref": "#/$defs/refund_destination_details_card" }, + "cashapp": { "$ref": "#/$defs/destination_details_unimplemented" }, + "crypto": { "$ref": "#/$defs/refund_destination_details_crypto" }, + "customer_cash_balance": { "$ref": "#/$defs/destination_details_unimplemented" }, + "eps": { "$ref": "#/$defs/destination_details_unimplemented" }, + "eu_bank_transfer": { "$ref": "#/$defs/refund_destination_details_eu_bank_transfer" }, + "gb_bank_transfer": { "$ref": "#/$defs/refund_destination_details_gb_bank_transfer" }, + "giropay": { "$ref": "#/$defs/destination_details_unimplemented" }, + "grabpay": { "$ref": "#/$defs/destination_details_unimplemented" }, + "jp_bank_transfer": { "$ref": "#/$defs/refund_destination_details_jp_bank_transfer" }, + "klarna": { "$ref": "#/$defs/destination_details_unimplemented" }, + "mb_way": { "$ref": "#/$defs/refund_destination_details_mb_way" }, + "multibanco": { "$ref": "#/$defs/refund_destination_details_multibanco" }, + "mx_bank_transfer": { "$ref": "#/$defs/refund_destination_details_mx_bank_transfer" }, + "nz_bank_transfer": { "$ref": "#/$defs/destination_details_unimplemented" }, + "p24": { "$ref": "#/$defs/refund_destination_details_p24" }, + "paynow": { "$ref": "#/$defs/destination_details_unimplemented" }, + "paypal": { "$ref": "#/$defs/refund_destination_details_paypal" }, + "pix": { "$ref": "#/$defs/destination_details_unimplemented" }, + "revolut": { "$ref": "#/$defs/destination_details_unimplemented" }, + "sofort": { "$ref": "#/$defs/destination_details_unimplemented" }, + "swish": { "$ref": "#/$defs/refund_destination_details_swish" }, + "th_bank_transfer": { "$ref": "#/$defs/refund_destination_details_th_bank_transfer" }, + "twint": { "$ref": "#/$defs/destination_details_unimplemented" }, + "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": "#/$defs/refund_destination_details_us_bank_transfer" }, + "wechat_pay": { "$ref": "#/$defs/destination_details_unimplemented" }, + "zip": { "$ref": "#/$defs/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", + "crypto", + "customer_cash_balance", + "eps", + "eu_bank_transfer", + "gb_bank_transfer", + "giropay", + "grabpay", + "jp_bank_transfer", + "klarna", + "mb_way", + "multibanco", + "mx_bank_transfer", + "nz_bank_transfer", + "p24", + "paynow", + "paypal", + "pix", + "revolut", + "sofort", + "swish", + "th_bank_transfer", + "twint", + "us_bank_transfer", + "wechat_pay", + "zip" + ], + "x-stripeMostCommon": [ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_bank_transfer", + "blik", + "br_bank_transfer", + "card", + "cashapp", + "crypto", + "customer_cash_balance", + "eps", + "eu_bank_transfer", + "gb_bank_transfer", + "giropay", + "grabpay", + "jp_bank_transfer", + "klarna", + "mb_way", + "multibanco", + "mx_bank_transfer", + "nz_bank_transfer", + "p24", + "paynow", + "paypal", + "pix", + "revolut", + "sofort", + "swish", + "th_bank_transfer", + "twint", + "type", + "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" + } + }, + "required": ["network_decline_code", "reference", "reference_status"], + "title": "refund_destination_details_blik", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["network_decline_code", "reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_br_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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": [], + "x-stripeMostCommon": ["reference", "reference_status", "reference_type", "type"] + }, + "refund_destination_details_crypto": { + "description": "", + "properties": { + "reference": { + "description": "The transaction hash of the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["reference"], + "title": "refund_destination_details_crypto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_eu_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_gb_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_jp_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "refund_destination_details_mb_way": { + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_mb_way", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_multibanco", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_mx_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_p24", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "refund_destination_details_paypal": { + "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" + } + }, + "required": ["network_decline_code"], + "title": "refund_destination_details_paypal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["network_decline_code"] + }, + "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" + } + }, + "required": ["network_decline_code", "reference", "reference_status"], + "title": "refund_destination_details_swish", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["network_decline_code", "reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_th_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "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" + } + }, + "required": ["reference", "reference_status"], + "title": "refund_destination_details_us_bank_transfer", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["reference", "reference_status"] + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["display_details", "type"] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["email_sent", "expires_at"] + }, + "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", "description", "id", "object"], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "currency", "description", "id", "object"], + "x-stripeResource": { + "class_name": "ReserveTransaction", + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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://docs.stripe.com/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": "#/$defs/charge" }], + "description": "The charge associated with this review.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`.", + "enum": [ + "acknowledged", + "approved", + "canceled", + "disputed", + "payment_never_settled", + "redacted", + "refunded", + "refunded_as_fraud" + ], + "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" + }, + "ip_address": { + "description": "The IP address where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "ip_address_location": { + "anyOf": [{ "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/payment_intent" }], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_intent" }] } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [{ "$ref": "#/$defs/radar_review_resource_session" }], + "description": "Information related to the browsing session of the user who initiated the payment.", + "nullable": true + } + }, + "required": [ + "billing_zip", + "charge", + "closed_reason", + "created", + "id", + "ip_address", + "ip_address_location", + "livemode", + "object", + "open", + "opened_reason", + "reason", + "session" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": ["charge", "ip_address_location", "payment_intent", "session"], + "x-resourceId": "review", + "x-stripeMostCommon": ["charge", "id", "open", "payment_intent", "reason"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/reviews" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/reviews/{review}" + }, + { + "method_name": "approve", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/reviews/{review}/approve" + } + ], + "x-stripeResource": { "class_name": "Review", "has_collection_class": true, "in_package": "" } + }, + "revolut_pay_underlying_payment_method_funding_details": { + "description": "", + "properties": { + "card": { "$ref": "#/$defs/payment_method_details_passthrough_card" }, + "type": { + "description": "funding type of the underlying payment method.", + "enum": ["card"], + "nullable": true, + "type": "string" + } + }, + "required": ["type"], + "title": "revolut_pay_underlying_payment_method_funding_details", + "type": "object", + "x-expandableFields": ["card"], + "x-stripeMostCommon": ["card", "type"] + }, + "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": [], + "x-stripeMostCommon": ["action", "id", "predicate"], + "x-stripeResource": { "class_name": "Rule", "in_package": "Radar" } + }, + "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": "#/$defs/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": ["disabled_reason", "enabled", "liability"], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"], + "x-stripeMostCommon": ["disabled_reason", "enabled", "liability"] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/charge" }], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/charge" }] } + }, + "setup_attempt": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/setup_attempt" }], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/setup_attempt" }] } + } + }, + "required": ["charge", "setup_attempt"], + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": ["charge", "setup_attempt"], + "x-stripeMostCommon": ["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": "#/$defs/application" }], + "description": "The value of [application](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "The value of [customer](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "The value of [customer_account](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation.", + "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" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/account" }], + "description": "The value of [on_behalf_of](https://docs.stripe.com/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": "#/$defs/account" }] } + }, + "payment_method": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_method" }], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "payment_method_details": { "$ref": "#/$defs/setup_attempt_payment_method_details" }, + "setup_error": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/setup_intent" }], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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": [ + "application", + "created", + "customer", + "customer_account", + "flow_directions", + "id", + "livemode", + "object", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "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", + "x-stripeMostCommon": [ + "application", + "attach_to_self", + "created", + "customer", + "customer_account", + "flow_directions", + "id", + "livemode", + "object", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent", + "status", + "usage" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/setup_attempts" + } + ], + "x-stripeResource": { + "class_name": "SetupAttempt", + "has_collection_class": true, + "in_package": "" + } + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { "$ref": "#/$defs/setup_attempt_payment_method_details_acss_debit" }, + "amazon_pay": { "$ref": "#/$defs/setup_attempt_payment_method_details_amazon_pay" }, + "au_becs_debit": { "$ref": "#/$defs/setup_attempt_payment_method_details_au_becs_debit" }, + "bacs_debit": { "$ref": "#/$defs/setup_attempt_payment_method_details_bacs_debit" }, + "bancontact": { "$ref": "#/$defs/setup_attempt_payment_method_details_bancontact" }, + "boleto": { "$ref": "#/$defs/setup_attempt_payment_method_details_boleto" }, + "card": { "$ref": "#/$defs/setup_attempt_payment_method_details_card" }, + "card_present": { "$ref": "#/$defs/setup_attempt_payment_method_details_card_present" }, + "cashapp": { "$ref": "#/$defs/setup_attempt_payment_method_details_cashapp" }, + "ideal": { "$ref": "#/$defs/setup_attempt_payment_method_details_ideal" }, + "kakao_pay": { "$ref": "#/$defs/setup_attempt_payment_method_details_kakao_pay" }, + "klarna": { "$ref": "#/$defs/setup_attempt_payment_method_details_klarna" }, + "kr_card": { "$ref": "#/$defs/setup_attempt_payment_method_details_kr_card" }, + "link": { "$ref": "#/$defs/setup_attempt_payment_method_details_link" }, + "naver_pay": { "$ref": "#/$defs/setup_attempt_payment_method_details_naver_pay" }, + "nz_bank_account": { + "$ref": "#/$defs/setup_attempt_payment_method_details_nz_bank_account" + }, + "paypal": { "$ref": "#/$defs/setup_attempt_payment_method_details_paypal" }, + "payto": { "$ref": "#/$defs/setup_attempt_payment_method_details_payto" }, + "revolut_pay": { "$ref": "#/$defs/setup_attempt_payment_method_details_revolut_pay" }, + "sepa_debit": { "$ref": "#/$defs/setup_attempt_payment_method_details_sepa_debit" }, + "sofort": { "$ref": "#/$defs/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" + }, + "upi": { "$ref": "#/$defs/setup_attempt_payment_method_details_upi" }, + "us_bank_account": { + "$ref": "#/$defs/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", + "naver_pay", + "nz_bank_account", + "paypal", + "payto", + "revolut_pay", + "sepa_debit", + "sofort", + "upi", + "us_bank_account" + ], + "x-stripeMostCommon": [ + "acss_debit", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "card_present", + "cashapp", + "ideal", + "kakao_pay", + "klarna", + "kr_card", + "link", + "naver_pay", + "nz_bank_account", + "paypal", + "payto", + "revolut_pay", + "sepa_debit", + "sofort", + "type", + "upi", + "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": [], + "x-stripeResource": { "class_name": "AuBecsDebit", "in_package": "" } + }, + "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": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + } + }, + "required": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "x-stripeResource": { "class_name": "Bancontact", "in_package": "" } + }, + "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`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "checks": { + "anyOf": [{ "$ref": "#/$defs/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" + }, + "description": { + "description": "A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)", + "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" + }, + "iin": { + "description": "Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuer": { + "description": "The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)", + "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": "#/$defs/three_d_secure_details" }], + "description": "Populated if this authorization used 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [{ "$ref": "#/$defs/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 + } + }, + "required": [ + "brand", + "checks", + "country", + "exp_month", + "exp_year", + "funding", + "last4", + "network", + "three_d_secure", + "wallet" + ], + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": ["checks", "three_d_secure", "wallet"], + "x-stripeMostCommon": [ + "brand", + "checks", + "country", + "description", + "exp_month", + "exp_year", + "fingerprint", + "funding", + "iin", + "issuer", + "last4", + "network", + "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" + } + }, + "required": ["address_line1_check", "address_postal_code_check", "cvc_check"], + "title": "setup_attempt_payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["address_line1_check", "address_postal_code_check", "cvc_check"] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_method" }], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "offline": { + "anyOf": [{ "$ref": "#/$defs/payment_method_details_card_present_offline" }], + "description": "Details about payments collected offline.", + "nullable": true + } + }, + "required": ["generated_card", "offline"], + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": ["generated_card", "offline"], + "x-stripeMostCommon": ["generated_card", "offline"], + "x-stripeResource": { "class_name": "CardPresent", "in_package": "" } + }, + "setup_attempt_payment_method_details_card_wallet": { + "description": "", + "properties": { + "apple_pay": { "$ref": "#/$defs/payment_method_details_card_wallet_apple_pay" }, + "google_pay": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["apple_pay", "google_pay", "type"] + }, + "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`, `adyen`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `mollie`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "adyen", + "asn_bank", + "bunq", + "buut", + "finom", + "handelsbanken", + "ing", + "knab", + "mollie", + "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", + "ADYBNL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "BUUTNL2A", + "FNOMNL22", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MLLENL2A", + "MOYONL21", + "NNBANL2G", + "NTSBDEB1", + "RABONL2U", + "RBRBNL21", + "REVOIE23", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + } + }, + "required": [ + "bank", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "verified_name" + ], + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "verified_name" + ] + }, + "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_naver_pay": { + "description": "", + "properties": { + "buyer_id": { + "description": "Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_naver_pay", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["buyer_id"] + }, + "setup_attempt_payment_method_details_nz_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_nz_bank_account", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "NzBankAccount", "in_package": "" } + }, + "setup_attempt_payment_method_details_paypal": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_paypal", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_payto": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_payto", + "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": [], + "x-stripeResource": { "class_name": "RevolutPay", "in_package": "" } + }, + "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": "#/$defs/payment_method" }], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "generated_sepa_debit_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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" + } + }, + "required": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ], + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": ["generated_sepa_debit", "generated_sepa_debit_mandate"], + "x-stripeMostCommon": [ + "bank_code", + "bank_name", + "bic", + "generated_sepa_debit", + "generated_sepa_debit_mandate", + "iban_last4", + "preferred_language", + "verified_name" + ] + }, + "setup_attempt_payment_method_details_upi": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_upi", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { "class_name": "UsBankAccount", "in_package": "" } + }, + "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://api.stripe.com#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://api.stripe.com#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://api.stripe.com#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": "#/$defs/application" }], + "description": "ID of the Connect application that created the SetupIntent.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/customer" }, + { "$ref": "#/$defs/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": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "ID of the Account this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent.", + "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" + }, + "excluded_payment_method_types": { + "description": "Payment method types that are excluded from this SetupIntent.", + "items": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "sofort", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "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" }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [{ "$ref": "#/$defs/api_errors" }], + "description": "The error encountered in the previous SetupIntent confirmation.", + "nullable": true + }, + "latest_attempt": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/setup_attempt" }], + "description": "The most recent SetupAttempt for this SetupIntent.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/setup_attempt" }] } + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/mandate" }] } + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/account" }], + "description": "The account (if any) for which the setup is intended.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "payment_method": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/payment_method" }] } + }, + "payment_method_configuration_details": { + "anyOf": [ + { "$ref": "#/$defs/payment_method_config_biz_payment_method_configuration_details" } + ], + "description": "Information about the [payment method configuration](https://docs.stripe.com/api/payment_method_configurations) used for this Setup Intent.", + "nullable": true + }, + "payment_method_options": { + "anyOf": [{ "$ref": "#/$defs/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. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).", + "items": { "maxLength": 5000, "type": "string" }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/mandate" }], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/mandate" }] } + }, + "status": { + "description": "[Status](https://docs.stripe.com/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": [ + "application", + "automatic_payment_methods", + "cancellation_reason", + "client_secret", + "created", + "customer", + "description", + "excluded_payment_method_types", + "id", + "last_setup_error", + "latest_attempt", + "livemode", + "mandate", + "metadata", + "next_action", + "object", + "on_behalf_of", + "payment_method", + "payment_method_configuration_details", + "payment_method_options", + "payment_method_types", + "single_use_mandate", + "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", + "x-stripeMostCommon": [ + "automatic_payment_methods", + "client_secret", + "customer", + "customer_account", + "description", + "id", + "last_setup_error", + "metadata", + "next_action", + "payment_method", + "status", + "usage" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/setup_intents" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/setup_intents/{intent}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/setup_intents" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/setup_intents/{intent}" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/setup_intents/{intent}/cancel" + }, + { + "method_name": "confirm", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/setup_intents/{intent}/confirm" + }, + { + "method_name": "verify_microdeposits", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/setup_intents/{intent}/verify_microdeposits" + } + ], + "x-stripeResource": { + "class_name": "SetupIntent", + "has_collection_class": true, + "in_package": "" + } + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "cashapp_handle_redirect_or_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code" + }, + "redirect_to_url": { "$ref": "#/$defs/setup_intent_next_action_redirect_to_url" }, + "type": { + "description": "Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "upi_handle_redirect_or_display_qr_code": { + "$ref": "#/$defs/payment_intent_next_action_upi_handle_redirect_or_display_qr_code" + }, + "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": "#/$defs/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", + "upi_handle_redirect_or_display_qr_code", + "verify_with_microdeposits" + ], + "x-stripeMostCommon": [ + "cashapp_handle_redirect_or_display_qr_code", + "redirect_to_url", + "type", + "upi_handle_redirect_or_display_qr_code", + "use_stripe_sdk", + "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" + } + }, + "required": ["return_url", "url"], + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["return_url", "url"], + "x-stripeResource": { "class_name": "NextActionRedirectToUrl", "in_package": "" } + }, + "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", "microdeposit_type"], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["arrival_date", "hosted_verification_url", "microdeposit_type"] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { "$ref": "#/$defs/setup_intent_payment_method_options_acss_debit" }, + "amazon_pay": { "$ref": "#/$defs/setup_intent_payment_method_options_amazon_pay" }, + "bacs_debit": { "$ref": "#/$defs/setup_intent_payment_method_options_bacs_debit" }, + "card": { "$ref": "#/$defs/setup_intent_payment_method_options_card" }, + "card_present": { "$ref": "#/$defs/setup_intent_payment_method_options_card_present" }, + "klarna": { "$ref": "#/$defs/setup_intent_payment_method_options_klarna" }, + "link": { "$ref": "#/$defs/setup_intent_payment_method_options_link" }, + "paypal": { "$ref": "#/$defs/setup_intent_payment_method_options_paypal" }, + "payto": { "$ref": "#/$defs/setup_intent_payment_method_options_payto" }, + "sepa_debit": { "$ref": "#/$defs/setup_intent_payment_method_options_sepa_debit" }, + "upi": { "$ref": "#/$defs/setup_intent_payment_method_options_upi" }, + "us_bank_account": { "$ref": "#/$defs/setup_intent_payment_method_options_us_bank_account" } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "amazon_pay", + "bacs_debit", + "card", + "card_present", + "klarna", + "link", + "paypal", + "payto", + "sepa_debit", + "upi", + "us_bank_account" + ], + "x-stripeMostCommon": [ + "acss_debit", + "amazon_pay", + "bacs_debit", + "card", + "card_present", + "klarna", + "link", + "paypal", + "payto", + "sepa_debit", + "upi", + "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": "#/$defs/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method. The default value is `automatic`.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["currency"], + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["currency", "mandate_options", "verification_method"] + }, + "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": "#/$defs/setup_intent_payment_method_options_mandate_options_bacs_debit" + } + }, + "title": "setup_intent_payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options"] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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://docs.stripe.com/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 + } + }, + "required": ["mandate_options", "network", "request_three_d_secure"], + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options", "network", "request_three_d_secure"] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments, specified in the presentment currency.", + "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", + "description", + "end_date", + "interval", + "interval_count", + "reference", + "start_date", + "supported_types" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "amount", + "amount_type", + "currency", + "description", + "end_date", + "interval", + "interval_count", + "reference", + "start_date", + "supported_types" + ], + "x-stripeResource": { "class_name": "MandateOptions", "in_package": "" } + }, + "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_klarna": { + "description": "", + "properties": { + "currency": { + "description": "The currency of the setup intent. Three letter ISO currency code.", + "format": "currency", + "nullable": true, + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the Klarna checkout page that the customer is redirected to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["currency", "preferred_locale"], + "title": "setup_intent_payment_method_options_klarna", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["currency", "preferred_locale"] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": { + "persistent_token": { + "description": "[Deprecated] This is a legacy parameter that no longer has any function.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": ["persistent_token"], + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["persistent_token"] + }, + "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" + } + }, + "required": ["interval_description", "payment_schedule", "transaction_type"], + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "custom_mandate_url", + "default_for", + "interval_description", + "payment_schedule", + "transaction_type" + ] + }, + "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": [], + "x-stripeMostCommon": ["reference_prefix"], + "x-stripeResource": { "class_name": "BacsDebitMandateOptions", "in_package": "" } + }, + "setup_intent_payment_method_options_mandate_options_payto": { + "description": "", + "properties": { + "amount": { + "description": "Amount that will be collected. It is required when `amount_type` is `fixed`.", + "nullable": true, + "type": "integer" + }, + "amount_type": { + "description": "The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.", + "enum": ["fixed", "maximum"], + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "The periodicity at which payments will be collected. Defaults to `adhoc`.", + "enum": [ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly" + ], + "nullable": true, + "type": "string" + }, + "payments_per_period": { + "description": "The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.", + "nullable": true, + "type": "integer" + }, + "purpose": { + "description": "The purpose for which payments are made. Has a default value based on your merchant category code.", + "enum": [ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility" + ], + "nullable": true, + "type": "string" + }, + "start_date": { + "description": "Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_type", + "end_date", + "payment_schedule", + "payments_per_period", + "purpose", + "start_date" + ], + "title": "setup_intent_payment_method_options_mandate_options_payto", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "amount", + "amount_type", + "end_date", + "payment_schedule", + "payments_per_period", + "purpose", + "start_date" + ] + }, + "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": [], + "x-stripeMostCommon": ["reference_prefix"], + "x-stripeResource": { "class_name": "SepaDebitMandateOptions", "in_package": "" } + }, + "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" + } + }, + "required": ["billing_agreement_id"], + "title": "setup_intent_payment_method_options_paypal", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["billing_agreement_id"] + }, + "setup_intent_payment_method_options_payto": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/setup_intent_payment_method_options_mandate_options_payto" + } + }, + "title": "setup_intent_payment_method_options_payto", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options"] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/$defs/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options"] + }, + "setup_intent_payment_method_options_upi": { + "description": "", + "properties": { + "mandate_options": { "$ref": "#/$defs/payment_method_options_mandate_options_upi" } + }, + "title": "setup_intent_payment_method_options_upi", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options"] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { "$ref": "#/$defs/linked_account_options_common" }, + "mandate_options": { + "$ref": "#/$defs/payment_method_options_us_bank_account_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method. The default value is `automatic`.", + "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"], + "x-stripeMostCommon": ["financial_connections", "mandate_options", "verification_method"] + }, + "shipping": { + "description": "", + "properties": { + "address": { "$ref": "#/$defs/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"], + "x-stripeMostCommon": ["address", "carrier", "name", "phone", "tracking_number"], + "x-stripeResource": { "class_name": "ShippingDetails", "in_package": "" } + }, + "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://docs.stripe.com/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": "#/$defs/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": "#/$defs/shipping_rate_fixed_amount" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/tax_code" }], + "description": "A [tax code](https://docs.stripe.com/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/tax_code" }] } + }, + "type": { + "description": "The type of calculation to use on the shipping rate.", + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": [ + "active", + "created", + "delivery_estimate", + "display_name", + "id", + "livemode", + "metadata", + "object", + "tax_behavior", + "tax_code", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": ["delivery_estimate", "fixed_amount", "tax_code"], + "x-resourceId": "shipping_rate", + "x-stripeMostCommon": [ + "active", + "display_name", + "fixed_amount", + "id", + "metadata", + "tax_behavior", + "tax_code", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/shipping_rates" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/shipping_rates/{shipping_rate_token}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/shipping_rates" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/shipping_rates/{shipping_rate_token}" + } + ], + "x-stripeResource": { + "class_name": "ShippingRate", + "has_collection_class": true, + "in_package": "" + } + }, + "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": [], + "x-stripeMostCommon": ["amount", "tax_behavior"] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/shipping_rate_delivery_estimate_bound" }], + "description": "The lower bound of the estimated range. If empty, represents no lower bound.", + "nullable": true + } + }, + "required": ["maximum", "minimum"], + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": ["maximum", "minimum"], + "x-stripeMostCommon": ["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": [], + "x-stripeMostCommon": ["unit", "value"] + }, + "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": "#/$defs/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"], + "x-stripeMostCommon": ["amount", "currency", "currency_options"] + }, + "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://docs.stripe.com/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers).", + "properties": { + "ach_credit_transfer": { "$ref": "#/$defs/source_type_ach_credit_transfer" }, + "ach_debit": { "$ref": "#/$defs/source_type_ach_debit" }, + "acss_debit": { "$ref": "#/$defs/source_type_acss_debit" }, + "alipay": { "$ref": "#/$defs/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": "#/$defs/source_type_au_becs_debit" }, + "bancontact": { "$ref": "#/$defs/source_type_bancontact" }, + "card": { "$ref": "#/$defs/source_type_card" }, + "card_present": { "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/source_type_giropay" }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { "$ref": "#/$defs/source_type_ideal" }, + "klarna": { "$ref": "#/$defs/source_type_klarna" }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/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": "#/$defs/source_type_p24" }, + "receiver": { "$ref": "#/$defs/source_receiver_flow" }, + "redirect": { "$ref": "#/$defs/source_redirect_flow" }, + "sepa_credit_transfer": { "$ref": "#/$defs/source_type_sepa_credit_transfer" }, + "sepa_debit": { "$ref": "#/$defs/source_type_sepa_debit" }, + "sofort": { "$ref": "#/$defs/source_type_sofort" }, + "source_order": { "$ref": "#/$defs/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": "#/$defs/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://docs.stripe.com/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_credit_transfer", + "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": "#/$defs/source_type_wechat" } + }, + "required": [ + "allow_redisplay", + "amount", + "client_secret", + "created", + "currency", + "flow", + "id", + "livemode", + "metadata", + "object", + "owner", + "statement_descriptor", + "status", + "type", + "usage" + ], + "title": "Source", + "type": "object", + "x-expandableFields": ["code_verification", "owner", "receiver", "redirect", "source_order"], + "x-resourceId": "source", + "x-stripeMostCommon": [ + "amount", + "currency", + "customer", + "id", + "metadata", + "owner", + "redirect", + "statement_descriptor", + "status", + "type" + ], + "x-stripeOperations": [ + { + "method_name": "detach", + "method_on": "service", + "method_type": "custom", + "operation": "delete", + "path": "/v1/customers/{customer}/sources/{id}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/sources/{source}" + }, + { + "method_name": "source_transactions", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/sources/{source}/source_transactions" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/sources" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/sources/{source}" + }, + { + "method_name": "verify", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/sources/{source}/verify" + } + ], + "x-stripeResource": { + "class_name": "Source", + "in_package": "", + "polymorphic_groups": ["deleted_payment_source", "payment_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": [], + "x-stripeMostCommon": ["attempts_remaining", "status"] + }, + "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": "#/$defs/source_order_item" }, + "nullable": true, + "type": "array" + }, + "shipping": { "$ref": "#/$defs/shipping" } + }, + "required": ["amount", "currency", "items"], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": ["items", "shipping"], + "x-stripeMostCommon": ["amount", "currency", "email", "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" + } + }, + "required": ["amount", "currency", "description", "parent", "type"], + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount", "currency", "description", "parent", "quantity", "type"] + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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" + } + }, + "required": [ + "address", + "email", + "name", + "phone", + "verified_address", + "verified_email", + "verified_name", + "verified_phone" + ], + "title": "SourceOwner", + "type": "object", + "x-expandableFields": ["address", "verified_address"], + "x-stripeMostCommon": [ + "address", + "email", + "name", + "phone", + "verified_address", + "verified_email", + "verified_name", + "verified_phone" + ] + }, + "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": [ + "address", + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "address", + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ] + }, + "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` (successful 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": ["failure_reason", "return_url", "status", "url"], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["failure_reason", "return_url", "status", "url"] + }, + "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", + "x-stripeResource": { "class_name": "AchCreditTransfer" } + }, + "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", + "x-stripeResource": { "class_name": "AchDebit" } + }, + "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", + "x-stripeResource": { "class_name": "AcssDebit" } + }, + "source_type_alipay": { + "properties": { + "data_string": { "nullable": true, "type": "string" }, + "native_url": { "nullable": true, "type": "string" }, + "statement_descriptor": { "nullable": true, "type": "string" } + }, + "type": "object", + "x-stripeResource": { "class_name": "Alipay" } + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { "nullable": true, "type": "string" }, + "fingerprint": { "nullable": true, "type": "string" }, + "last4": { "nullable": true, "type": "string" } + }, + "type": "object", + "x-stripeResource": { "class_name": "AuBecsDebit" } + }, + "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", + "x-stripeResource": { "class_name": "Bancontact" } + }, + "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" }, + "description": { "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" }, + "iin": { "type": "string" }, + "issuer": { "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", + "x-stripeResource": { "class_name": "Card" } + }, + "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" }, + "description": { "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" }, + "iin": { "type": "string" }, + "issuer": { "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", + "x-stripeResource": { "class_name": "CardPresent" } + }, + "source_type_eps": { + "properties": { + "reference": { "nullable": true, "type": "string" }, + "statement_descriptor": { "nullable": true, "type": "string" } + }, + "type": "object", + "x-stripeResource": { "class_name": "Eps" } + }, + "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", + "x-stripeResource": { "class_name": "Giropay" } + }, + "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", + "x-stripeResource": { "class_name": "Ideal" } + }, + "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", + "x-stripeResource": { "class_name": "Klarna" } + }, + "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", + "x-stripeResource": { "class_name": "Multibanco" } + }, + "source_type_p24": { + "properties": { "reference": { "nullable": true, "type": "string" } }, + "type": "object", + "x-stripeResource": { "class_name": "P24" } + }, + "source_type_sepa_credit_transfer": { + "properties": { + "bank_name": { "nullable": true, "type": "string" }, + "bic": { "nullable": true, "type": "string" }, + "iban": { "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", + "x-stripeResource": { "class_name": "SepaCreditTransfer" } + }, + "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", + "x-stripeResource": { "class_name": "SepaDebit" } + }, + "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", + "x-stripeResource": { "class_name": "Sofort" } + }, + "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" }, + "description": { "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" }, + "iin": { "type": "string" }, + "issuer": { "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", + "x-stripeResource": { "class_name": "ThreeDSecure" } + }, + "source_type_wechat": { + "properties": { + "prepay_id": { "type": "string" }, + "qr_code_url": { "nullable": true, "type": "string" }, + "statement_descriptor": { "type": "string" } + }, + "type": "object", + "x-stripeResource": { "class_name": "Wechat" } + }, + "stackable_discount_with_discount_settings": { + "description": "", + "properties": { + "coupon": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/coupon" }], + "description": "ID of the coupon to create a new discount for.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/coupon" }] } + }, + "discount": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/discount" }], + "description": "ID of an existing discount on the object (or one of its ancestors) to reuse.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/discount" }] } + }, + "promotion_code": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/promotion_code" }], + "description": "ID of the promotion code to create a new discount for.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/promotion_code" }] } + } + }, + "required": ["coupon", "discount", "promotion_code"], + "title": "StackableDiscountWithDiscountSettings", + "type": "object", + "x-expandableFields": ["coupon", "discount", "promotion_code"], + "x-stripeMostCommon": ["coupon", "discount", "promotion_code"] + }, + "stackable_discount_with_discount_settings_and_discount_end": { + "description": "", + "properties": { + "coupon": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/coupon" }], + "description": "ID of the coupon to create a new discount for.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/coupon" }] } + }, + "discount": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/discount" }], + "description": "ID of an existing discount on the object (or one of its ancestors) to reuse.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/discount" }] } + }, + "promotion_code": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/promotion_code" }], + "description": "ID of the promotion code to create a new discount for.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/promotion_code" }] } + } + }, + "required": ["coupon", "discount", "promotion_code"], + "title": "StackableDiscountWithDiscountSettingsAndDiscountEnd", + "type": "object", + "x-expandableFields": ["coupon", "discount", "promotion_code"], + "x-stripeMostCommon": ["coupon", "discount", "promotion_code"] + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)", + "properties": { + "application": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/application" }, + { "$ref": "#/$defs/deleted_application" } + ], + "description": "ID of the Connect Application that created the subscription.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/application" }, { "$ref": "#/$defs/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": "#/$defs/subscription_automatic_tax" }, + "billing_cycle_anchor": { + "description": "The reference point that aligns future [billing cycle](https://docs.stripe.com/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": "#/$defs/subscriptions_resource_billing_cycle_anchor_config" }], + "description": "The fixed values used to calculate the `billing_cycle_anchor`.", + "nullable": true + }, + "billing_mode": { "$ref": "#/$defs/subscriptions_resource_billing_mode" }, + "billing_thresholds": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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" + }, + "customer": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "ID of the account representing the customer who owns the subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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": "#/$defs/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://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_method" }] } + }, + "default_source": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/payment_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://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/payment_source" }] } + }, + "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": "#/$defs/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" + }, + "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": "#/$defs/discount" }], + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "latest_invoice": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/invoice" }], + "description": "The most recent invoice this subscription has generated over its lifecycle (for example, when it cycles or is updated).", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/invoice" }] } + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/account" }], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://docs.stripe.com/connect/subscriptions#on-behalf-of) for details.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "pause_collection": { + "anyOf": [{ "$ref": "#/$defs/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://docs.stripe.com/billing/subscriptions/pause-payment).", + "nullable": true + }, + "payment_settings": { + "anyOf": [{ "$ref": "#/$defs/subscriptions_resource_payment_settings" }], + "description": "Payment settings passed on to invoices created by the subscription.", + "nullable": true + }, + "pending_invoice_item_interval": { + "anyOf": [{ "$ref": "#/$defs/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](/api/invoices/create) for the given subscription at the specified interval.", + "nullable": true + }, + "pending_setup_intent": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/setup_intent" }], + "description": "You can use this [SetupIntent](https://docs.stripe.com/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://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2).", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/setup_intent" }] } + }, + "pending_update": { + "anyOf": [{ "$ref": "#/$defs/subscriptions_resource_pending_update" }], + "description": "If specified, [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.", + "nullable": true + }, + "presentment_details": { + "$ref": "#/$defs/subscriptions_resource_subscription_presentment_details" + }, + "schedule": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/subscription_schedule" } + ], + "description": "The schedule attached to the subscription", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/test_helpers.test_clock" } + ], + "description": "ID of the test clock this subscription belongs to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/test_helpers.test_clock" }] } + }, + "transfer_data": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/subscriptions_resource_trial_settings_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": [ + "application", + "application_fee_percent", + "automatic_tax", + "billing_cycle_anchor", + "billing_cycle_anchor_config", + "billing_mode", + "billing_thresholds", + "cancel_at", + "cancel_at_period_end", + "canceled_at", + "cancellation_details", + "collection_method", + "created", + "currency", + "customer", + "customer_account", + "days_until_due", + "default_payment_method", + "default_source", + "description", + "discounts", + "ended_at", + "id", + "invoice_settings", + "items", + "latest_invoice", + "livemode", + "metadata", + "next_pending_invoice_item_invoice", + "object", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "start_date", + "status", + "test_clock", + "transfer_data", + "trial_end", + "trial_settings", + "trial_start" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_cycle_anchor_config", + "billing_mode", + "billing_thresholds", + "cancellation_details", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discounts", + "invoice_settings", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "presentment_details", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription", + "x-stripeMostCommon": [ + "automatic_tax", + "currency", + "customer", + "customer_account", + "default_payment_method", + "description", + "id", + "items", + "latest_invoice", + "metadata", + "pending_setup_intent", + "pending_update", + "status" + ], + "x-stripeOperations": [ + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "delete", + "path": "/v1/subscriptions/{subscription_exposed_id}" + }, + { + "method_name": "delete_discount", + "method_on": "service", + "method_type": "custom", + "operation": "delete", + "path": "/v1/subscriptions/{subscription_exposed_id}/discount" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/subscriptions" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/subscriptions/{subscription_exposed_id}" + }, + { + "method_name": "search", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/subscriptions/search" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/subscriptions" + }, + { + "method_name": "migrate", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/subscriptions/{subscription}/migrate" + }, + { + "method_name": "resume", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/subscriptions/{subscription}/resume" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/subscriptions/{subscription_exposed_id}" + } + ], + "x-stripeResource": { + "class_name": "Subscription", + "has_collection_class": true, + "has_search_result_class": true, + "in_package": "" + } + }, + "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": "#/$defs/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": ["disabled_reason", "enabled", "liability"], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"], + "x-stripeMostCommon": ["disabled_reason", "enabled", "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" + } + }, + "required": ["amount_gte", "reset_billing_cycle_anchor"], + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["amount_gte", "reset_billing_cycle_anchor"] + }, + "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": "#/$defs/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" + }, + "current_period_end": { + "description": "The end time of this subscription item's current billing period.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "The start time of this subscription item's current billing period.", + "format": "unix-time", + "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": "#/$defs/discount" }], + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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" + }, + "plan": { "$ref": "#/$defs/plan" }, + "price": { "$ref": "#/$defs/price" }, + "quantity": { + "description": "The [quantity](https://docs.stripe.com/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": "#/$defs/tax_rate" }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "billing_thresholds", + "created", + "current_period_end", + "current_period_start", + "discounts", + "id", + "metadata", + "object", + "plan", + "price", + "subscription", + "tax_rates" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": ["billing_thresholds", "discounts", "plan", "price", "tax_rates"], + "x-resourceId": "subscription_item", + "x-stripeMostCommon": ["id", "metadata", "price", "quantity", "subscription"], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/subscription_items/{item}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/subscription_items" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/subscription_items/{item}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/subscription_items" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/subscription_items/{item}" + } + ], + "x-stripeResource": { + "class_name": "SubscriptionItem", + "has_collection_class": true, + "in_package": "" + } + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "nullable": true, + "type": "integer" + } + }, + "required": ["usage_gte"], + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["usage_gte"] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { "$ref": "#/$defs/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://docs.stripe.com/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://docs.stripe.com/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" + } + }, + "required": ["network", "request_three_d_secure"], + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": ["mandate_options"], + "x-stripeMostCommon": ["mandate_options", "network", "request_three_d_secure"] + }, + "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": [], + "x-stripeMostCommon": ["interval", "interval_count"] + }, + "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://docs.stripe.com/billing/subscriptions/subscription-schedules)", + "properties": { + "application": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/application" }, + { "$ref": "#/$defs/deleted_application" } + ], + "description": "ID of the Connect Application that created the schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/application" }, { "$ref": "#/$defs/deleted_application" }] + } + }, + "billing_mode": { "$ref": "#/$defs/subscriptions_resource_billing_mode" }, + "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": "#/$defs/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": "#/$defs/customer" }, + { "$ref": "#/$defs/deleted_customer" } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/customer" }, { "$ref": "#/$defs/deleted_customer" }] + } + }, + "customer_account": { + "description": "ID of the account who owns the subscription schedule.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "default_settings": { "$ref": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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://docs.stripe.com/billing/subscriptions/subscription-schedules).", + "enum": ["active", "canceled", "completed", "not_started", "released"], + "type": "string" + }, + "subscription": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/subscription" }], + "description": "ID of the subscription managed by the subscription schedule.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/subscription" }] } + }, + "test_clock": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/test_helpers.test_clock" } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/test_helpers.test_clock" }] } + } + }, + "required": [ + "application", + "billing_mode", + "canceled_at", + "completed_at", + "created", + "current_phase", + "customer", + "customer_account", + "default_settings", + "end_behavior", + "id", + "livemode", + "metadata", + "object", + "phases", + "released_at", + "released_subscription", + "status", + "subscription", + "test_clock" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "billing_mode", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule", + "x-stripeMostCommon": [ + "current_phase", + "customer", + "id", + "metadata", + "phases", + "status", + "subscription" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/subscription_schedules" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/subscription_schedules/{schedule}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/subscription_schedules" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/subscription_schedules/{schedule}" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/subscription_schedules/{schedule}/cancel" + }, + { + "method_name": "release", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/subscription_schedules/{schedule}/release" + } + ], + "x-stripeResource": { + "class_name": "SubscriptionSchedule", + "has_collection_class": true, + "in_package": "" + } + }, + "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": "#/$defs/discounts_resource_stackable_discount_with_discount_end" }, + "type": "array" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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" + }, + "period": { "$ref": "#/$defs/subscription_schedule_add_invoice_item_period" }, + "price": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/price" }, + { "$ref": "#/$defs/deleted_price" } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/price" }, { "$ref": "#/$defs/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": "#/$defs/tax_rate" }, + "nullable": true, + "type": "array" + } + }, + "required": ["discounts", "metadata", "period", "price", "quantity"], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": ["discounts", "period", "price", "tax_rates"], + "x-stripeMostCommon": ["discounts", "metadata", "period", "price", "quantity", "tax_rates"] + }, + "subscription_schedule_add_invoice_item_period": { + "description": "", + "properties": { + "end": { + "$ref": "#/$defs/subscription_schedules_resource_invoice_item_period_resource_period_end" + }, + "start": { + "$ref": "#/$defs/subscription_schedules_resource_invoice_item_period_resource_period_start" + } + }, + "required": ["end", "start"], + "title": "SubscriptionScheduleAddInvoiceItemPeriod", + "type": "object", + "x-expandableFields": ["end", "start"], + "x-stripeMostCommon": ["end", "start"] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/stackable_discount_with_discount_settings" }, + "type": "array" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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" + }, + "plan": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/plan" }, + { "$ref": "#/$defs/deleted_plan" } + ], + "description": "ID of the plan to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/plan" }, { "$ref": "#/$defs/deleted_plan" }] + } + }, + "price": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/price" }, + { "$ref": "#/$defs/deleted_price" } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/price" }, { "$ref": "#/$defs/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": "#/$defs/tax_rate" }, + "nullable": true, + "type": "array" + } + }, + "required": ["billing_thresholds", "discounts", "metadata", "plan", "price"], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": ["billing_thresholds", "discounts", "plan", "price", "tax_rates"], + "x-stripeMostCommon": [ + "billing_thresholds", + "discounts", + "metadata", + "plan", + "price", + "quantity", + "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": [], + "x-stripeMostCommon": ["end_date", "start_date"] + }, + "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": "#/$defs/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": "#/$defs/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://docs.stripe.com/billing/subscriptions/billing-cycle).", + "enum": ["automatic", "phase_start"], + "nullable": true, + "type": "string" + }, + "billing_thresholds": { + "anyOf": [{ "$ref": "#/$defs/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" + }, + "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": "#/$defs/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": "#/$defs/payment_method" }] } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { "$ref": "#/$defs/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": "#/$defs/stackable_discount_with_discount_settings_and_discount_end" }, + "type": "array" + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/subscription_schedule_configuration_item" }, + "type": "array" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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": "#/$defs/account" }] } + }, + "proration_behavior": { + "description": "When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.", + "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": "#/$defs/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", + "application_fee_percent", + "billing_cycle_anchor", + "billing_thresholds", + "collection_method", + "currency", + "default_payment_method", + "description", + "discounts", + "end_date", + "invoice_settings", + "items", + "metadata", + "on_behalf_of", + "proration_behavior", + "start_date", + "transfer_data", + "trial_end" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "default_tax_rates", + "discounts", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ], + "x-stripeMostCommon": [ + "add_invoice_items", + "application_fee_percent", + "automatic_tax", + "billing_cycle_anchor", + "billing_thresholds", + "collection_method", + "currency", + "default_payment_method", + "default_tax_rates", + "description", + "discounts", + "end_date", + "invoice_settings", + "items", + "metadata", + "on_behalf_of", + "proration_behavior", + "start_date", + "transfer_data", + "trial_end" + ] + }, + "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": "#/$defs/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://docs.stripe.com/billing/subscriptions/billing-cycle).", + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/invoice_setting_subscription_schedule_setting" }, + "on_behalf_of": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/account" }] } + }, + "transfer_data": { + "anyOf": [{ "$ref": "#/$defs/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": [ + "application_fee_percent", + "billing_cycle_anchor", + "billing_thresholds", + "collection_method", + "default_payment_method", + "description", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ], + "x-stripeMostCommon": [ + "application_fee_percent", + "automatic_tax", + "billing_cycle_anchor", + "billing_thresholds", + "collection_method", + "default_payment_method", + "description", + "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": "#/$defs/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": ["disabled_reason", "enabled", "liability"], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": ["liability"], + "x-stripeMostCommon": ["disabled_reason", "enabled", "liability"] + }, + "subscription_schedules_resource_invoice_item_period_resource_period_end": { + "description": "", + "properties": { + "timestamp": { + "description": "A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.", + "format": "unix-time", + "type": "integer" + }, + "type": { + "description": "Select how to calculate the end of the invoice item period.", + "enum": ["min_item_period_end", "phase_end", "timestamp"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEnd", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["timestamp", "type"] + }, + "subscription_schedules_resource_invoice_item_period_resource_period_start": { + "description": "", + "properties": { + "timestamp": { + "description": "A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.", + "format": "unix-time", + "type": "integer" + }, + "type": { + "description": "Select how to calculate the start of the invoice item period.", + "enum": ["max_item_period_start", "phase_start", "timestamp"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStart", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["timestamp", "type"] + }, + "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": "#/$defs/account" }], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + } + }, + "required": ["amount_percent", "destination"], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": ["destination"], + "x-stripeMostCommon": ["amount_percent", "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", "hour", "minute", "month", "second"], + "title": "SubscriptionsResourceBillingCycleAnchorConfig", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["day_of_month", "hour", "minute", "month", "second"] + }, + "subscriptions_resource_billing_mode": { + "description": "The billing mode of the subscription.", + "properties": { + "flexible": { + "anyOf": [{ "$ref": "#/$defs/subscriptions_resource_billing_mode_flexible" }], + "description": "Configure behavior for flexible billing mode", + "nullable": true + }, + "type": { + "description": "Controls how prorations and invoices for subscriptions are calculated and orchestrated.", + "enum": ["classic", "flexible"], + "type": "string" + }, + "updated_at": { + "description": "Details on when the current billing_mode was adopted.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["flexible", "type"], + "title": "SubscriptionsResourceBillingMode", + "type": "object", + "x-expandableFields": ["flexible"], + "x-stripeMostCommon": ["flexible", "type", "updated_at"] + }, + "subscriptions_resource_billing_mode_flexible": { + "description": "", + "properties": { + "proration_discounts": { + "description": "Controls how invoices and invoice items display proration amounts and discount amounts.", + "enum": ["included", "itemized"], + "type": "string" + } + }, + "title": "SubscriptionsResourceBillingModeFlexible", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["proration_discounts"] + }, + "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.", + "enum": ["keep_as_draft", "mark_uncollectible", "void"], + "type": "string", + "x-stripeBypassValidation": true + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": ["behavior", "resumes_at"], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["behavior", "resumes_at"] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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": "#/$defs/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 + }, + "payto": { + "anyOf": [{ "$ref": "#/$defs/invoice_payment_method_options_payto" }], + "description": "This sub-hash contains details about the PayTo payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "sepa_debit": { + "anyOf": [{ "$ref": "#/$defs/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": "#/$defs/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 + } + }, + "required": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "payto", + "sepa_debit", + "us_bank_account" + ], + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "payto", + "sepa_debit", + "us_bank_account" + ], + "x-stripeMostCommon": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "payto", + "sepa_debit", + "us_bank_account" + ] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [{ "$ref": "#/$defs/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", + "affirm", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "multibanco", + "naver_pay", + "nz_bank_account", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "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" + } + }, + "required": ["payment_method_options", "payment_method_types", "save_default_payment_method"], + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": ["payment_method_options"], + "x-stripeMostCommon": [ + "payment_method_options", + "payment_method_types", + "save_default_payment_method" + ] + }, + "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": "#/$defs/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://docs.stripe.com/billing/subscriptions/trials) to learn more.", + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "billing_cycle_anchor", + "expires_at", + "subscription_items", + "trial_end", + "trial_from_plan" + ], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": ["subscription_items"], + "x-stripeMostCommon": [ + "billing_cycle_anchor", + "expires_at", + "subscription_items", + "trial_end", + "trial_from_plan" + ] + }, + "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": "#/$defs/tax_id" }, + { "$ref": "#/$defs/deleted_tax_id" } + ], + "x-expansionResources": { + "oneOf": [{ "$ref": "#/$defs/tax_id" }, { "$ref": "#/$defs/deleted_tax_id" }] + } + }, + "nullable": true, + "type": "array" + }, + "issuer": { "$ref": "#/$defs/connect_account_reference" } + }, + "required": ["account_tax_ids", "issuer"], + "title": "SubscriptionsResourceSubscriptionInvoiceSettings", + "type": "object", + "x-expandableFields": ["account_tax_ids", "issuer"], + "x-stripeMostCommon": ["account_tax_ids", "issuer"] + }, + "subscriptions_resource_subscription_presentment_details": { + "description": "", + "properties": { + "presentment_currency": { + "description": "Currency used for customer payments.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["presentment_currency"], + "title": "SubscriptionsResourceSubscriptionPresentmentDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["presentment_currency"] + }, + "subscriptions_resource_trial_settings_end_behavior": { + "description": "Defines how a subscription behaves when a 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": "SubscriptionsResourceTrialSettingsEndBehavior", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["missing_payment_method"] + }, + "subscriptions_resource_trial_settings_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { "$ref": "#/$defs/subscriptions_resource_trial_settings_end_behavior" } + }, + "required": ["end_behavior"], + "title": "SubscriptionsResourceTrialSettingsTrialSettings", + "type": "object", + "x-expandableFields": ["end_behavior"], + "x-stripeMostCommon": ["end_behavior"] + }, + "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", + "x-stripeMostCommon": ["description", "id", "name", "object"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/tax_codes" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/tax_codes/{id}" + } + ], + "x-stripeResource": { + "class_name": "TaxCode", + "has_collection_class": true, + "in_package": "" + } + }, + "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": [], + "x-stripeMostCommon": [ + "id", + "object", + "period_end", + "period_start", + "tax_deduction_account_number" + ], + "x-stripeResource": { + "class_name": "TaxDeductedAtSource", + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "tax_i_ds_owner": { + "description": "", + "properties": { + "account": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/account" }], + "description": "The account being referenced when `type` is `account`.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "application": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/application" }], + "description": "The Connect Application being referenced when `type` is `application`.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/application" }] } + }, + "customer": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/customer" }], + "description": "The customer being referenced when `type` is `customer`.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/customer" }] } + }, + "customer_account": { + "description": "The Account representing the customer being referenced when `type` is `customer`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of owner referenced.", + "enum": ["account", "application", "customer", "self"], + "type": "string" + } + }, + "required": ["customer_account", "type"], + "title": "TaxIDsOwner", + "type": "object", + "x-expandableFields": ["account", "application", "customer"], + "x-stripeMostCommon": ["account", "application", "customer", "customer_account", "type"] + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://docs.stripe.com/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://docs.stripe.com/billing/taxes/tax-ids), [Account tax IDs](https://docs.stripe.com/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": "#/$defs/customer" }], + "description": "ID of the customer.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/customer" }] } + }, + "customer_account": { + "description": "ID of the Account representing the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/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`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_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`, `pl_nip`, `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", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "lk_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", + "pl_nip", + "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": "#/$defs/tax_id_verification" }], + "description": "Tax ID verification information.", + "nullable": true + } + }, + "required": [ + "country", + "created", + "customer", + "customer_account", + "id", + "livemode", + "object", + "owner", + "type", + "value", + "verification" + ], + "title": "tax_id", + "type": "object", + "x-expandableFields": ["customer", "owner", "verification"], + "x-resourceId": "tax_id", + "x-stripeMostCommon": ["country", "customer", "customer_account", "id", "type", "value"], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/customers/{customer}/tax_ids/{id}" + }, + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/tax_ids/{id}" + }, + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/customers/{customer}/tax_ids" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/customers/{customer}/tax_ids" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/tax_ids/{id}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/customers/{customer}/tax_ids/{id}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/tax_ids" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/tax_ids/{id}" + }, + { + "method_name": "create", + "method_on": "collection", + "method_type": "create", + "operation": "post", + "path": "/v1/customers/{customer}/tax_ids", + "shared_version_of": "tax_id" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/customers/{customer}/tax_ids", + "shared_version_of": "tax_id" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/tax_ids" + } + ], + "x-stripeResource": { "class_name": "TaxId", "has_collection_class": true, "in_package": "" } + }, + "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", "verified_address", "verified_name"], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["status", "verified_address", "verified_name"] + }, + "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": "#/$defs/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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. This field is only present for TaxRates created by Stripe Tax.", + "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", + "country", + "created", + "description", + "display_name", + "effective_percentage", + "flat_amount", + "id", + "inclusive", + "jurisdiction", + "jurisdiction_level", + "livemode", + "metadata", + "object", + "percentage", + "rate_type", + "state", + "tax_type" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": ["flat_amount"], + "x-resourceId": "tax_rate", + "x-stripeMostCommon": [ + "active", + "country", + "description", + "display_name", + "id", + "inclusive", + "jurisdiction", + "metadata", + "percentage", + "state" + ], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/tax_rates" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/tax_rates/{tax_rate}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/tax_rates" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/tax_rates/{tax_rate}" + } + ], + "x-stripeResource": { + "class_name": "TaxRate", + "has_collection_class": true, + "in_package": "" + } + }, + "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": [], + "x-stripeMostCommon": ["amount", "currency"], + "x-stripeResource": { "class_name": "TaxRateFlatAmount", "in_package": "" } + }, + "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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "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": "#/$defs/billing_clocks_resource_status_details_status_details" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "name", + "object", + "status", + "status_details" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": ["status_details"], + "x-resourceId": "test_helpers.test_clock", + "x-stripeMostCommon": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "name", + "object", + "status", + "status_details" + ], + "x-stripeOperations": [ + { + "method_name": "delete", + "method_on": "service", + "method_type": "delete", + "operation": "delete", + "path": "/v1/test_helpers/test_clocks/{test_clock}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/test_helpers/test_clocks" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/test_helpers/test_clocks/{test_clock}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/test_helpers/test_clocks" + }, + { + "method_name": "advance", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/test_helpers/test_clocks/{test_clock}/advance" + } + ], + "x-stripeResource": { + "class_name": "TestClock", + "has_collection_class": true, + "in_package": "TestHelpers" + } + }, + "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", "2.3.0", "2.3.1"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "authentication_flow", + "electronic_commerce_indicator", + "result", + "result_reason", + "transaction_id", + "version" + ], + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "authentication_flow", + "electronic_commerce_indicator", + "result", + "result_reason", + "transaction_id", + "version" + ] + }, + "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", "2.3.0", "2.3.1"], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "authentication_flow", + "electronic_commerce_indicator", + "exemption_indicator", + "result", + "result_reason", + "transaction_id", + "version" + ], + "title": "three_d_secure_details_charge", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "authentication_flow", + "electronic_commerce_indicator", + "exemption_indicator", + "exemption_indicator_applied", + "result", + "result_reason", + "transaction_id", + "version" + ] + }, + "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": [], + "x-stripeMostCommon": ["supported"] + }, + "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" + } + }, + "required": ["preferred"], + "title": "token_card_networks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["preferred"] + }, + "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://docs.stripe.com/connect/top-ups)", + "properties": { + "amount": { "description": "Amount transferred.", "type": "integer" }, + "balance_transaction": { + "anyOf": [ + { "maxLength": 5000, "type": "string" }, + { "$ref": "#/$defs/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": "#/$defs/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](/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": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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", + "balance_transaction", + "created", + "currency", + "description", + "expected_availability_date", + "failure_code", + "failure_message", + "id", + "livemode", + "metadata", + "object", + "source", + "statement_descriptor", + "status", + "transfer_group" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": ["balance_transaction", "source"], + "x-resourceId": "topup", + "x-stripeMostCommon": ["amount", "currency", "description", "id", "metadata", "status"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/topups" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/topups/{topup}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/topups" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/topups/{topup}" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/topups/{topup}/cancel" + } + ], + "x-stripeResource": { + "class_name": "Topup", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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://api.stripe.com#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://docs.stripe.com/transfer-payout-split).\n\nRelated guide: [Creating separate charges and transfers](https://docs.stripe.com/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": "#/$defs/balance_transaction" } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/account" }], + "description": "ID of the Stripe account the transfer was sent to.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/account" }] } + }, + "destination_payment": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/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": "#/$defs/charge" }] } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { "maxLength": 500, "type": "string" }, + "description": "Set of [key-value pairs](https://docs.stripe.com/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": "#/$defs/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"], + "x-stripeMostCommon": ["data", "has_more", "object", "url"] + }, + "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": "#/$defs/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": "#/$defs/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://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options) for details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_reversed", + "balance_transaction", + "created", + "currency", + "description", + "destination", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed", + "source_transaction", + "transfer_group" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer", + "x-stripeMostCommon": ["amount", "currency", "description", "destination", "id", "metadata"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/transfers" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/transfers/{transfer}" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/transfers" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/transfers/{transfer}" + } + ], + "x-stripeResource": { + "class_name": "Transfer", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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://docs.stripe.com/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": "#/$defs/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": "#/$defs/account" }] } + } + }, + "required": ["destination"], + "title": "transfer_data", + "type": "object", + "x-expandableFields": ["destination"], + "x-stripeMostCommon": ["amount", "destination"] + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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": "#/$defs/balance_transaction" } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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": "#/$defs/refund" }], + "description": "Linked payment refund for the transfer reversal.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/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://docs.stripe.com/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": "#/$defs/refund" }], + "description": "ID of the refund responsible for the transfer reversal.", + "nullable": true, + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/refund" }] } + }, + "transfer": { + "anyOf": [{ "maxLength": 5000, "type": "string" }, { "$ref": "#/$defs/transfer" }], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { "oneOf": [{ "$ref": "#/$defs/transfer" }] } + } + }, + "required": [ + "amount", + "balance_transaction", + "created", + "currency", + "destination_payment_refund", + "id", + "metadata", + "object", + "source_refund", + "transfer" + ], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal", + "x-stripeMostCommon": ["amount", "currency", "id", "metadata", "transfer"], + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "collection", + "method_type": "list", + "operation": "get", + "path": "/v1/transfers/{id}/reversals" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/transfers/{id}/reversals" + }, + { + "method_name": "retrieve", + "method_on": "collection", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/transfers/{transfer}/reversals/{id}" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/transfers/{transfer}/reversals/{id}" + }, + { + "method_name": "create", + "method_on": "collection", + "method_type": "create", + "operation": "post", + "path": "/v1/transfers/{id}/reversals" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/transfers/{id}/reversals" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/transfers/{transfer}/reversals/{id}" + } + ], + "x-stripeResource": { + "class_name": "TransferReversal", + "has_collection_class": true, + "in_package": "", + "polymorphic_groups": ["balance_transaction_source"] + } + }, + "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" + }, + "monthly_payout_days": { + "description": "The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.", + "items": { "type": "integer" }, + "type": "array" + }, + "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" + }, + "weekly_payout_days": { + "description": "The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.", + "items": { + "enum": ["friday", "monday", "thursday", "tuesday", "wednesday"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": ["delay_days", "interval"], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": [ + "delay_days", + "interval", + "monthly_anchor", + "monthly_payout_days", + "weekly_anchor", + "weekly_payout_days" + ] + }, + "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": [], + "x-stripeMostCommon": ["divide_by", "round"] + }, + "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": [], + "x-stripeMostCommon": ["divide_by", "round"] + }, + "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": ["preferred", "supported"], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [], + "x-stripeMostCommon": ["preferred", "supported"] + } + } +} diff --git a/packages/core/sdk/src/elicitation.ts b/packages/core/sdk/src/elicitation.ts index 241e92af1..6b6ed33cb 100644 --- a/packages/core/sdk/src/elicitation.ts +++ b/packages/core/sdk/src/elicitation.ts @@ -7,25 +7,19 @@ import { ToolId } from "./ids"; // --------------------------------------------------------------------------- /** Tool needs structured input from the user (render a form) */ -export class FormElicitation extends Schema.TaggedClass()( - "FormElicitation", - { - message: Schema.String, - /** JSON Schema describing the fields to collect */ - requestedSchema: Schema.Record({ key: Schema.String, value: Schema.Unknown }), - }, -) {} +export class FormElicitation extends Schema.TaggedClass()("FormElicitation", { + message: Schema.String, + /** JSON Schema describing the fields to collect */ + requestedSchema: Schema.Record({ key: Schema.String, value: Schema.Unknown }), +}) {} /** Tool needs the user to visit a URL (OAuth, approval page, etc.) */ -export class UrlElicitation extends Schema.TaggedClass()( - "UrlElicitation", - { - message: Schema.String, - url: Schema.String, - /** Unique ID so the host can correlate the callback */ - elicitationId: Schema.String, - }, -) {} +export class UrlElicitation extends Schema.TaggedClass()("UrlElicitation", { + message: Schema.String, + url: Schema.String, + /** Unique ID so the host can correlate the callback */ + elicitationId: Schema.String, +}) {} export type ElicitationRequest = FormElicitation | UrlElicitation; @@ -36,14 +30,10 @@ export type ElicitationRequest = FormElicitation | UrlElicitation; export const ElicitationAction = Schema.Literal("accept", "decline", "cancel"); export type ElicitationAction = typeof ElicitationAction.Type; -export class ElicitationResponse extends Schema.Class( - "ElicitationResponse", -)({ +export class ElicitationResponse extends Schema.Class("ElicitationResponse")({ action: ElicitationAction, /** Present when action is "accept" — the data the user provided */ - content: Schema.optional( - Schema.Record({ key: Schema.String, value: Schema.Unknown }), - ), + content: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Unknown })), }) {} // --------------------------------------------------------------------------- @@ -61,9 +51,7 @@ export interface ElicitationContext { * The SDK calls this when a tool suspends to ask for user input. * The host renders UI / prompts the user / does OAuth / etc. */ -export type ElicitationHandler = ( - ctx: ElicitationContext, -) => Effect.Effect; +export type ElicitationHandler = (ctx: ElicitationContext) => Effect.Effect; // --------------------------------------------------------------------------- // Elicitation error — tool was declined or cancelled diff --git a/packages/core/sdk/src/errors.ts b/packages/core/sdk/src/errors.ts index 5596424e2..472a5c042 100644 --- a/packages/core/sdk/src/errors.ts +++ b/packages/core/sdk/src/errors.ts @@ -7,9 +7,7 @@ export class ToolNotFoundError extends Schema.TaggedError()( { toolId: ToolId }, ) {} -export class ToolInvocationError extends Data.TaggedError( - "ToolInvocationError", -)<{ +export class ToolInvocationError extends Data.TaggedError("ToolInvocationError")<{ readonly toolId: ToolId; readonly message: string; readonly cause?: unknown; diff --git a/packages/core/sdk/src/executor.ts b/packages/core/sdk/src/executor.ts index bed1a21be..05d706eae 100644 --- a/packages/core/sdk/src/executor.ts +++ b/packages/core/sdk/src/executor.ts @@ -13,11 +13,7 @@ import type { import type { Source, SourceDetectionResult, SourceRegistry } from "./sources"; import type { Policy, PolicyEngine } from "./policies"; import type { Scope } from "./scope"; -import type { - ExecutorPlugin, - PluginExtensions, - PluginHandle, -} from "./plugin"; +import type { ExecutorPlugin, PluginExtensions, PluginHandle } from "./plugin"; import type { ToolNotFoundError, ToolInvocationError, @@ -41,16 +37,12 @@ const resolveElicitationHandler = (options: InvokeOptions): ElicitationHandler = // Executor — the main public API, expands with plugins // --------------------------------------------------------------------------- -export type Executor< - TPlugins extends readonly ExecutorPlugin[] = [], -> = { +export type Executor[] = []> = { readonly scope: Scope; readonly tools: { readonly list: (filter?: ToolListFilter) => Effect.Effect; - readonly schema: ( - toolId: string, - ) => Effect.Effect; + readonly schema: (toolId: string) => Effect.Effect; /** Shared schema definitions across all tools */ readonly definitions: () => Effect.Effect>; readonly invoke: ( @@ -59,10 +51,7 @@ export type Executor< options: InvokeOptions, ) => Effect.Effect< ToolInvocationResult, - | ToolNotFoundError - | ToolInvocationError - | PolicyDeniedError - | ElicitationDeclinedError + ToolNotFoundError | ToolInvocationError | PolicyDeniedError | ElicitationDeclinedError >; }; @@ -75,9 +64,7 @@ export type Executor< readonly policies: { readonly list: () => Effect.Effect; - readonly add: ( - policy: Omit, - ) => Effect.Effect; + readonly add: (policy: Omit) => Effect.Effect; readonly remove: (policyId: string) => Effect.Effect; }; @@ -88,14 +75,12 @@ export type Executor< secretId: SecretId, ) => Effect.Effect; /** Check if a secret can be resolved */ - readonly status: ( - secretId: SecretId, - ) => Effect.Effect<"resolved" | "missing">; + readonly status: (secretId: SecretId) => Effect.Effect<"resolved" | "missing">; /** Store a secret value (creates ref + writes to provider) */ - readonly set: (input: Omit) => Effect.Effect; - readonly remove: ( - secretId: SecretId, - ) => Effect.Effect; + readonly set: ( + input: Omit, + ) => Effect.Effect; + readonly remove: (secretId: SecretId) => Effect.Effect; /** Register a secret provider */ readonly addProvider: (provider: SecretProvider) => Effect.Effect; /** List registered provider keys */ @@ -114,9 +99,7 @@ export type SourceRegistryService = Context.Tag.Service; export type SecretStoreService = Context.Tag.Service; export type PolicyEngineService = Context.Tag.Service; -export interface ExecutorConfig< - TPlugins extends readonly ExecutorPlugin[] = [], -> { +export interface ExecutorConfig[] = []> { readonly scope: Scope; readonly tools: ToolRegistryService; readonly sources: SourceRegistryService; @@ -201,8 +184,7 @@ export const createExecutor = < list: () => policies.list(scope.id), add: (policy: Omit) => policies.add({ ...policy, scopeId: scope.id }), - remove: (policyId: string) => - policies.remove(policyId as PolicyId), + remove: (policyId: string) => policies.remove(policyId as PolicyId), }, secrets: { @@ -211,8 +193,7 @@ export const createExecutor = < status: (secretId: SecretId) => secrets.status(secretId, scope.id), set: (input: Omit) => secrets.set({ ...input, scopeId: scope.id }), - remove: (secretId: SecretId) => - secrets.remove(secretId), + remove: (secretId: SecretId) => secrets.remove(secretId), addProvider: (provider: SecretProvider) => secrets.addProvider(provider), providers: () => secrets.providers(), }, diff --git a/packages/core/sdk/src/in-memory/policy-engine.ts b/packages/core/sdk/src/in-memory/policy-engine.ts index dccc340d5..3ebe99b57 100644 --- a/packages/core/sdk/src/in-memory/policy-engine.ts +++ b/packages/core/sdk/src/in-memory/policy-engine.ts @@ -9,11 +9,8 @@ export const makeInMemoryPolicyEngine = () => { return { list: (scopeId: ScopeId) => - Effect.succeed( - [...policies.values()].filter((p) => p.scopeId === scopeId), - ), - check: (_input: PolicyCheckInput) => - Effect.void, + Effect.succeed([...policies.values()].filter((p) => p.scopeId === scopeId)), + check: (_input: PolicyCheckInput) => Effect.void, add: (policy: Omit) => Effect.sync(() => { const id = PolicyId.make(`policy-${++counter}`); @@ -21,7 +18,6 @@ export const makeInMemoryPolicyEngine = () => { policies.set(id, full); return full; }), - remove: (policyId: PolicyId) => - Effect.succeed(policies.delete(policyId)), + remove: (policyId: PolicyId) => Effect.succeed(policies.delete(policyId)), }; }; diff --git a/packages/core/sdk/src/in-memory/secret-store.ts b/packages/core/sdk/src/in-memory/secret-store.ts index c0df34f01..f659cb059 100644 --- a/packages/core/sdk/src/in-memory/secret-store.ts +++ b/packages/core/sdk/src/in-memory/secret-store.ts @@ -14,7 +14,10 @@ export const makeInMemorySecretProvider = (): SecretProvider => { key: "memory", writable: true, get: (key) => Effect.sync(() => values.get(key) ?? null), - set: (key, value) => Effect.sync(() => { values.set(key, value); }), + set: (key, value) => + Effect.sync(() => { + values.set(key, value); + }), delete: (key) => Effect.sync(() => values.delete(key)), list: () => Effect.sync(() => [...values.keys()].map((k) => ({ id: k, name: k }))), }; @@ -55,9 +58,7 @@ export const makeInMemorySecretStore = () => { return { list: (scopeId: ScopeId) => - Effect.sync(() => - [...refs.values()].filter((r) => r.scopeId === scopeId), - ), + Effect.sync(() => [...refs.values()].filter((r) => r.scopeId === scopeId)), get: (secretId: SecretId) => Effect.fromNullable(refs.get(secretId)).pipe( @@ -125,9 +126,10 @@ export const makeInMemorySecretStore = () => { }), addProvider: (provider: SecretProvider) => - Effect.sync(() => { providers.push(provider); }), + Effect.sync(() => { + providers.push(provider); + }), - providers: () => - Effect.sync(() => providers.map((p) => p.key)), + providers: () => Effect.sync(() => providers.map((p) => p.key)), }; }; diff --git a/packages/core/sdk/src/in-memory/tool-registry.ts b/packages/core/sdk/src/in-memory/tool-registry.ts index 9984eb223..d2dfe1d62 100644 --- a/packages/core/sdk/src/in-memory/tool-registry.ts +++ b/packages/core/sdk/src/in-memory/tool-registry.ts @@ -45,9 +45,7 @@ export const makeInMemoryToolRegistry = () => { if (filter?.query) { const q = filter.query.toLowerCase(); result = result.filter( - (t) => - t.name.toLowerCase().includes(q) || - t.description?.toLowerCase().includes(q), + (t) => t.name.toLowerCase().includes(q) || t.description?.toLowerCase().includes(q), ); } return result.map((t) => ({ diff --git a/packages/core/sdk/src/index.test.ts b/packages/core/sdk/src/index.test.ts index 45b6adcc2..0809be9e3 100644 --- a/packages/core/sdk/src/index.test.ts +++ b/packages/core/sdk/src/index.test.ts @@ -46,14 +46,16 @@ describe("SDK Executor", () => { Effect.gen(function* () { const sources = makeInMemorySourceRegistry(); - yield* sources.registerRuntime(new Source({ - id: "built-in", - name: "Built In", - kind: "built-in", - runtime: true, - canRemove: false, - canRefresh: false, - })); + yield* sources.registerRuntime( + new Source({ + id: "built-in", + name: "Built In", + kind: "built-in", + runtime: true, + canRemove: false, + canRefresh: false, + }), + ); yield* sources.addManager({ kind: "openapi", @@ -71,10 +73,7 @@ describe("SDK Executor", () => { remove: () => Effect.void, }); - expect((yield* sources.list()).map((source) => source.id)).toEqual([ - "built-in", - "vercel", - ]); + expect((yield* sources.list()).map((source) => source.id)).toEqual(["built-in", "vercel"]); }), ); @@ -107,7 +106,7 @@ describe("SDK Executor", () => { }), ] as const, }), - ) + ); const tools = yield* executor.tools.list(); expect(tools).toHaveLength(2); @@ -176,9 +175,7 @@ describe("SDK Executor", () => { it.effect("tool invocation fails for unknown tool", () => Effect.gen(function* () { const executor = yield* createExecutor(makeTestConfig()); - const error = yield* Effect.flip( - executor.tools.invoke("nonexistent", {}, autoApprove), - ); + const error = yield* Effect.flip(executor.tools.invoke("nonexistent", {}, autoApprove)); expect(error._tag).toBe("ToolNotFoundError"); }), ); @@ -223,9 +220,7 @@ describe("SDK Executor", () => { Effect.gen(function* () { const executor = yield* createExecutor( makeTestConfig({ - plugins: [ - inMemoryToolsPlugin({ namespace: "runtime", tools: [] }), - ] as const, + plugins: [inMemoryToolsPlugin({ namespace: "runtime", tools: [] })] as const, }), ); @@ -317,15 +312,19 @@ describe("SDK Executor", () => { }), ); - const result = yield* executor.tools.invoke("auth.login", {}, { - onElicitation: () => - Effect.succeed( - new ElicitationResponse({ - action: "accept", - content: { username: "alice", password: "secret" }, - }), - ), - }); + const result = yield* executor.tools.invoke( + "auth.login", + {}, + { + onElicitation: () => + Effect.succeed( + new ElicitationResponse({ + action: "accept", + content: { username: "alice", password: "secret" }, + }), + ), + }, + ); expect(result.data).toEqual({ user: "alice", status: "logged_in" }); }), @@ -357,10 +356,13 @@ describe("SDK Executor", () => { ); const error = yield* Effect.flip( - executor.tools.invoke("auth.login", {}, { - onElicitation: () => - Effect.succeed(new ElicitationResponse({ action: "decline" })), - }), + executor.tools.invoke( + "auth.login", + {}, + { + onElicitation: () => Effect.succeed(new ElicitationResponse({ action: "decline" })), + }, + ), ); expect(error._tag).toBe("ElicitationDeclinedError"); @@ -393,9 +395,13 @@ describe("SDK Executor", () => { ); const error = yield* Effect.flip( - executor.tools.invoke("auth.login", {}, { - onElicitation: undefined as never, - }), + executor.tools.invoke( + "auth.login", + {}, + { + onElicitation: undefined as never, + }, + ), ); expect(error._tag).toBe("ElicitationDeclinedError"); }), @@ -431,17 +437,21 @@ describe("SDK Executor", () => { }), ); - const result = yield* executor.tools.invoke("oauth.connect", {}, { - onElicitation: (ctx) => { - expect(ctx.request._tag).toBe("UrlElicitation"); - return Effect.succeed( - new ElicitationResponse({ - action: "accept", - content: { code: "auth-code-123" }, - }), - ); + const result = yield* executor.tools.invoke( + "oauth.connect", + {}, + { + onElicitation: (ctx) => { + expect(ctx.request._tag).toBe("UrlElicitation"); + return Effect.succeed( + new ElicitationResponse({ + action: "accept", + content: { code: "auth-code-123" }, + }), + ); + }, }, - }); + ); expect(result.data).toEqual({ connected: true, code: "auth-code-123" }); }), @@ -465,10 +475,7 @@ describe("SDK Executor", () => { oldValue: Schema.String, newValue: Schema.String, }), - handler: ( - { secretName, newValue }, - ctx: MemoryToolContext, - ) => + handler: ({ secretName, newValue }, ctx: MemoryToolContext) => Effect.gen(function* () { // Try to resolve the existing secret by key const secretId = SecretId.make(secretName); @@ -511,10 +518,14 @@ describe("SDK Executor", () => { expect(before[0]!.name).toBe("DB_PASSWORD"); // 2 + 3. Invoke tool that reads the old secret and writes a new one - const result = yield* executor.tools.invoke("vault.rotateKey", { - secretName: "DB_PASSWORD", - newValue: "correct-horse-battery-staple", - }, autoApprove); + const result = yield* executor.tools.invoke( + "vault.rotateKey", + { + secretName: "DB_PASSWORD", + newValue: "correct-horse-battery-staple", + }, + autoApprove, + ); // 4. Verify the tool returned old and new values expect(result.data).toEqual({ @@ -578,9 +589,7 @@ describe("SDK Executor", () => { expect(contactSchema.inputTypeScript).toBe( "{ name: string; homeAddress: Address; workAddress: Address }", ); - expect(companySchema.inputTypeScript).toBe( - "{ companyName: string; headquarters: Address }", - ); + expect(companySchema.inputTypeScript).toBe("{ companyName: string; headquarters: Address }"); expect(contactSchema.typeScriptDefinitions).toEqual({ Address: "{ street: string; city: string; zip: string }", }); @@ -588,7 +597,6 @@ describe("SDK Executor", () => { Address: "{ street: string; city: string; zip: string }", }); }), - ); it.effect("definitions are stored once across tools, not duplicated", () => diff --git a/packages/core/sdk/src/index.ts b/packages/core/sdk/src/index.ts index 097650674..70a1a5bc9 100644 --- a/packages/core/sdk/src/index.ts +++ b/packages/core/sdk/src/index.ts @@ -64,11 +64,7 @@ export { } from "./plugin"; // Executor -export { - createExecutor, - type Executor, - type ExecutorConfig, -} from "./executor"; +export { createExecutor, type Executor, type ExecutorConfig } from "./executor"; // Built-in plugins export { diff --git a/packages/core/sdk/src/plugin-kv.ts b/packages/core/sdk/src/plugin-kv.ts index f9314d700..1d2969a5c 100644 --- a/packages/core/sdk/src/plugin-kv.ts +++ b/packages/core/sdk/src/plugin-kv.ts @@ -57,12 +57,12 @@ export const makeInMemoryScopedKv = (): ScopedKv => { const store = new Map(); return { get: (key) => Effect.succeed(store.get(key) ?? null), - set: (key, value) => Effect.sync(() => { store.set(key, value); }), + set: (key, value) => + Effect.sync(() => { + store.set(key, value); + }), delete: (key) => Effect.sync(() => store.delete(key)), - list: () => - Effect.sync(() => - [...store.entries()].map(([key, value]) => ({ key, value })), - ), + list: () => Effect.sync(() => [...store.entries()].map(([key, value]) => ({ key, value }))), deleteAll: () => Effect.sync(() => { const n = store.size; diff --git a/packages/core/sdk/src/plugin.ts b/packages/core/sdk/src/plugin.ts index 88d1ef30b..1571a7904 100644 --- a/packages/core/sdk/src/plugin.ts +++ b/packages/core/sdk/src/plugin.ts @@ -22,10 +22,7 @@ export interface PluginContext { // Plugin definition — what a plugin provides to the SDK // --------------------------------------------------------------------------- -export interface ExecutorPlugin< - TKey extends string = string, - TExtension extends object = object, -> { +export interface ExecutorPlugin { /** Unique plugin key — becomes a property on the Executor type */ readonly key: TKey; @@ -33,10 +30,7 @@ export interface ExecutorPlugin< * Called when the executor starts. The plugin should register its tools * and return any cleanup logic + its public extension API. */ - readonly init: (ctx: PluginContext) => Effect.Effect< - PluginHandle, - Error - >; + readonly init: (ctx: PluginContext) => Effect.Effect, Error>; } export interface PluginHandle { @@ -51,13 +45,8 @@ export interface PluginHandle { // --------------------------------------------------------------------------- /** Maps a tuple of plugins to their extensions keyed by plugin key */ -export type PluginExtensions< - TPlugins extends readonly ExecutorPlugin[], -> = { - readonly [P in TPlugins[number] as P["key"]]: P extends ExecutorPlugin< - string, - infer TExt - > +export type PluginExtensions[]> = { + readonly [P in TPlugins[number] as P["key"]]: P extends ExecutorPlugin ? TExt : never; }; @@ -69,9 +58,6 @@ import type { Context } from "effect"; // definePlugin — helper for type inference // --------------------------------------------------------------------------- -export const definePlugin = < - const TKey extends string, - TExtension extends object, ->( +export const definePlugin = ( plugin: ExecutorPlugin, ): ExecutorPlugin => plugin; diff --git a/packages/core/sdk/src/plugins/in-memory-tools.ts b/packages/core/sdk/src/plugins/in-memory-tools.ts index bf74fce98..cf790dfe6 100644 --- a/packages/core/sdk/src/plugins/in-memory-tools.ts +++ b/packages/core/sdk/src/plugins/in-memory-tools.ts @@ -23,10 +23,7 @@ import { hoistDefinitions } from "../schema-refs"; // In-memory tool definition — typed via Schema // --------------------------------------------------------------------------- -export interface MemoryToolDefinition< - TInput = unknown, - TOutput = unknown, -> { +export interface MemoryToolDefinition { readonly name: string; readonly description?: string; readonly inputSchema: Schema.Schema; @@ -36,10 +33,7 @@ export interface MemoryToolDefinition< export type MemoryToolHandler = | ((args: TInput) => unknown) - | (( - args: TInput, - ctx: MemoryToolContext, - ) => Effect.Effect); + | ((args: TInput, ctx: MemoryToolContext) => Effect.Effect); export interface MemoryToolContext { /** Request input from the user. Returns user data or fails if declined. */ @@ -73,9 +67,7 @@ export interface MemoryToolSdkAccess { export interface InMemoryToolsPluginExtension { // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly addTools: ( - tools: readonly MemoryToolDefinition[], - ) => Effect.Effect; + readonly addTools: (tools: readonly MemoryToolDefinition[]) => Effect.Effect; } // --------------------------------------------------------------------------- @@ -95,7 +87,11 @@ interface HandlerEntry { const buildRegistration = ( namespace: string, def: MemoryToolDefinition, -): { registration: ToolRegistration; entry: HandlerEntry; definitions: Record } => { +): { + registration: ToolRegistration; + entry: HandlerEntry; + definitions: Record; +} => { const id = ToolId.make(`${namespace}.${def.name}`); const decode = Schema.decodeUnknownSync(def.inputSchema); const isEffect = def.handler.length >= 2; @@ -122,7 +118,11 @@ const buildRegistration = ( mayElicit: isEffect, }; - const entry: HandlerEntry = { decode, handler: def.handler as MemoryToolHandler, isEffect }; + const entry: HandlerEntry = { + decode, + handler: def.handler as MemoryToolHandler, + isEffect, + }; return { registration, entry, definitions: allDefs }; }; @@ -201,9 +201,10 @@ const makeInvoker = ( action: "decline", }); } - const handler: ElicitationHandler = raw === "accept-all" - ? () => Effect.succeed(new ElicitationResponse({ action: "accept" })) - : raw; + const handler: ElicitationHandler = + raw === "accept-all" + ? () => Effect.succeed(new ElicitationResponse({ action: "accept" })) + : raw; const response = yield* handler({ toolId, args, @@ -226,14 +227,11 @@ const makeInvoker = ( return parsed.pipe( Effect.flatMap((input) => effectHandler(input, ctx)), - Effect.map( - (data) => new ToolInvocationResult({ data, error: null }), - ), + Effect.map((data) => new ToolInvocationResult({ data, error: null })), Effect.catchAll( - (err): Effect.Effect< - ToolInvocationResult, - ToolInvocationError | ElicitationDeclinedError - > => { + ( + err, + ): Effect.Effect => { if ( err != null && typeof err === "object" && diff --git a/packages/core/sdk/src/policies.ts b/packages/core/sdk/src/policies.ts index 43459c89f..2b67af222 100644 --- a/packages/core/sdk/src/policies.ts +++ b/packages/core/sdk/src/policies.ts @@ -29,9 +29,7 @@ export class PolicyEngine extends Context.Tag("@executor/sdk/PolicyEngine")< { readonly list: (scopeId: ScopeId) => Effect.Effect; readonly check: (input: PolicyCheckInput) => Effect.Effect; - readonly add: ( - policy: Omit, - ) => Effect.Effect; + readonly add: (policy: Omit) => Effect.Effect; readonly remove: (policyId: PolicyId) => Effect.Effect; } >() {} diff --git a/packages/core/sdk/src/promise-executor.ts b/packages/core/sdk/src/promise-executor.ts index a4ab752da..3af8aca2e 100644 --- a/packages/core/sdk/src/promise-executor.ts +++ b/packages/core/sdk/src/promise-executor.ts @@ -62,9 +62,7 @@ class PromiseAdapterError extends Data.TaggedError("PromiseAdapterError")<{ readonly cause: unknown; }> {} -const fromPromise = ( - fn: () => Promise, -): Effect.Effect => +const fromPromise = (fn: () => Promise): Effect.Effect => Effect.tryPromise({ try: fn, catch: (cause) => new PromiseAdapterError({ cause }), @@ -111,17 +109,23 @@ const fromPromiseTagged = ( // --------------------------------------------------------------------------- /** Replace branded IDs with plain strings in parameter types */ -type UnbrandParam = - T extends ToolIdType ? string : - T extends SecretIdType ? string : - T extends ScopeIdType ? string : - T extends PolicyIdType ? string : - T extends readonly (infer U)[] ? readonly UnbrandParam[] : - T; +type UnbrandParam = T extends ToolIdType + ? string + : T extends SecretIdType + ? string + : T extends ScopeIdType + ? string + : T extends PolicyIdType + ? string + : T extends readonly (infer U)[] + ? readonly UnbrandParam[] + : T; /** Convert an Effect service interface to Promise-based, unbranding ID params */ type PromisifyService = { - readonly [K in keyof T]: NonNullable extends (...args: infer A) => Effect.Effect + readonly [K in keyof T]: NonNullable extends ( + ...args: infer A + ) => Effect.Effect ? (...args: { [I in keyof A]: UnbrandParam }) => Promise : T[K]; }; @@ -140,26 +144,23 @@ export interface ElicitationResponse { readonly content?: Record; } -export type ElicitationHandler = ( - ctx: ElicitationContext, -) => Promise; +export type ElicitationHandler = (ctx: ElicitationContext) => Promise; export interface InvokeOptions { readonly onElicitation: ElicitationHandler | "accept-all"; } -const toEffectElicitationHandler = (handler: ElicitationHandler) => - (ctx: ElicitationContext) => - fromPromise(() => handler(ctx)).pipe( - Effect.map( - (r) => - new ElicitationResponseClass({ - action: r.action, - content: r.content, - }), - ), - Effect.catchAll((e) => Effect.die(e.cause)), - ); +const toEffectElicitationHandler = (handler: ElicitationHandler) => (ctx: ElicitationContext) => + fromPromise(() => handler(ctx)).pipe( + Effect.map( + (r) => + new ElicitationResponseClass({ + action: r.action, + content: r.content, + }), + ), + Effect.catchAll((e) => Effect.die(e.cause)), + ); const toEffectInvokeOptions = (options: InvokeOptions): EffectInvokeOptions => ({ onElicitation: @@ -173,7 +174,11 @@ const toEffectInvokeOptions = (options: InvokeOptions): EffectInvokeOptions => ( // --------------------------------------------------------------------------- export interface ToolInvoker { - readonly invoke: (toolId: string, args: unknown, options: InvokeOptions) => Promise; + readonly invoke: ( + toolId: string, + args: unknown, + options: InvokeOptions, + ) => Promise; readonly resolveAnnotations?: (toolId: string) => Promise; } @@ -225,7 +230,9 @@ const toEffectSourceManager = (manager: SourceManager): EffectSourceManager => ( kind: manager.kind, list: () => fromPromiseDying(() => manager.list()), remove: (sourceId) => fromPromiseDying(() => manager.remove(sourceId)), - refresh: manager.refresh ? (sourceId) => fromPromiseDying(() => manager.refresh!(sourceId)) : undefined, + refresh: manager.refresh + ? (sourceId) => fromPromiseDying(() => manager.refresh!(sourceId)) + : undefined, detect: manager.detect ? (url) => fromPromiseDying(() => manager.detect!(url)) : undefined, }); @@ -247,7 +254,9 @@ const toEffectSecretProvider = (provider: SecretProvider): EffectSecretProvider const toPromiseInvoker = (invoker: EffectToolInvoker): ToolInvoker => ({ invoke: (toolId, args, options) => - run(invoker.invoke(ToolId.make(toolId), args, toEffectInvokeOptions(options))) as Promise, + run( + invoker.invoke(ToolId.make(toolId), args, toEffectInvokeOptions(options)), + ) as Promise, resolveAnnotations: invoker.resolveAnnotations ? (toolId) => run(invoker.resolveAnnotations!(ToolId.make(toolId))) : undefined, @@ -288,20 +297,15 @@ const toPromiseSecretProvider = (provider: EffectSecretProvider): SecretProvider const toEffectToolRegistry = (r: ToolRegistry): CoreToolRegistryService => ({ list: (filter) => fromPromiseDying(() => r.list(filter)), schema: (toolId) => - fromPromiseTagged( - () => r.schema(toolId), - ["ToolNotFoundError"], - ), + fromPromiseTagged(() => r.schema(toolId), ["ToolNotFoundError"]), definitions: () => fromPromiseDying(() => r.definitions()), registerDefinitions: (defs) => fromPromiseDying(() => r.registerDefinitions(defs)), - registerRuntimeDefinitions: (defs) => - fromPromiseDying(() => r.registerRuntimeDefinitions(defs)), + registerRuntimeDefinitions: (defs) => fromPromiseDying(() => r.registerRuntimeDefinitions(defs)), unregisterRuntimeDefinitions: (names) => fromPromiseDying(() => r.unregisterRuntimeDefinitions(names)), registerInvoker: (pluginKey, effectInvoker) => fromPromiseDying(() => r.registerInvoker(pluginKey, toPromiseInvoker(effectInvoker))), - resolveAnnotations: (toolId) => - fromPromiseDying(() => r.resolveAnnotations(toolId)), + resolveAnnotations: (toolId) => fromPromiseDying(() => r.resolveAnnotations(toolId)), invoke: (toolId, args, options) => fromPromiseTagged< ToolNotFoundError | ToolInvocationError | ElicitationDeclinedError, @@ -322,8 +326,7 @@ const toEffectToolRegistry = (r: ToolRegistry): CoreToolRegistryService => ({ }); const toEffectSourceRegistry = (r: SourceRegistry): CoreSourceRegistryService => ({ - addManager: (manager) => - fromPromiseDying(() => r.addManager(toPromiseSourceManager(manager))), + addManager: (manager) => fromPromiseDying(() => r.addManager(toPromiseSourceManager(manager))), registerRuntime: (source) => fromPromiseDying(() => r.registerRuntime(source)), unregisterRuntime: (sourceId) => fromPromiseDying(() => r.unregisterRuntime(sourceId)), list: () => fromPromiseDying(() => r.list()), @@ -344,8 +347,7 @@ const toEffectSecretStore = (s: SecretStore): CoreSecretStoreService => ({ () => s.resolve(secretId, scopeId), ["SecretNotFoundError", "SecretResolutionError"], ), - status: (secretId, scopeId) => - fromPromiseDying(() => s.status(secretId, scopeId)), + status: (secretId, scopeId) => fromPromiseDying(() => s.status(secretId, scopeId)), set: (input) => fromPromiseTagged( () => s.set(input), @@ -386,24 +388,44 @@ export interface PluginContext { export interface ToolRegistry extends Omit< PromisifyService, - 'list' | 'invoke' | 'registerInvoker' | 'registerRuntimeHandler' + "list" | "invoke" | "registerInvoker" | "registerRuntimeHandler" > { - readonly list: (filter?: { sourceId?: string; query?: string }) => Promise; - readonly invoke: (toolId: string, args: unknown, options: InvokeOptions) => Promise; + readonly list: (filter?: { + sourceId?: string; + query?: string; + }) => Promise; + readonly invoke: ( + toolId: string, + args: unknown, + options: InvokeOptions, + ) => Promise; readonly registerInvoker: (pluginKey: string, invoker: ToolInvoker) => Promise; readonly registerRuntimeHandler: (toolId: string, handler: RuntimeToolHandler) => Promise; } -export interface SourceRegistry extends Omit, 'addManager'> { +export interface SourceRegistry extends Omit< + PromisifyService, + "addManager" +> { readonly addManager: (manager: SourceManager) => Promise; } -export interface SecretStore extends Omit, 'set' | 'addProvider'> { - readonly set: (input: { readonly id: string; readonly scopeId: string; readonly name: string; readonly value: string; readonly provider?: string; readonly purpose?: string }) => Promise; +export interface SecretStore extends Omit< + PromisifyService, + "set" | "addProvider" +> { + readonly set: (input: { + readonly id: string; + readonly scopeId: string; + readonly name: string; + readonly value: string; + readonly provider?: string; + readonly purpose?: string; + }) => Promise; readonly addProvider: (provider: SecretProvider) => Promise; } -export interface PolicyEngine extends Omit, 'check'> { +export interface PolicyEngine extends Omit, "check"> { readonly check: (input: { scopeId: string; toolId: string }) => Promise; } @@ -412,17 +434,21 @@ const wrapPluginContext = (ctx: EffectPluginContext): PluginContext => ({ tools: { list: (filter?) => run(ctx.tools.list(filter as any)), schema: (toolId) => run(ctx.tools.schema(ToolId.make(toolId))), - invoke: (toolId, args, options) => run(ctx.tools.invoke(ToolId.make(toolId), args, toEffectInvokeOptions(options))), + invoke: (toolId, args, options) => + run(ctx.tools.invoke(ToolId.make(toolId), args, toEffectInvokeOptions(options))), definitions: () => run(ctx.tools.definitions()), registerDefinitions: (defs) => run(ctx.tools.registerDefinitions(defs)), registerRuntimeDefinitions: (defs) => run(ctx.tools.registerRuntimeDefinitions(defs)), unregisterRuntimeDefinitions: (names) => run(ctx.tools.unregisterRuntimeDefinitions(names)), - registerInvoker: (pluginKey, invoker) => run(ctx.tools.registerInvoker(pluginKey, toEffectInvoker(invoker))), + registerInvoker: (pluginKey, invoker) => + run(ctx.tools.registerInvoker(pluginKey, toEffectInvoker(invoker))), resolveAnnotations: (toolId) => run(ctx.tools.resolveAnnotations(ToolId.make(toolId))), register: (tools) => run(ctx.tools.register(tools)), registerRuntime: (tools) => run(ctx.tools.registerRuntime(tools)), - registerRuntimeHandler: (toolId, handler) => run(ctx.tools.registerRuntimeHandler(ToolId.make(toolId), toEffectRuntimeHandler(handler))), - unregisterRuntime: (toolIds) => run(ctx.tools.unregisterRuntime(toolIds.map((id) => ToolId.make(id)))), + registerRuntimeHandler: (toolId, handler) => + run(ctx.tools.registerRuntimeHandler(ToolId.make(toolId), toEffectRuntimeHandler(handler))), + unregisterRuntime: (toolIds) => + run(ctx.tools.unregisterRuntime(toolIds.map((id) => ToolId.make(id)))), unregister: (toolIds) => run(ctx.tools.unregister(toolIds.map((id) => ToolId.make(id)))), unregisterBySource: (sourceId) => run(ctx.tools.unregisterBySource(sourceId)), }, @@ -438,8 +464,10 @@ const wrapPluginContext = (ctx: EffectPluginContext): PluginContext => ({ secrets: { list: (scopeId) => run(ctx.secrets.list(ScopeId.make(scopeId))), get: (secretId) => run(ctx.secrets.get(SecretId.make(secretId))), - resolve: (secretId, scopeId) => run(ctx.secrets.resolve(SecretId.make(secretId), ScopeId.make(scopeId))), - status: (secretId, scopeId) => run(ctx.secrets.status(SecretId.make(secretId), ScopeId.make(scopeId))), + resolve: (secretId, scopeId) => + run(ctx.secrets.resolve(SecretId.make(secretId), ScopeId.make(scopeId))), + status: (secretId, scopeId) => + run(ctx.secrets.status(SecretId.make(secretId), ScopeId.make(scopeId))), set: (input) => run(ctx.secrets.set(input as SetSecretInput)), remove: (secretId) => run(ctx.secrets.remove(SecretId.make(secretId))), addProvider: (provider) => run(ctx.secrets.addProvider(toEffectSecretProvider(provider))), @@ -484,7 +512,9 @@ const toEffectPlugin = ( const handle = await plugin.init(wrapPluginContext(ctx)); return { extension: handle.extension, - close: handle.close ? () => fromPromise(() => handle.close!()) as Effect.Effect : undefined, + close: handle.close + ? () => fromPromise(() => handle.close!()) as Effect.Effect + : undefined, }; }) as Effect.Effect, }); @@ -495,14 +525,16 @@ const toEffectPlugin = ( type Promisified = T extends (...args: infer A) => Effect.Effect ? (...args: A) => Promise - : T extends object ? { readonly [K in keyof T]: Promisified } : T; + : T extends object + ? { readonly [K in keyof T]: Promisified } + : T; export type AnyPlugin = Plugin | ExecutorPlugin; export type Executor = { readonly scope: Scope; - readonly tools: Pick; - readonly sources: Pick; + readonly tools: Pick; + readonly sources: Pick; readonly policies: { readonly list: () => Promise; readonly add: (policy: Omit) => Promise; @@ -512,7 +544,13 @@ export type Executor = { readonly list: () => Promise; readonly resolve: (secretId: string) => Promise; readonly status: (secretId: string) => Promise<"resolved" | "missing">; - readonly set: (input: { readonly id: string; readonly name: string; readonly value: string; readonly provider?: string; readonly purpose?: string }) => Promise; + readonly set: (input: { + readonly id: string; + readonly name: string; + readonly value: string; + readonly provider?: string; + readonly purpose?: string; + }) => Promise; readonly remove: (secretId: string) => Promise; readonly addProvider: (provider: SecretProvider) => Promise; readonly providers: () => Promise; @@ -523,7 +561,9 @@ export type Executor = { type PluginExtensions = { readonly [P in TPlugins[number] as P["key"]]: P extends Plugin ? TExt - : P extends ExecutorPlugin ? Promisified : never; + : P extends ExecutorPlugin + ? Promisified + : never; }; function promisifyObject(obj: T): Promisified { @@ -537,7 +577,8 @@ function promisifyObject(obj: T): Promisified { return result; }; } - if (value !== null && typeof value === "object" && !Array.isArray(value)) return promisifyObject(value as object); + if (value !== null && typeof value === "object" && !Array.isArray(value)) + return promisifyObject(value as object); return value; }, }) as Promisified; @@ -587,13 +628,9 @@ export const createExecutor = async = { scope: executor.scope, tools: { - list: (filter?: { sourceId?: string; query?: string }) => run(executor.tools.list(filter as any)), + list: (filter?: { sourceId?: string; query?: string }) => + run(executor.tools.list(filter as any)), schema: (toolId: string) => run(executor.tools.schema(toolId)), definitions: () => run(executor.tools.definitions()), invoke: (toolId: string, args: unknown, options: InvokeOptions) => @@ -623,10 +661,16 @@ export const createExecutor = async run(executor.secrets.list()), resolve: (secretId: string) => run(executor.secrets.resolve(SecretId.make(secretId))), status: (secretId: string) => run(executor.secrets.status(SecretId.make(secretId))), - set: (input: { readonly id: string; readonly name: string; readonly value: string; readonly provider?: string; readonly purpose?: string }) => - run(executor.secrets.set(input as any)), + set: (input: { + readonly id: string; + readonly name: string; + readonly value: string; + readonly provider?: string; + readonly purpose?: string; + }) => run(executor.secrets.set(input as any)), remove: (secretId: string) => run(executor.secrets.remove(SecretId.make(secretId))), - addProvider: (provider: SecretProvider) => run(executor.secrets.addProvider(toEffectSecretProvider(provider))), + addProvider: (provider: SecretProvider) => + run(executor.secrets.addProvider(toEffectSecretProvider(provider))), providers: () => run(executor.secrets.providers()), }, close: () => run(executor.close()), diff --git a/packages/core/sdk/src/promise.ts b/packages/core/sdk/src/promise.ts index 5ec4e0ff7..a4f0333d5 100644 --- a/packages/core/sdk/src/promise.ts +++ b/packages/core/sdk/src/promise.ts @@ -15,12 +15,7 @@ export { } from "./promise-executor"; // Plugin context services -export type { - ToolRegistry, - SourceRegistry, - SecretStore, - PolicyEngine, -} from "./promise-executor"; +export type { ToolRegistry, SourceRegistry, SecretStore, PolicyEngine } from "./promise-executor"; // Plugin callback types export type { @@ -31,11 +26,7 @@ export type { } from "./promise-executor"; // Invocation -export type { - InvokeOptions, - ElicitationHandler, - ElicitationResponse, -} from "./promise-executor"; +export type { InvokeOptions, ElicitationHandler, ElicitationResponse } from "./promise-executor"; // Re-export data classes from the Effect core that users need export { diff --git a/packages/core/sdk/src/runtime-tools.ts b/packages/core/sdk/src/runtime-tools.ts index 20e5eeb5a..7afda46ac 100644 --- a/packages/core/sdk/src/runtime-tools.ts +++ b/packages/core/sdk/src/runtime-tools.ts @@ -3,11 +3,7 @@ import { Effect, JSONSchema, Schema } from "effect"; import { ToolId } from "./ids"; import { ToolInvocationError } from "./errors"; import { Source } from "./sources"; -import { - ToolInvocationResult, - type ToolRegistration, - type RuntimeToolHandler, -} from "./tools"; +import { ToolInvocationResult, type ToolRegistration, type RuntimeToolHandler } from "./tools"; import { hoistDefinitions } from "./schema-refs"; export interface RuntimeToolDefinition { @@ -73,10 +69,7 @@ const buildRuntimeTool = ( }; }; -const toRuntimeHandler = ( - toolId: ToolId, - entry: RuntimeHandlerEntry, -): RuntimeToolHandler => ({ +const toRuntimeHandler = (toolId: ToolId, entry: RuntimeHandlerEntry): RuntimeToolHandler => ({ invoke: (args) => Effect.try({ try: () => entry.decode(args), @@ -105,22 +98,14 @@ export const registerRuntimeTools = < const TTools extends readonly RuntimeToolDefinition[], >(input: { readonly registry: { - readonly registerRuntimeDefinitions: ( - defs: Record, - ) => Effect.Effect; - readonly unregisterRuntimeDefinitions: ( - names: readonly string[], - ) => Effect.Effect; - readonly registerRuntime: ( - tools: readonly ToolRegistration[], - ) => Effect.Effect; + readonly registerRuntimeDefinitions: (defs: Record) => Effect.Effect; + readonly unregisterRuntimeDefinitions: (names: readonly string[]) => Effect.Effect; + readonly registerRuntime: (tools: readonly ToolRegistration[]) => Effect.Effect; readonly registerRuntimeHandler: ( toolId: ToolId, handler: RuntimeToolHandler, ) => Effect.Effect; - readonly unregisterRuntime: ( - toolIds: readonly ToolId[], - ) => Effect.Effect; + readonly unregisterRuntime: (toolIds: readonly ToolId[]) => Effect.Effect; }; readonly sources?: { readonly registerRuntime: (source: Source) => Effect.Effect; @@ -144,14 +129,16 @@ export const registerRuntimeTools = < ); if (input.source && input.sources) { - yield* input.sources.registerRuntime(new Source({ - id: input.source.id, - name: input.source.name, - kind: input.source.kind ?? input.pluginKey, - runtime: true, - canRemove: input.source.canRemove ?? false, - canRefresh: input.source.canRefresh ?? false, - })); + yield* input.sources.registerRuntime( + new Source({ + id: input.source.id, + name: input.source.name, + kind: input.source.kind ?? input.pluginKey, + runtime: true, + canRemove: input.source.canRemove ?? false, + canRefresh: input.source.canRefresh ?? false, + }), + ); } const defs: Record = {}; diff --git a/packages/core/sdk/src/schema-refs.ts b/packages/core/sdk/src/schema-refs.ts index d4ac1213f..eb984d9ec 100644 --- a/packages/core/sdk/src/schema-refs.ts +++ b/packages/core/sdk/src/schema-refs.ts @@ -15,8 +15,7 @@ type Obj = Record; const REF_PATTERN = /^#\/(?:\$defs|definitions)\/(.+)$/; /** Extract the definition name from a standard $ref pointer. */ -const parseRefName = (ref: string): string | undefined => - ref.match(REF_PATTERN)?.[1]; +const parseRefName = (ref: string): string | undefined => ref.match(REF_PATTERN)?.[1]; /** * Recursively rewrite `#/definitions/` pointers to `#/$defs/`. @@ -126,10 +125,7 @@ export const collectRefs = ( * Assumes all `$ref` pointers and definitions have already been normalized * to `#/$defs/` form at registration time. */ -export const reattachDefs = ( - schema: unknown, - defs: ReadonlyMap, -): unknown => { +export const reattachDefs = (schema: unknown, defs: ReadonlyMap): unknown => { if (schema == null || typeof schema !== "object") return schema; const refs = collectRefs(schema, defs); if (refs.size === 0) return schema; diff --git a/packages/core/sdk/src/schema-types.test.ts b/packages/core/sdk/src/schema-types.test.ts index c09bf6127..29f21fd71 100644 --- a/packages/core/sdk/src/schema-types.test.ts +++ b/packages/core/sdk/src/schema-types.test.ts @@ -151,11 +151,7 @@ describe("schema-types", () => { [ "Pet", { - anyOf: [ - { $ref: "#/$defs/Dog" }, - { $ref: "#/$defs/Cat" }, - { $ref: "#/$defs/Lizard" }, - ], + anyOf: [{ $ref: "#/$defs/Dog" }, { $ref: "#/$defs/Cat" }, { $ref: "#/$defs/Lizard" }], }, ], [ @@ -215,10 +211,7 @@ describe("schema-types", () => { const defs = new Map(Object.entries(stripeBalanceTransactionsFixture.defs)); expect( - schemaToTypeScriptPreviewWithDefs( - stripeBalanceTransactionsFixture.schema, - defs, - ), + schemaToTypeScriptPreviewWithDefs(stripeBalanceTransactionsFixture.schema, defs), ).toEqual({ type: "balance_transaction", definitions: { diff --git a/packages/core/sdk/src/schema-types.ts b/packages/core/sdk/src/schema-types.ts index 5b77ad22b..69331ba3a 100644 --- a/packages/core/sdk/src/schema-types.ts +++ b/packages/core/sdk/src/schema-types.ts @@ -22,20 +22,15 @@ const asRecord = (value: unknown): JsonSchemaRecord => : {}; const asStringArray = (value: unknown): Array => - Array.isArray(value) - ? value.filter((item): item is string => typeof item === "string") - : []; + Array.isArray(value) ? value.filter((item): item is string => typeof item === "string") : []; const truncate = (value: string, maxLength: number): string => - value.length <= maxLength - ? value - : `${value.slice(0, Math.max(0, maxLength - 4))} ...`; + value.length <= maxLength ? value : `${value.slice(0, Math.max(0, maxLength - 4))} ...`; const formatPropertyKey = (value: string): string => VALID_IDENTIFIER_PATTERN.test(value) ? value : JSON.stringify(value); -const refNameFromPointer = (ref: string): string | undefined => - ref.match(REF_PATTERN)?.[1]; +const refNameFromPointer = (ref: string): string | undefined => ref.match(REF_PATTERN)?.[1]; const refFallbackLabel = (ref: string): string => refNameFromPointer(ref) ?? ref.split("/").at(-1) ?? ref; @@ -156,9 +151,7 @@ export const schemaToTypeScriptPreviewWithDefs = ( if (typeof current.$ref === "string") { const refLabel = refFallbackLabel(current.$ref); - return input.refDepthRemaining > 0 - ? refLabel - : `unknown /* ${refLabel} omitted */`; + return input.refDepthRemaining > 0 ? refLabel : `unknown /* ${refLabel} omitted */`; } if ("const" in current) { @@ -167,10 +160,7 @@ export const schemaToTypeScriptPreviewWithDefs = ( const enumValues = Array.isArray(current.enum) ? current.enum : []; if (enumValues.length > 0) { - return truncate( - enumValues.map((value) => JSON.stringify(value)).join(" | "), - maxLength, - ); + return truncate(enumValues.map((value) => JSON.stringify(value)).join(" | "), maxLength); } const largeComposite = summarizeLargeComposite(current, maxCompositeMembers); @@ -191,14 +181,14 @@ export const schemaToTypeScriptPreviewWithDefs = ( schema: current, render: (value) => renderNested(value), depthRemaining: input.depthRemaining, - }) - ?? renderComposite({ + }) ?? + renderComposite({ key: "anyOf", schema: current, render: (value) => renderNested(value), depthRemaining: input.depthRemaining, - }) - ?? renderComposite({ + }) ?? + renderComposite({ key: "allOf", schema: current, render: (value) => renderNested(value), @@ -223,10 +213,10 @@ export const schemaToTypeScriptPreviewWithDefs = ( if (current.type === "array") { const itemLabel = current.items ? render({ - currentInput: current.items, - depthRemaining: input.depthRemaining - 1, - refDepthRemaining: input.refDepthRemaining, - }) + currentInput: current.items, + depthRemaining: input.depthRemaining - 1, + refDepthRemaining: input.refDepthRemaining, + }) : "unknown"; return truncate(`${itemLabel}[]`, maxLength); } @@ -240,10 +230,10 @@ export const schemaToTypeScriptPreviewWithDefs = ( const additionalPropertiesLabel = additionalProperties && typeof additionalProperties === "object" ? render({ - currentInput: additionalProperties, - depthRemaining: input.depthRemaining - 1, - refDepthRemaining: input.refDepthRemaining, - }) + currentInput: additionalProperties, + depthRemaining: input.depthRemaining - 1, + refDepthRemaining: input.refDepthRemaining, + }) : additionalProperties === true ? "unknown" : null; @@ -257,12 +247,13 @@ export const schemaToTypeScriptPreviewWithDefs = ( } const visibleKeys = propertyKeys.slice(0, maxProperties); - const parts = visibleKeys.map((key) => - `${formatPropertyKey(key)}${required.has(key) ? "" : "?"}: ${render({ - currentInput: properties[key], - depthRemaining: input.depthRemaining - 1, - refDepthRemaining: input.refDepthRemaining, - })}` + const parts = visibleKeys.map( + (key) => + `${formatPropertyKey(key)}${required.has(key) ? "" : "?"}: ${render({ + currentInput: properties[key], + depthRemaining: input.depthRemaining - 1, + refDepthRemaining: input.refDepthRemaining, + })}`, ); if (visibleKeys.length < propertyKeys.length) { @@ -295,10 +286,7 @@ export const schemaToTypeScriptPreviewWithDefs = ( const referencedDepths = new Map(); - const collectPreviewRefs = ( - currentInput: unknown, - refDepth: number, - ): void => { + const collectPreviewRefs = (currentInput: unknown, refDepth: number): void => { const current = asRecord(currentInput); if (summarizeLargeComposite(current, maxCompositeMembers)) { @@ -353,11 +341,16 @@ export const schemaToTypeScriptPreviewWithDefs = ( return []; } - return [[name, render({ - currentInput: target, - depthRemaining: maxDepth, - refDepthRemaining: Math.max(0, maxRefDepth - refDepth), - })]] as const; + return [ + [ + name, + render({ + currentInput: target, + depthRemaining: maxDepth, + refDepthRemaining: Math.max(0, maxRefDepth - refDepth), + }), + ], + ] as const; }), ); diff --git a/packages/core/sdk/src/secrets.ts b/packages/core/sdk/src/secrets.ts index 618ee581a..5de3913e5 100644 --- a/packages/core/sdk/src/secrets.ts +++ b/packages/core/sdk/src/secrets.ts @@ -62,9 +62,7 @@ export class SecretStore extends Context.Tag("@executor/sdk/SecretStore")< readonly list: (scopeId: ScopeId) => Effect.Effect; /** Get a specific secret ref by id */ - readonly get: ( - secretId: SecretId, - ) => Effect.Effect; + readonly get: (secretId: SecretId) => Effect.Effect; /** * Resolve a secret value by id. @@ -89,11 +87,8 @@ export class SecretStore extends Context.Tag("@executor/sdk/SecretStore")< */ readonly set: (input: SetSecretInput) => Effect.Effect; - /** Remove a secret ref and its value from the provider */ - readonly remove: ( - secretId: SecretId, - ) => Effect.Effect; + readonly remove: (secretId: SecretId) => Effect.Effect; // ----- Provider management ----- diff --git a/packages/core/sdk/src/sources.ts b/packages/core/sdk/src/sources.ts index dabde429d..c20bbc6ee 100644 --- a/packages/core/sdk/src/sources.ts +++ b/packages/core/sdk/src/sources.ts @@ -25,7 +25,9 @@ export class Source extends Schema.Class("Source")({ // SourceDetectionResult — returned by detect() on a SourceManager // --------------------------------------------------------------------------- -export class SourceDetectionResult extends Schema.Class("SourceDetectionResult")({ +export class SourceDetectionResult extends Schema.Class( + "SourceDetectionResult", +)({ /** Plugin kind that detected this source */ kind: Schema.String, /** How confident the plugin is that the URL matches */ @@ -66,9 +68,7 @@ export interface SourceManager { // SourceRegistry — core service, coordinates across all plugins // --------------------------------------------------------------------------- -export class SourceRegistry extends Context.Tag( - "@executor/sdk/SourceRegistry", -)< +export class SourceRegistry extends Context.Tag("@executor/sdk/SourceRegistry")< SourceRegistry, { /** Register a source manager (called by plugins during init) */ diff --git a/packages/core/sdk/src/testing.ts b/packages/core/sdk/src/testing.ts index 8ae6ac4b3..abeea2528 100644 --- a/packages/core/sdk/src/testing.ts +++ b/packages/core/sdk/src/testing.ts @@ -14,12 +14,10 @@ import { makeInMemorySourceRegistry } from "./sources"; export const makeTestConfig = < const TPlugins extends readonly ExecutorPlugin[] = [], ->( - options?: { - readonly cwd?: string; - readonly plugins?: TPlugins; - }, -): ExecutorConfig => { +>(options?: { + readonly cwd?: string; + readonly plugins?: TPlugins; +}): ExecutorConfig => { const cwd = options?.cwd ?? "/test"; const scope: Scope = { id: ScopeId.make("test-scope"), diff --git a/packages/core/sdk/src/tools.ts b/packages/core/sdk/src/tools.ts index 52a1165a0..599fc05bb 100644 --- a/packages/core/sdk/src/tools.ts +++ b/packages/core/sdk/src/tools.ts @@ -2,10 +2,7 @@ import { Context, Effect, Schema } from "effect"; import { ToolId } from "./ids"; import { ToolNotFoundError, ToolInvocationError } from "./errors"; -import type { - ElicitationHandler, - ElicitationDeclinedError, -} from "./elicitation"; +import type { ElicitationHandler, ElicitationDeclinedError } from "./elicitation"; // --------------------------------------------------------------------------- // Tool models @@ -76,9 +73,7 @@ export class ToolRegistry extends Context.Tag("@executor/sdk/ToolRegistry")< { readonly list: (filter?: ToolListFilter) => Effect.Effect; - readonly schema: ( - toolId: ToolId, - ) => Effect.Effect; + readonly schema: (toolId: ToolId) => Effect.Effect; readonly invoke: ( toolId: ToolId, @@ -99,51 +94,36 @@ export class ToolRegistry extends Context.Tag("@executor/sdk/ToolRegistry")< * Register named schema definitions into the shared store. * Plugins call this before registering tools whose schemas use `$ref`. */ - readonly registerDefinitions: ( - defs: Record, - ) => Effect.Effect; + readonly registerDefinitions: (defs: Record) => Effect.Effect; /** * Register named schema definitions for runtime tools. These remain * runtime-only and are not persisted by storage-backed registries. */ - readonly registerRuntimeDefinitions: ( - defs: Record, - ) => Effect.Effect; + readonly registerRuntimeDefinitions: (defs: Record) => Effect.Effect; /** Remove named schema definitions that were registered for runtime tools. */ - readonly unregisterRuntimeDefinitions: ( - names: readonly string[], - ) => Effect.Effect; + readonly unregisterRuntimeDefinitions: (names: readonly string[]) => Effect.Effect; /** * Register a plugin invoker. Must be called before registering tools * with the corresponding pluginKey. */ - readonly registerInvoker: ( - pluginKey: string, - invoker: ToolInvoker, - ) => Effect.Effect; + readonly registerInvoker: (pluginKey: string, invoker: ToolInvoker) => Effect.Effect; /** * Resolve annotations for a tool by delegating to the plugin's invoker. */ - readonly resolveAnnotations: ( - toolId: ToolId, - ) => Effect.Effect; + readonly resolveAnnotations: (toolId: ToolId) => Effect.Effect; /** Register tools (used by plugins to push tools into the registry) */ - readonly register: ( - tools: readonly ToolRegistration[], - ) => Effect.Effect; + readonly register: (tools: readonly ToolRegistration[]) => Effect.Effect; /** * Register runtime-only tools. These should behave like normal tools for * listing, schema lookup, discovery, and invocation, but are not persisted. */ - readonly registerRuntime: ( - tools: readonly ToolRegistration[], - ) => Effect.Effect; + readonly registerRuntime: (tools: readonly ToolRegistration[]) => Effect.Effect; /** Register a runtime-only handler for a specific tool id. */ readonly registerRuntimeHandler: ( @@ -152,19 +132,13 @@ export class ToolRegistry extends Context.Tag("@executor/sdk/ToolRegistry")< ) => Effect.Effect; /** Unregister runtime-only tools by id without touching persisted storage. */ - readonly unregisterRuntime: ( - toolIds: readonly ToolId[], - ) => Effect.Effect; + readonly unregisterRuntime: (toolIds: readonly ToolId[]) => Effect.Effect; /** Unregister tools by id (used by plugins on cleanup) */ - readonly unregister: ( - toolIds: readonly ToolId[], - ) => Effect.Effect; + readonly unregister: (toolIds: readonly ToolId[]) => Effect.Effect; /** Unregister all tools belonging to a source */ - readonly unregisterBySource: ( - sourceId: string, - ) => Effect.Effect; + readonly unregisterBySource: (sourceId: string) => Effect.Effect; } >() {} @@ -177,25 +151,17 @@ export interface ToolInvoker { toolId: ToolId, args: unknown, options: InvokeOptions, - ) => Effect.Effect< - ToolInvocationResult, - ToolInvocationError | ElicitationDeclinedError - >; + ) => Effect.Effect; /** Dynamically compute annotations for a tool (e.g. approval requirements). */ - readonly resolveAnnotations?: ( - toolId: ToolId, - ) => Effect.Effect; + readonly resolveAnnotations?: (toolId: ToolId) => Effect.Effect; } export interface RuntimeToolHandler { readonly invoke: ( args: unknown, options: InvokeOptions, - ) => Effect.Effect< - ToolInvocationResult, - ToolInvocationError | ElicitationDeclinedError - >; + ) => Effect.Effect; readonly resolveAnnotations?: () => Effect.Effect; } @@ -204,9 +170,7 @@ export interface RuntimeToolHandler { // ToolRegistration — pure data, no closures // --------------------------------------------------------------------------- -export class ToolRegistration extends Schema.Class( - "ToolRegistration", -)({ +export class ToolRegistration extends Schema.Class("ToolRegistration")({ id: ToolId, pluginKey: Schema.String, /** Source this tool belongs to (namespace identifier) */ diff --git a/packages/core/storage-file/package.json b/packages/core/storage-file/package.json index 7b0883e1a..1976751e9 100644 --- a/packages/core/storage-file/package.json +++ b/packages/core/storage-file/package.json @@ -6,6 +6,10 @@ "exports": { ".": "./src/index.ts" }, + "scripts": { + "test": "vitest run", + "typecheck": "tsc --noEmit" + }, "dependencies": { "@effect/sql": "catalog:", "@executor/sdk": "workspace:*", @@ -18,9 +22,5 @@ "@types/node": "catalog:", "typescript": "catalog:", "vitest": "catalog:" - }, - "scripts": { - "test": "vitest run", - "typecheck": "tsc --noEmit" } } diff --git a/packages/core/storage-file/src/index.test.ts b/packages/core/storage-file/src/index.test.ts index 0501c35a0..6c5a879cd 100644 --- a/packages/core/storage-file/src/index.test.ts +++ b/packages/core/storage-file/src/index.test.ts @@ -18,9 +18,7 @@ import { makeKvPolicyEngine } from "./policy-engine"; const TestSqlLayer = SqliteClient.layer({ filename: ":memory:" }); -const withKv = ( - fn: (kv: Kv) => Effect.Effect, -) => +const withKv = (fn: (kv: Kv) => Effect.Effect) => Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; yield* migrate.pipe(Effect.catchAll((e) => Effect.die(e))); @@ -113,7 +111,13 @@ describe("KvToolRegistry", () => { Effect.gen(function* () { const reg = makeKvToolRegistry(scopeKv(kv, "tools"), scopeKv(kv, "defs")); yield* reg.register([ - { id: ToolId.make("a"), pluginKey: "test", sourceId: "test-src", name: "create-user", description: "Creates a user" }, + { + id: ToolId.make("a"), + pluginKey: "test", + sourceId: "test-src", + name: "create-user", + description: "Creates a user", + }, { id: ToolId.make("b"), pluginKey: "test", sourceId: "test-src", name: "delete-user" }, ]); @@ -167,10 +171,7 @@ describe("KvSecretStore", () => { purpose: "auth", }); - const resolved = yield* store.resolve( - SecretId.make("api-key"), - ScopeId.make("s1"), - ); + const resolved = yield* store.resolve(SecretId.make("api-key"), ScopeId.make("s1")); expect(resolved).toBe("sk-12345"); }), ), diff --git a/packages/core/storage-file/src/index.ts b/packages/core/storage-file/src/index.ts index a58f251b9..40485ed37 100644 --- a/packages/core/storage-file/src/index.ts +++ b/packages/core/storage-file/src/index.ts @@ -51,9 +51,7 @@ export { migrate } from "./schema"; // Convenience: build a full ExecutorConfig from a Kv instance // --------------------------------------------------------------------------- -export const makeKvConfig = < - const TPlugins extends readonly ExecutorPlugin[] = [], ->( +export const makeKvConfig = [] = []>( kv: Kv, options: { readonly cwd: string; @@ -73,18 +71,10 @@ export const makeKvConfig = < return { scope, - tools: makeKvToolRegistry( - scopeKv(kv, ns("tools")), - scopeKv(kv, ns("defs")), - ), + tools: makeKvToolRegistry(scopeKv(kv, ns("tools")), scopeKv(kv, ns("defs"))), sources: makeInMemorySourceRegistry(), - secrets: makeKvSecretStore( - scopeKv(kv, ns("secrets")), - ), - policies: makeKvPolicyEngine( - scopeKv(kv, ns("policies")), - scopeKv(kv, ns("meta")), - ), + secrets: makeKvSecretStore(scopeKv(kv, ns("secrets"))), + policies: makeKvPolicyEngine(scopeKv(kv, ns("policies")), scopeKv(kv, ns("meta"))), plugins: options?.plugins, }; }; diff --git a/packages/core/storage-file/src/migrations/index.ts b/packages/core/storage-file/src/migrations/index.ts index 5eaaf75a5..139f5d117 100644 --- a/packages/core/storage-file/src/migrations/index.ts +++ b/packages/core/storage-file/src/migrations/index.ts @@ -7,7 +7,6 @@ import type { ResolvedMigration } from "@effect/sql/Migrator"; import migration_0001 from "./0001_initial"; -export const loader: Effect.Effect> = - Effect.succeed([ - [1, "initial", Effect.succeed(migration_0001)], - ]); +export const loader: Effect.Effect> = Effect.succeed([ + [1, "initial", Effect.succeed(migration_0001)], +]); diff --git a/packages/core/storage-file/src/plugin-kv.ts b/packages/core/storage-file/src/plugin-kv.ts index 065acc456..0728aca5a 100644 --- a/packages/core/storage-file/src/plugin-kv.ts +++ b/packages/core/storage-file/src/plugin-kv.ts @@ -20,44 +20,54 @@ interface KvRow { export const makeSqliteKv = (sql: SqlClient.SqlClient): Kv => ({ get: (namespace, key) => - absorbSql(Effect.gen(function* () { - const rows = yield* sql` + absorbSql( + Effect.gen(function* () { + const rows = yield* sql` SELECT value FROM kv WHERE namespace = ${namespace} AND key = ${key} `; - return rows[0]?.value ?? null; - })), + return rows[0]?.value ?? null; + }), + ), set: (namespace, key, value) => - absorbSql(sql` + absorbSql( + sql` INSERT OR REPLACE INTO kv (namespace, key, value) VALUES (${namespace}, ${key}, ${value}) - `.pipe(Effect.asVoid)), + `.pipe(Effect.asVoid), + ), delete: (namespace, key) => - absorbSql(Effect.gen(function* () { - const before = yield* sql<{ c: number }>` + absorbSql( + Effect.gen(function* () { + const before = yield* sql<{ c: number }>` SELECT COUNT(*) as c FROM kv WHERE namespace = ${namespace} AND key = ${key} `; - yield* sql`DELETE FROM kv WHERE namespace = ${namespace} AND key = ${key}`; - return (before[0]?.c ?? 0) > 0; - })), + yield* sql`DELETE FROM kv WHERE namespace = ${namespace} AND key = ${key}`; + return (before[0]?.c ?? 0) > 0; + }), + ), list: (namespace) => - absorbSql(Effect.gen(function* () { - const rows = yield* sql` + absorbSql( + Effect.gen(function* () { + const rows = yield* sql` SELECT key, value FROM kv WHERE namespace = ${namespace} `; - return rows.map((r) => ({ key: r.key, value: r.value })); - })), + return rows.map((r) => ({ key: r.key, value: r.value })); + }), + ), deleteAll: (namespace) => - absorbSql(Effect.gen(function* () { - const before = yield* sql<{ c: number }>` + absorbSql( + Effect.gen(function* () { + const before = yield* sql<{ c: number }>` SELECT COUNT(*) as c FROM kv WHERE namespace = ${namespace} `; - yield* sql`DELETE FROM kv WHERE namespace = ${namespace}`; - return before[0]?.c ?? 0; - })), + yield* sql`DELETE FROM kv WHERE namespace = ${namespace}`; + return before[0]?.c ?? 0; + }), + ), withTransaction: (effect: Effect.Effect) => absorbSql( @@ -90,24 +100,25 @@ export const makeInMemoryKv = (): Kv => { const bucket = (namespace: string) => { let m = store.get(namespace); - if (!m) { m = new Map(); store.set(namespace, m); } + if (!m) { + m = new Map(); + store.set(namespace, m); + } return m; }; return { - get: (namespace, key) => - Effect.succeed(bucket(namespace).get(key) ?? null), + get: (namespace, key) => Effect.succeed(bucket(namespace).get(key) ?? null), set: (namespace, key, value) => - Effect.sync(() => { bucket(namespace).set(key, value); }), + Effect.sync(() => { + bucket(namespace).set(key, value); + }), - delete: (namespace, key) => - Effect.sync(() => bucket(namespace).delete(key)), + delete: (namespace, key) => Effect.sync(() => bucket(namespace).delete(key)), list: (namespace) => - Effect.sync(() => - [...bucket(namespace).entries()].map(([key, value]) => ({ key, value })), - ), + Effect.sync(() => [...bucket(namespace).entries()].map(([key, value]) => ({ key, value }))), deleteAll: (namespace) => Effect.sync(() => { diff --git a/packages/core/storage-file/src/policy-engine.ts b/packages/core/storage-file/src/policy-engine.ts index e6b798213..5694d1d08 100644 --- a/packages/core/storage-file/src/policy-engine.ts +++ b/packages/core/storage-file/src/policy-engine.ts @@ -19,30 +19,23 @@ const decodePolicy = Schema.decodeUnknownSync(PolicyJson); // Factory // --------------------------------------------------------------------------- -export const makeKvPolicyEngine = ( - policiesKv: ScopedKv, - metaKv: ScopedKv, -) => { +export const makeKvPolicyEngine = (policiesKv: ScopedKv, metaKv: ScopedKv) => { const getCounter = (): Effect.Effect => Effect.gen(function* () { const raw = yield* metaKv.get("policy_counter"); return raw ? parseInt(raw, 10) : 0; }); - const setCounter = (n: number): Effect.Effect => - metaKv.set("policy_counter", String(n)); + const setCounter = (n: number): Effect.Effect => metaKv.set("policy_counter", String(n)); return { list: (scopeId: ScopeId) => Effect.gen(function* () { const entries = yield* policiesKv.list(); - return entries - .map((e) => decodePolicy(e.value)) - .filter((p) => p.scopeId === scopeId); + return entries.map((e) => decodePolicy(e.value)).filter((p) => p.scopeId === scopeId); }), - check: (_input: PolicyCheckInput) => - Effect.void, + check: (_input: PolicyCheckInput) => Effect.void, add: (policy: Omit) => Effect.gen(function* () { diff --git a/packages/core/storage-file/src/secret-store.ts b/packages/core/storage-file/src/secret-store.ts index 7a546b827..c4f04cfb8 100644 --- a/packages/core/storage-file/src/secret-store.ts +++ b/packages/core/storage-file/src/secret-store.ts @@ -58,7 +58,9 @@ export const makeKvSecretStore = (refsKv: ScopedKv) => { const providerRefs: SecretRef[] = []; for (const provider of providers) { if (!provider.list) continue; - const items = yield* provider.list().pipe(Effect.orElseSucceed(() => [] as { id: string; name: string }[])); + const items = yield* provider + .list() + .pipe(Effect.orElseSucceed(() => [] as { id: string; name: string }[])); for (const item of items) { if (seenIds.has(item.id as SecretId)) continue; seenIds.add(item.id as SecretId); @@ -88,9 +90,7 @@ export const makeKvSecretStore = (refsKv: ScopedKv) => { resolve: (secretId: SecretId, _scopeId: ScopeId) => Effect.gen(function* () { const raw = yield* refsKv.get(secretId); - const providerKey = raw - ? Option.getOrUndefined(decodeRef(raw).provider) - : undefined; + const providerKey = raw ? Option.getOrUndefined(decodeRef(raw).provider) : undefined; const value = yield* resolveFromProviders(secretId, providerKey); if (value === null) { return yield* new SecretResolutionError({ @@ -169,7 +169,9 @@ export const makeKvSecretStore = (refsKv: ScopedKv) => { }), addProvider: (provider: SecretProvider) => - Effect.sync(() => { providers.push(provider); }), + Effect.sync(() => { + providers.push(provider); + }), providers: () => Effect.sync(() => providers.map((p) => p.key)), }; diff --git a/packages/core/storage-file/src/tool-registry.ts b/packages/core/storage-file/src/tool-registry.ts index c9d6cdd26..41faac569 100644 --- a/packages/core/storage-file/src/tool-registry.ts +++ b/packages/core/storage-file/src/tool-registry.ts @@ -6,12 +6,7 @@ import { Effect, Schema } from "effect"; import type { ToolId, ScopedKv } from "@executor/sdk"; import { ToolNotFoundError, ToolInvocationError, ToolRegistration } from "@executor/sdk"; -import type { - ToolInvoker, - ToolListFilter, - InvokeOptions, - RuntimeToolHandler, -} from "@executor/sdk"; +import type { ToolInvoker, ToolListFilter, InvokeOptions, RuntimeToolHandler } from "@executor/sdk"; import { buildToolTypeScriptPreview, reattachDefs } from "@executor/sdk"; // --------------------------------------------------------------------------- @@ -26,10 +21,7 @@ const decodeTool = Schema.decodeUnknownSync(ToolJson); // Factory — takes scoped KVs for tools and definitions // --------------------------------------------------------------------------- -export const makeKvToolRegistry = ( - toolsKv: ScopedKv, - defsKv: ScopedKv, -) => { +export const makeKvToolRegistry = (toolsKv: ScopedKv, defsKv: ScopedKv) => { const withKvTransaction = ( kv: ScopedKv, effect: Effect.Effect, @@ -56,8 +48,8 @@ export const makeKvToolRegistry = ( const getDefsMap = (): Effect.Effect> => Effect.gen(function* () { const entries = yield* defsKv.list(); - const defs = yield* Effect.try(() => - new Map(entries.map((e) => [e.key, JSON.parse(e.value)])), + const defs = yield* Effect.try( + () => new Map(entries.map((e) => [e.key, JSON.parse(e.value)])), ).pipe(Effect.orDie); for (const [k, v] of runtimeDefs) defs.set(k, v); return defs; @@ -78,9 +70,7 @@ export const makeKvToolRegistry = ( if (filter?.query) { const q = filter.query.toLowerCase(); tools = tools.filter( - (t) => - t.name.toLowerCase().includes(q) || - t.description?.toLowerCase().includes(q), + (t) => t.name.toLowerCase().includes(q) || t.description?.toLowerCase().includes(q), ); } return tools.map((t) => ({ @@ -149,7 +139,9 @@ export const makeKvToolRegistry = ( }), registerInvoker: (pluginKey: string, invoker: ToolInvoker) => - Effect.sync(() => { invokers.set(pluginKey, invoker); }), + Effect.sync(() => { + invokers.set(pluginKey, invoker); + }), resolveAnnotations: (toolId: ToolId) => Effect.gen(function* () { diff --git a/packages/core/storage-file/tsconfig.json b/packages/core/storage-file/tsconfig.json index c73b3d036..66c6c2905 100644 --- a/packages/core/storage-file/tsconfig.json +++ b/packages/core/storage-file/tsconfig.json @@ -15,8 +15,7 @@ "plugins": [ { "name": "@effect/language-service", - "diagnosticSeverity": { - } + "diagnosticSeverity": {} } ] }, diff --git a/packages/core/storage-postgres/drizzle/meta/0000_snapshot.json b/packages/core/storage-postgres/drizzle/meta/0000_snapshot.json index 9443cefbb..566304c28 100644 --- a/packages/core/storage-postgres/drizzle/meta/0000_snapshot.json +++ b/packages/core/storage-postgres/drizzle/meta/0000_snapshot.json @@ -38,11 +38,7 @@ "compositePrimaryKeys": { "plugin_kv_organization_id_namespace_key_pk": { "name": "plugin_kv_organization_id_namespace_key_pk", - "columns": [ - "organization_id", - "namespace", - "key" - ] + "columns": ["organization_id", "namespace", "key"] } }, "uniqueConstraints": {}, @@ -109,10 +105,7 @@ "compositePrimaryKeys": { "policies_id_organization_id_pk": { "name": "policies_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -173,10 +166,7 @@ "compositePrimaryKeys": { "secrets_id_organization_id_pk": { "name": "secrets_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -231,10 +221,7 @@ "compositePrimaryKeys": { "sources_id_organization_id_pk": { "name": "sources_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -270,10 +257,7 @@ "compositePrimaryKeys": { "tool_definitions_name_organization_id_pk": { "name": "tool_definitions_name_organization_id_pk", - "columns": [ - "name", - "organization_id" - ] + "columns": ["name", "organization_id"] } }, "uniqueConstraints": {}, @@ -352,10 +336,7 @@ "compositePrimaryKeys": { "tools_id_organization_id_pk": { "name": "tools_id_organization_id_pk", - "columns": [ - "id", - "organization_id" - ] + "columns": ["id", "organization_id"] } }, "uniqueConstraints": {}, @@ -375,4 +356,4 @@ "schemas": {}, "tables": {} } -} \ No newline at end of file +} diff --git a/packages/core/storage-postgres/drizzle/meta/_journal.json b/packages/core/storage-postgres/drizzle/meta/_journal.json index de11da2db..a73e8dc22 100644 --- a/packages/core/storage-postgres/drizzle/meta/_journal.json +++ b/packages/core/storage-postgres/drizzle/meta/_journal.json @@ -10,4 +10,4 @@ "breakpoints": true } ] -} \ No newline at end of file +} diff --git a/packages/core/storage-postgres/package.json b/packages/core/storage-postgres/package.json index 0f5108cb9..2ae249548 100644 --- a/packages/core/storage-postgres/package.json +++ b/packages/core/storage-postgres/package.json @@ -7,6 +7,12 @@ ".": "./src/index.ts", "./schema": "./src/schema.ts" }, + "scripts": { + "test": "vitest run", + "typecheck": "tsc --noEmit", + "db:generate": "drizzle-kit generate", + "db:migrate": "drizzle-kit migrate" + }, "dependencies": { "@effect/sql": "catalog:", "@effect/sql-pg": "^0.28.0", @@ -22,11 +28,5 @@ "drizzle-kit": "^0.31.0", "typescript": "catalog:", "vitest": "catalog:" - }, - "scripts": { - "test": "vitest run", - "typecheck": "tsc --noEmit", - "db:generate": "drizzle-kit generate", - "db:migrate": "drizzle-kit migrate" } } diff --git a/packages/core/storage-postgres/src/crypto.ts b/packages/core/storage-postgres/src/crypto.ts index b9c67977b..156d6f9d2 100644 --- a/packages/core/storage-postgres/src/crypto.ts +++ b/packages/core/storage-postgres/src/crypto.ts @@ -28,11 +28,7 @@ export const encrypt = ( return { encrypted, iv }; }; -export const decrypt = ( - encrypted: Buffer, - iv: Buffer, - encryptionKey: string, -): string => { +export const decrypt = (encrypted: Buffer, iv: Buffer, encryptionKey: string): string => { const key = deriveKey(encryptionKey); const authTag = encrypted.subarray(encrypted.length - AUTH_TAG_LENGTH); const ciphertext = encrypted.subarray(0, encrypted.length - AUTH_TAG_LENGTH); diff --git a/packages/core/storage-postgres/src/index.test.ts b/packages/core/storage-postgres/src/index.test.ts index 77aea7f10..d3f8daff1 100644 --- a/packages/core/storage-postgres/src/index.test.ts +++ b/packages/core/storage-postgres/src/index.test.ts @@ -44,9 +44,7 @@ beforeAll(async () => { }); beforeEach(async () => { - await db.execute( - sql`TRUNCATE plugin_kv, policies, secrets, tool_definitions, tools, sources`, - ); + await db.execute(sql`TRUNCATE plugin_kv, policies, secrets, tool_definitions, tools, sources`); }); afterAll(async () => { @@ -223,9 +221,9 @@ describe("Executor with Postgres storage", () => { }); const executor2 = yield* createExecutor(config2); - const result = yield* executor2.secrets.resolve(SecretId.make("enc-test")).pipe( - Effect.either, - ); + const result = yield* executor2.secrets + .resolve(SecretId.make("enc-test")) + .pipe(Effect.either); expect(result._tag).toBe("Left"); }), ); @@ -269,14 +267,32 @@ describe("Executor with Postgres storage", () => { it.effect("organization isolation — tools", () => Effect.gen(function* () { - const configA = makePgConfig(db, { organizationId: "org-a", organizationName: "Org A", encryptionKey: TEST_ENCRYPTION_KEY }); - const configB = makePgConfig(db, { organizationId: "org-b", organizationName: "Org B", encryptionKey: TEST_ENCRYPTION_KEY }); + const configA = makePgConfig(db, { + organizationId: "org-a", + organizationName: "Org A", + encryptionKey: TEST_ENCRYPTION_KEY, + }); + const configB = makePgConfig(db, { + organizationId: "org-b", + organizationName: "Org B", + encryptionKey: TEST_ENCRYPTION_KEY, + }); yield* configA.tools.register([ - new ToolRegistration({ id: ToolId.make("t1"), pluginKey: "test", sourceId: "src", name: "org-a-tool" }), + new ToolRegistration({ + id: ToolId.make("t1"), + pluginKey: "test", + sourceId: "src", + name: "org-a-tool", + }), ]); yield* configB.tools.register([ - new ToolRegistration({ id: ToolId.make("t1"), pluginKey: "test", sourceId: "src", name: "org-b-tool" }), + new ToolRegistration({ + id: ToolId.make("t1"), + pluginKey: "test", + sourceId: "src", + name: "org-b-tool", + }), ]); const executorA = yield* createExecutor(configA); @@ -353,4 +369,3 @@ describe("Executor with Postgres storage", () => { }), ); }); - diff --git a/packages/core/storage-postgres/src/index.ts b/packages/core/storage-postgres/src/index.ts index 97df18914..40ce62f8c 100644 --- a/packages/core/storage-postgres/src/index.ts +++ b/packages/core/storage-postgres/src/index.ts @@ -36,9 +36,7 @@ export type { DrizzleDb } from "./types"; // Convenience: build a full ExecutorConfig from a Drizzle DB instance // --------------------------------------------------------------------------- -export const makePgConfig = < - const TPlugins extends readonly ExecutorPlugin[] = [], ->( +export const makePgConfig = [] = []>( db: DrizzleDb, options: { readonly organizationId: string; diff --git a/packages/core/storage-postgres/src/pg-kv.ts b/packages/core/storage-postgres/src/pg-kv.ts index 0df90a6fc..7e5fe6f21 100644 --- a/packages/core/storage-postgres/src/pg-kv.ts +++ b/packages/core/storage-postgres/src/pg-kv.ts @@ -56,12 +56,7 @@ export const makePgKv = (db: DrizzleDb, organizationId: string): Kv => ({ const rows = await db .select({ key: pluginKv.key, value: pluginKv.value }) .from(pluginKv) - .where( - and( - eq(pluginKv.organizationId, organizationId), - eq(pluginKv.namespace, namespace), - ), - ); + .where(and(eq(pluginKv.organizationId, organizationId), eq(pluginKv.namespace, namespace))); return rows; }).pipe(Effect.orDie), @@ -69,12 +64,7 @@ export const makePgKv = (db: DrizzleDb, organizationId: string): Kv => ({ Effect.tryPromise(async () => { const result = await db .delete(pluginKv) - .where( - and( - eq(pluginKv.organizationId, organizationId), - eq(pluginKv.namespace, namespace), - ), - ) + .where(and(eq(pluginKv.organizationId, organizationId), eq(pluginKv.namespace, namespace))) .returning(); return result.length; }).pipe(Effect.orDie), diff --git a/packages/core/storage-postgres/src/policy-engine.ts b/packages/core/storage-postgres/src/policy-engine.ts index 3a20bbec4..66f6d816c 100644 --- a/packages/core/storage-postgres/src/policy-engine.ts +++ b/packages/core/storage-postgres/src/policy-engine.ts @@ -11,10 +11,7 @@ import type { PolicyCheckInput } from "@executor/sdk"; import { policies } from "./schema"; -export const makePgPolicyEngine = ( - db: DrizzleDb, - organizationId: string, -) => { +export const makePgPolicyEngine = (db: DrizzleDb, organizationId: string) => { let counter = 0; return { diff --git a/packages/core/storage-postgres/src/schema.ts b/packages/core/storage-postgres/src/schema.ts index 045a98218..df67a22a2 100644 --- a/packages/core/storage-postgres/src/schema.ts +++ b/packages/core/storage-postgres/src/schema.ts @@ -30,7 +30,9 @@ export const sources = pgTable( organizationId: text("organization_id").notNull(), name: text("name").notNull(), kind: text("kind").notNull(), - config: jsonb("config").notNull().$default(() => ({})), + config: jsonb("config") + .notNull() + .$default(() => ({})), createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(), }, (table) => [primaryKey({ columns: [table.id, table.organizationId] })], @@ -86,7 +88,9 @@ export const policies = pgTable( action: text("action").notNull(), matchToolPattern: text("match_tool_pattern"), matchSourceId: text("match_source_id"), - priority: integer("priority").notNull().$default(() => 0), + priority: integer("priority") + .notNull() + .$default(() => 0), createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(), }, (table) => [primaryKey({ columns: [table.id, table.organizationId] })], diff --git a/packages/core/storage-postgres/src/secret-store.ts b/packages/core/storage-postgres/src/secret-store.ts index b45e72353..11e7d57fe 100644 --- a/packages/core/storage-postgres/src/secret-store.ts +++ b/packages/core/storage-postgres/src/secret-store.ts @@ -13,11 +13,7 @@ import type { SecretProvider, SetSecretInput } from "@executor/sdk"; import { secrets } from "./schema"; import { encrypt, decrypt } from "./crypto"; -export const makePgSecretStore = ( - db: DrizzleDb, - organizationId: string, - encryptionKey: string, -) => { +export const makePgSecretStore = (db: DrizzleDb, organizationId: string, encryptionKey: string) => { // Additional providers can still be registered (e.g. 1Password read-only) const providers: SecretProvider[] = []; @@ -44,9 +40,9 @@ export const makePgSecretStore = ( const seenIds = new Set(refs.map((r) => r.id)); for (const provider of providers) { if (!provider.list) continue; - const items = yield* provider.list().pipe( - Effect.orElseSucceed(() => [] as { id: string; name: string }[]), - ); + const items = yield* provider + .list() + .pipe(Effect.orElseSucceed(() => [] as { id: string; name: string }[])); for (const item of items) { if (seenIds.has(item.id as SecretId)) continue; seenIds.add(item.id as SecretId); @@ -194,9 +190,10 @@ export const makePgSecretStore = ( }), addProvider: (provider: SecretProvider) => - Effect.sync(() => { providers.push(provider); }), + Effect.sync(() => { + providers.push(provider); + }), - providers: () => - Effect.sync(() => ["postgres-encrypted", ...providers.map((p) => p.key)]), + providers: () => Effect.sync(() => ["postgres-encrypted", ...providers.map((p) => p.key)]), }; }; diff --git a/packages/core/storage-postgres/src/tool-registry.ts b/packages/core/storage-postgres/src/tool-registry.ts index 18f99b8ca..5818e18a1 100644 --- a/packages/core/storage-postgres/src/tool-registry.ts +++ b/packages/core/storage-postgres/src/tool-registry.ts @@ -9,19 +9,11 @@ import type { ToolId } from "@executor/sdk"; import type { DrizzleDb } from "./types"; import { ToolNotFoundError, ToolInvocationError, ToolRegistration } from "@executor/sdk"; import { buildToolTypeScriptPreview } from "@executor/sdk"; -import type { - ToolInvoker, - ToolListFilter, - InvokeOptions, - RuntimeToolHandler, -} from "@executor/sdk"; +import type { ToolInvoker, ToolListFilter, InvokeOptions, RuntimeToolHandler } from "@executor/sdk"; import { tools, toolDefinitions } from "./schema"; -export const makePgToolRegistry = ( - db: DrizzleDb, - organizationId: string, -) => { +export const makePgToolRegistry = (db: DrizzleDb, organizationId: string) => { const runtimeTools = new Map(); const runtimeHandlers = new Map(); const runtimeDefs = new Map(); @@ -49,10 +41,7 @@ export const makePgToolRegistry = ( const getAllTools = () => Effect.tryPromise(async () => { - const rows = await db - .select() - .from(tools) - .where(eq(tools.organizationId, organizationId)); + const rows = await db.select().from(tools).where(eq(tools.organizationId, organizationId)); return rows.map( (row) => new ToolRegistration({ @@ -74,9 +63,7 @@ export const makePgToolRegistry = ( .select() .from(toolDefinitions) .where(eq(toolDefinitions.organizationId, organizationId)); - const defs = new Map( - rows.map((r) => [r.name, r.schema]), - ); + const defs = new Map(rows.map((r) => [r.name, r.schema])); for (const [k, v] of runtimeDefs) defs.set(k, v); return defs; }).pipe(Effect.orDie); @@ -96,9 +83,7 @@ export const makePgToolRegistry = ( if (filter?.query) { const q = filter.query.toLowerCase(); result = result.filter( - (t) => - t.name.toLowerCase().includes(q) || - t.description?.toLowerCase().includes(q), + (t) => t.name.toLowerCase().includes(q) || t.description?.toLowerCase().includes(q), ); } return result.map((t) => ({ @@ -156,7 +141,9 @@ export const makePgToolRegistry = ( }), registerInvoker: (pluginKey: string, invoker: ToolInvoker) => - Effect.sync(() => { invokers.set(pluginKey, invoker); }), + Effect.sync(() => { + invokers.set(pluginKey, invoker); + }), resolveAnnotations: (toolId: ToolId) => Effect.gen(function* () { @@ -225,7 +212,9 @@ export const makePgToolRegistry = ( }), registerRuntimeHandler: (toolId: ToolId, handler: RuntimeToolHandler) => - Effect.sync(() => { runtimeHandlers.set(toolId, handler); }), + Effect.sync(() => { + runtimeHandlers.set(toolId, handler); + }), unregisterRuntime: (toolIds: readonly ToolId[]) => Effect.sync(() => { diff --git a/packages/core/storage-postgres/tsconfig.json b/packages/core/storage-postgres/tsconfig.json index 9f78810fe..2e35d220b 100644 --- a/packages/core/storage-postgres/tsconfig.json +++ b/packages/core/storage-postgres/tsconfig.json @@ -14,8 +14,7 @@ "plugins": [ { "name": "@effect/language-service", - "diagnosticSeverity": { - } + "diagnosticSeverity": {} } ] }, diff --git a/packages/hosts/mcp/package.json b/packages/hosts/mcp/package.json index f5d7711d9..046ebff96 100644 --- a/packages/hosts/mcp/package.json +++ b/packages/hosts/mcp/package.json @@ -1,8 +1,8 @@ { "name": "@executor/host-mcp", + "version": "1.4.2", "private": true, "type": "module", - "version": "1.4.2", "exports": { ".": "./src/index.ts" }, @@ -13,8 +13,8 @@ }, "dependencies": { "@cfworker/json-schema": "^4.1.1", - "@executor/sdk": "workspace:*", "@executor/execution": "workspace:*", + "@executor/sdk": "workspace:*", "@modelcontextprotocol/sdk": "^1.12.1", "effect": "catalog:", "zod": "^4.3.0" diff --git a/packages/hosts/mcp/src/server.test.ts b/packages/hosts/mcp/src/server.test.ts index e30bfff6a..427033443 100644 --- a/packages/hosts/mcp/src/server.test.ts +++ b/packages/hosts/mcp/src/server.test.ts @@ -35,12 +35,8 @@ const withClient = async ( fn: (client: Client) => Promise, ) => { const mcpServer = await createExecutorMcpServer({ engine }); - const [clientTransport, serverTransport] = - InMemoryTransport.createLinkedPair(); - const client = new Client( - { name: "test-client", version: "1.0.0" }, - { capabilities }, - ); + const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); + const client = new Client({ name: "test-client", version: "1.0.0" }, { capabilities }); await mcpServer.connect(serverTransport); await client.connect(clientTransport); try { @@ -78,9 +74,9 @@ const makePausedResult = ( /** Build an engine whose execute triggers one elicitation and returns the handler's result. */ const makeElicitingEngine = ( request: FormElicitation | UrlElicitation, - formatResult: ( - response: { action: string; content?: Record }, - ) => unknown = (r) => r.action, + formatResult: (response: { action: string; content?: Record }) => unknown = ( + r, + ) => r.action, ): ExecutionEngine => makeStubEngine({ execute: async (_code, { onElicitation }) => { @@ -124,8 +120,7 @@ describe("MCP host server — client with elicitation", () => { properties: { approved: { type: "boolean" } }, }, }), - (r) => - r.action === "accept" && r.content?.approved ? "approved" : "denied", + (r) => (r.action === "accept" && r.content?.approved ? "approved" : "denied"), ); await withClient(engine, ELICITATION_CAPS, async (client) => { @@ -158,9 +153,7 @@ describe("MCP host server — client with elicitation", () => { name: "execute", arguments: { code: "x" }, }); - expect(result.content).toEqual([ - { type: "text", text: "action:decline" }, - ]); + expect(result.content).toEqual([{ type: "text", text: "action:decline" }]); }); }); @@ -266,9 +259,7 @@ describe("MCP host server — client with form-only elicitation", () => { name: "execute", arguments: { code: "test" }, }); - expect(result.content).toEqual([ - { type: "text", text: "managed: test" }, - ]); + expect(result.content).toEqual([{ type: "text", text: "managed: test" }]); }); }); @@ -284,8 +275,7 @@ describe("MCP host server — client with form-only elicitation", () => { await withClient(engine, FORM_ONLY_CAPS, async (client) => { client.setRequestHandler(ElicitRequestSchema, async (request) => { - receivedMessage = (request.params as Record) - .message as string; + receivedMessage = (request.params as Record).message as string; return { action: "accept" as const, content: {} }; }); @@ -377,9 +367,7 @@ describe("MCP host server — client without elicitation (pause/resume)", () => name: "resume", arguments: { executionId: "exec_1", action: "accept", content: "{}" }, }); - expect(result.content).toEqual([ - { type: "text", text: "resumed-ok" }, - ]); + expect(result.content).toEqual([{ type: "text", text: "resumed-ok" }]); expect(result.isError).toBeFalsy(); }); }); @@ -496,9 +484,7 @@ describe("MCP host server — elicitation error handling", () => { name: "execute", arguments: { code: "fail" }, }); - expect(result.content).toEqual([ - { type: "text", text: "fallback:cancel" }, - ]); + expect(result.content).toEqual([{ type: "text", text: "fallback:cancel" }]); }); }); }); @@ -605,9 +591,7 @@ describe("MCP host server — multiple elicitations", () => { name: "execute", arguments: { code: "multi" }, }); - expect(result.content).toEqual([ - { type: "text", text: "name=Alice,confirmed=true" }, - ]); + expect(result.content).toEqual([{ type: "text", text: "name=Alice,confirmed=true" }]); expect(callCount).toBe(2); }); }); diff --git a/packages/hosts/mcp/src/server.ts b/packages/hosts/mcp/src/server.ts index 802eed9e4..b89fbd33a 100644 --- a/packages/hosts/mcp/src/server.ts +++ b/packages/hosts/mcp/src/server.ts @@ -1,6 +1,10 @@ import { Effect, Match } from "effect"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; -import type { jsonSchemaValidator, JsonSchemaType, JsonSchemaValidator } from "@modelcontextprotocol/sdk/validation/types.js"; +import type { + jsonSchemaValidator, + JsonSchemaType, + JsonSchemaValidator, +} from "@modelcontextprotocol/sdk/validation/types.js"; import { Validator } from "@cfworker/json-schema"; import { z } from "zod/v4"; @@ -30,9 +34,7 @@ class CfWorkerJsonSchemaValidator implements jsonSchemaValidator { if (result.valid) { return { valid: true, data: input as T, errorMessage: undefined }; } - const errorMessage = result.errors - .map((e) => `${e.instanceLocation}: ${e.error}`) - .join("; "); + const errorMessage = result.errors.map((e) => `${e.instanceLocation}: ${e.error}`).join("; "); return { valid: false, data: undefined, errorMessage }; }; } @@ -52,12 +54,9 @@ export type ExecutorMcpServerConfig = // Elicitation bridge // --------------------------------------------------------------------------- -const getElicitationSupport = ( - server: McpServer, -): { form: boolean; url: boolean } => { +const getElicitationSupport = (server: McpServer): { form: boolean; url: boolean } => { const capabilities = server.server.getClientCapabilities(); - if (capabilities === undefined || !capabilities.elicitation) - return { form: false, url: false }; + if (capabilities === undefined || !capabilities.elicitation) return { form: false, url: false }; const elicitation = capabilities.elicitation as Record; return { form: Boolean(elicitation.form), url: Boolean(elicitation.url) }; }; @@ -73,27 +72,26 @@ type ElicitInputParams = } | { mode: "url"; message: string; url: string; elicitationId: string }; -const elicitationRequestToParams: ( - request: ElicitationRequest, -) => ElicitInputParams = Match.type().pipe( - Match.tag("UrlElicitation", (req) => ({ - mode: "url" as const, - message: req.message, - url: req.url, - elicitationId: req.elicitationId, - })), - Match.tag("FormElicitation", (req) => ({ - message: req.message, - // The MCP SDK validates requestedSchema as a JSON Schema with - // `type: "object"` and `properties`. For approval-only elicitations - // where no fields are needed, provide a minimal valid schema. - requestedSchema: - Object.keys(req.requestedSchema).length === 0 - ? { type: "object" as const, properties: {} } - : req.requestedSchema, - })), - Match.exhaustive, -); +const elicitationRequestToParams: (request: ElicitationRequest) => ElicitInputParams = + Match.type().pipe( + Match.tag("UrlElicitation", (req) => ({ + mode: "url" as const, + message: req.message, + url: req.url, + elicitationId: req.elicitationId, + })), + Match.tag("FormElicitation", (req) => ({ + message: req.message, + // The MCP SDK validates requestedSchema as a JSON Schema with + // `type: "object"` and `properties`. For approval-only elicitations + // where no fields are needed, provide a minimal valid schema. + requestedSchema: + Object.keys(req.requestedSchema).length === 0 + ? { type: "object" as const, properties: {} } + : req.requestedSchema, + })), + Match.exhaustive, + ); const makeMcpElicitationHandler = (server: McpServer): ElicitationHandler => @@ -110,26 +108,24 @@ const makeMcpElicitationHandler = } : elicitationRequestToParams(ctx.request); - return Effect.promise( - async (): Promise => { - try { - const response = await server.server.elicitInput( - params as Parameters[0], - ); - - return { - action: response.action, - content: response.content, - }; - } catch (err) { - console.error( - "[executor] elicitInput failed — falling back to cancel.", - err instanceof Error ? err.message : err, - ); - return { action: "cancel" }; - } - }, - ); + return Effect.promise(async (): Promise => { + try { + const response = await server.server.elicitInput( + params as Parameters[0], + ); + + return { + action: response.action, + content: response.content, + }; + } catch (err) { + console.error( + "[executor] elicitInput failed — falling back to cancel.", + err instanceof Error ? err.message : err, + ); + return { action: "cancel" }; + } + }); }; // --------------------------------------------------------------------------- @@ -142,17 +138,13 @@ type McpToolResult = { isError?: boolean; }; -const toMcpResult = ( - formatted: ReturnType, -): McpToolResult => ({ +const toMcpResult = (formatted: ReturnType): McpToolResult => ({ content: [{ type: "text", text: formatted.text }], structuredContent: formatted.structured, isError: formatted.isError || undefined, }); -const toMcpPausedResult = ( - formatted: ReturnType, -): McpToolResult => ({ +const toMcpPausedResult = (formatted: ReturnType): McpToolResult => ({ content: [{ type: "text", text: formatted.text }], structuredContent: formatted.structured, }); @@ -164,8 +156,7 @@ const toMcpPausedResult = ( export const createExecutorMcpServer = async ( config: ExecutorMcpServerConfig, ): Promise => { - const engine = - "engine" in config ? config.engine : createExecutionEngine(config); + const engine = "engine" in config ? config.engine : createExecutionEngine(config); const description = await engine.getDescription(); const server = new McpServer( @@ -187,9 +178,7 @@ export const createExecutorMcpServer = async ( : toMcpPausedResult(formatPausedExecution(outcome.execution)); }; - const parseJsonContent = ( - raw: string, - ): Record | undefined => { + const parseJsonContent = (raw: string): Record | undefined => { if (raw === "{}") return undefined; let parsed: unknown; try { @@ -197,9 +186,7 @@ export const createExecutorMcpServer = async ( } catch { return undefined; } - return typeof parsed === "object" && - parsed !== null && - !Array.isArray(parsed) + return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? (parsed as Record) : undefined; }; @@ -223,17 +210,13 @@ export const createExecutorMcpServer = async ( "Never call this without user approval unless they explicitly state otherwise.", ].join("\n"), inputSchema: { - executionId: z - .string() - .describe("The execution ID from the paused result"), + executionId: z.string().describe("The execution ID from the paused result"), action: z .enum(["accept", "decline", "cancel"]) .describe("How to respond to the interaction"), content: z .string() - .describe( - "Optional JSON-encoded response content for form elicitations", - ) + .describe("Optional JSON-encoded response content for form elicitations") .default("{}"), }, }, @@ -243,9 +226,7 @@ export const createExecutorMcpServer = async ( if (!outcome) { return { - content: [ - { type: "text", text: `No paused execution: ${executionId}` }, - ], + content: [{ type: "text", text: `No paused execution: ${executionId}` }], isError: true, }; } diff --git a/packages/hosts/mcp/src/stdio-integration.test.ts b/packages/hosts/mcp/src/stdio-integration.test.ts index 804e449d2..562fc6750 100644 --- a/packages/hosts/mcp/src/stdio-integration.test.ts +++ b/packages/hosts/mcp/src/stdio-integration.test.ts @@ -14,10 +14,7 @@ describe("MCP stdio integration", () => { args: ["run", cliEntry, "mcp", "--scope", testScope], }); - const client = new Client( - { name: "test-client", version: "1.0.0" }, - { capabilities: {} }, - ); + const client = new Client({ name: "test-client", version: "1.0.0" }, { capabilities: {} }); await client.connect(transport); diff --git a/packages/kernel/core/package.json b/packages/kernel/core/package.json index 986cfbbb1..16fd63896 100644 --- a/packages/kernel/core/package.json +++ b/packages/kernel/core/package.json @@ -1,8 +1,8 @@ { "name": "@executor/codemode-core", + "version": "1.4.2", "private": true, "type": "module", - "version": "1.4.2", "exports": { ".": "./src/index.ts" }, diff --git a/packages/kernel/core/src/effect-errors.ts b/packages/kernel/core/src/effect-errors.ts index 7f3809f17..f5040c033 100644 --- a/packages/kernel/core/src/effect-errors.ts +++ b/packages/kernel/core/src/effect-errors.ts @@ -1,13 +1,9 @@ import * as Data from "effect/Data"; -export class KernelCoreEffectError extends Data.TaggedError( - "KernelCoreEffectError", -)<{ +export class KernelCoreEffectError extends Data.TaggedError("KernelCoreEffectError")<{ readonly module: string; readonly message: string; }> {} -export const kernelCoreEffectError = ( - module: string, - message: string, -) => new KernelCoreEffectError({ module, message }); +export const kernelCoreEffectError = (module: string, message: string) => + new KernelCoreEffectError({ module, message }); diff --git a/packages/kernel/core/src/json-schema.ts b/packages/kernel/core/src/json-schema.ts index 1d990ce66..cb3f6f213 100644 --- a/packages/kernel/core/src/json-schema.ts +++ b/packages/kernel/core/src/json-schema.ts @@ -63,9 +63,7 @@ export const standardSchemaFromJsonSchema = ( })); return { - issues: issues.length > 0 - ? issues - : [{ message: "Invalid value" }], + issues: issues.length > 0 ? issues : [{ message: "Invalid value" }], }; }, }, diff --git a/packages/kernel/core/src/types.ts b/packages/kernel/core/src/types.ts index 6ef455860..ab3a52b43 100644 --- a/packages/kernel/core/src/types.ts +++ b/packages/kernel/core/src/types.ts @@ -7,8 +7,7 @@ export type ToolPath = string & { readonly __toolPath: unique symbol }; export const asToolPath = (value: string): ToolPath => value as ToolPath; /** Standard Schema alias */ -export type StandardSchema = - StandardSchemaV1; +export type StandardSchema = StandardSchemaV1; /** A tool that can be invoked */ export interface Tool { @@ -16,17 +15,12 @@ export interface Tool { readonly description?: string; readonly inputSchema: StandardSchema; readonly outputSchema?: StandardSchema; - readonly execute: ( - input: unknown, - ) => unknown | Promise; + readonly execute: (input: unknown) => unknown | Promise; } /** Invoke a tool by path from inside a sandbox */ export interface SandboxToolInvoker { - invoke(input: { - path: string; - args: unknown; - }): Effect.Effect; + invoke(input: { path: string; args: unknown }): Effect.Effect; } /** Result of executing code in a sandbox */ @@ -38,10 +32,7 @@ export type ExecuteResult = { /** Executes code in a sandboxed runtime with tool access */ export interface CodeExecutor { - execute( - code: string, - toolInvoker: SandboxToolInvoker, - ): Effect.Effect; + execute(code: string, toolInvoker: SandboxToolInvoker): Effect.Effect; } /** Accept-anything schema for tools with no input validation */ diff --git a/packages/kernel/core/src/validation.ts b/packages/kernel/core/src/validation.ts index 19a79315e..4bfd41ca8 100644 --- a/packages/kernel/core/src/validation.ts +++ b/packages/kernel/core/src/validation.ts @@ -5,11 +5,11 @@ import { kernelCoreEffectError } from "./effect-errors"; const getSchemaValidator = ( schema: unknown, -): (( - value: unknown, -) => - | StandardSchemaV1.Result - | Promise>) | null => { +): + | (( + value: unknown, + ) => StandardSchemaV1.Result | Promise>) + | null => { if (!schema || (typeof schema !== "object" && typeof schema !== "function")) { return null; } @@ -23,9 +23,7 @@ const getSchemaValidator = ( return typeof validate === "function" ? (validate as ( value: unknown, - ) => - | StandardSchemaV1.Result - | Promise>) + ) => StandardSchemaV1.Result | Promise>) : null; }; @@ -46,9 +44,7 @@ const formatIssuePath = ( }; const formatIssues = (issues: ReadonlyArray): string => - issues - .map((issue) => `${formatIssuePath(issue.path)}: ${issue.message}`) - .join("; "); + issues.map((issue) => `${formatIssuePath(issue.path)}: ${issue.message}`).join("; "); /** Validate a value against a Standard Schema */ export const validateInput = (input: { @@ -69,10 +65,7 @@ export const validateInput = (input: { return Effect.tryPromise({ try: () => Promise.resolve(validate(input.value)), catch: (cause) => - kernelCoreEffectError( - "validation", - `Validation error for ${input.path}: ${String(cause)}`, - ), + kernelCoreEffectError("validation", `Validation error for ${input.path}: ${String(cause)}`), }).pipe( Effect.flatMap((result) => { if ("issues" in result && result.issues) { diff --git a/packages/kernel/core/tsconfig.json b/packages/kernel/core/tsconfig.json index 45e3fe4c8..72c73fd19 100644 --- a/packages/kernel/core/tsconfig.json +++ b/packages/kernel/core/tsconfig.json @@ -19,7 +19,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/kernel/ir/package.json b/packages/kernel/ir/package.json index a72c39a77..0af2070b3 100644 --- a/packages/kernel/ir/package.json +++ b/packages/kernel/ir/package.json @@ -1,8 +1,8 @@ { "name": "@executor/ir", + "version": "1.4.2", "private": true, "type": "module", - "version": "1.4.2", "exports": { ".": "./src/index.ts" }, diff --git a/packages/kernel/ir/src/serialize.ts b/packages/kernel/ir/src/serialize.ts index 3c1771b84..8925ab37a 100644 --- a/packages/kernel/ir/src/serialize.ts +++ b/packages/kernel/ir/src/serialize.ts @@ -45,9 +45,7 @@ export function serialize(catalog: LiveCatalog): typeof SerializedCatalog.Type { }; } -export function deserializeToJsonSchema( - serialized: typeof SerializedCatalog.Type, -): { +export function deserializeToJsonSchema(serialized: typeof SerializedCatalog.Type): { tools: ReadonlyArray<{ path: string; description?: string; diff --git a/packages/kernel/ir/tsconfig.json b/packages/kernel/ir/tsconfig.json index 45e3fe4c8..72c73fd19 100644 --- a/packages/kernel/ir/tsconfig.json +++ b/packages/kernel/ir/tsconfig.json @@ -19,7 +19,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/kernel/runtime-deno-subprocess/package.json b/packages/kernel/runtime-deno-subprocess/package.json index 026e43da5..9e8d10609 100644 --- a/packages/kernel/runtime-deno-subprocess/package.json +++ b/packages/kernel/runtime-deno-subprocess/package.json @@ -1,8 +1,8 @@ { "name": "@executor/runtime-deno-subprocess", + "version": "0.0.3", "private": true, "type": "module", - "version": "0.0.3", "exports": { ".": "./src/index.ts" }, diff --git a/packages/kernel/runtime-deno-subprocess/src/deno-worker-process.ts b/packages/kernel/runtime-deno-subprocess/src/deno-worker-process.ts index c259dd51c..47ab5cc9c 100644 --- a/packages/kernel/runtime-deno-subprocess/src/deno-worker-process.ts +++ b/packages/kernel/runtime-deno-subprocess/src/deno-worker-process.ts @@ -38,22 +38,12 @@ const normalizeError = (cause: unknown): Error => const buildPermissionArgs = (permissions?: DenoPermissions): string[] => { if (!permissions) { - return [ - "--deny-net", - "--deny-read", - "--deny-write", - "--deny-env", - "--deny-run", - "--deny-ffi", - ]; + return ["--deny-net", "--deny-read", "--deny-write", "--deny-env", "--deny-run", "--deny-ffi"]; } const args: string[] = []; - const addPermission = ( - flag: string, - value: boolean | string[] | undefined, - ) => { + const addPermission = (flag: string, value: boolean | string[] | undefined) => { if (value === true) { args.push(`--allow-${flag}`); } else if (Array.isArray(value) && value.length > 0) { @@ -81,23 +71,14 @@ export const spawnDenoWorkerProcess = ( const child = spawn( input.executable, - [ - "run", - "--quiet", - "--no-prompt", - "--no-check", - ...permissionArgs, - input.scriptPath, - ], + ["run", "--quiet", "--no-prompt", "--no-check", ...permissionArgs, input.scriptPath], { stdio: ["pipe", "pipe", "pipe"], }, ); if (!child.stdin || !child.stdout || !child.stderr) { - throw new Error( - "Failed to create piped stdio for Deno worker subprocess", - ); + throw new Error("Failed to create piped stdio for Deno worker subprocess"); } child.stdout.setEncoding("utf8"); @@ -128,10 +109,7 @@ export const spawnDenoWorkerProcess = ( callbacks.onError(normalizeError(cause)); }; - const onExit = ( - code: number | null, - signal: NodeJS.Signals | null, - ) => { + const onExit = (code: number | null, signal: NodeJS.Signals | null) => { callbacks.onExit(code, signal); }; diff --git a/packages/kernel/runtime-deno-subprocess/src/index.test.ts b/packages/kernel/runtime-deno-subprocess/src/index.test.ts index ac0678106..7de50b209 100644 --- a/packages/kernel/runtime-deno-subprocess/src/index.test.ts +++ b/packages/kernel/runtime-deno-subprocess/src/index.test.ts @@ -65,10 +65,7 @@ skipUnlessDeno("runtime-deno-subprocess", () => { }); const output = yield* executor.execute( - [ - "const math = await tools.math.add({ a: 19, b: 23 });", - "return math;", - ].join("\n"), + ["const math = await tools.math.add({ a: 19, b: 23 });", "return math;"].join("\n"), toolInvoker, ); @@ -104,10 +101,7 @@ skipUnlessDeno("runtime-deno-subprocess", () => { const executor = makeDenoSubprocessExecutor(); const toolInvoker = makeTestInvoker({}); - const output = yield* executor.execute( - 'throw new Error("boom");', - toolInvoker, - ); + const output = yield* executor.execute('throw new Error("boom");', toolInvoker); expect(output.result).toBeNull(); expect(output.error).toContain("boom"); @@ -123,10 +117,7 @@ skipUnlessDeno("runtime-deno-subprocess", () => { }, }); - const output = yield* executor.execute( - "return await tools.broken.thing({});", - toolInvoker, - ); + const output = yield* executor.execute("return await tools.broken.thing({});", toolInvoker); expect(output.result).toBeNull(); expect(output.error).toContain("tool is broken"); @@ -140,10 +131,7 @@ skipUnlessDeno("runtime-deno-subprocess", () => { }); const toolInvoker = makeTestInvoker({}); - const output = yield* executor.execute( - "await new Promise(() => {}); return 1;", - toolInvoker, - ); + const output = yield* executor.execute("await new Promise(() => {}); return 1;", toolInvoker); expect(output.result).toBeNull(); expect(output.error).toContain("timed out"); @@ -175,10 +163,7 @@ skipUnlessDeno("runtime-deno-subprocess", () => { const toolInvoker = makeTestInvoker({}); const output = yield* executor.execute( - [ - 'const res = await fetch("https://example.com");', - "return res.status;", - ].join("\n"), + ['const res = await fetch("https://example.com");', "return res.status;"].join("\n"), toolInvoker, ); diff --git a/packages/kernel/runtime-deno-subprocess/src/index.ts b/packages/kernel/runtime-deno-subprocess/src/index.ts index bd959a6d6..ffa01a88c 100644 --- a/packages/kernel/runtime-deno-subprocess/src/index.ts +++ b/packages/kernel/runtime-deno-subprocess/src/index.ts @@ -1,11 +1,7 @@ import { spawnSync } from "node:child_process"; import { fileURLToPath } from "node:url"; -import type { - CodeExecutor, - ExecuteResult, - SandboxToolInvoker, -} from "@executor/codemode-core"; +import type { CodeExecutor, ExecuteResult, SandboxToolInvoker } from "@executor/codemode-core"; import * as Cause from "effect/Cause"; import * as Data from "effect/Data"; import * as Deferred from "effect/Deferred"; @@ -15,10 +11,7 @@ import * as Queue from "effect/Queue"; import * as Runtime from "effect/Runtime"; import * as Schema from "effect/Schema"; -import { - type DenoPermissions, - spawnDenoWorkerProcess, -} from "./deno-worker-process"; +import { type DenoPermissions, spawnDenoWorkerProcess } from "./deno-worker-process"; export type { DenoPermissions }; @@ -41,9 +34,7 @@ class DenoSpawnError extends Data.TaggedError("DenoSpawnError")<{ }> { override get message() { const code = - typeof this.reason === "object" && - this.reason !== null && - "code" in this.reason + typeof this.reason === "object" && this.reason !== null && "code" in this.reason ? String((this.reason as { code?: unknown }).code) : null; @@ -116,17 +107,14 @@ const resolveWorkerScriptPath = (): string => { try { const workerUrl = new URL("./deno-subprocess-worker.mjs", moduleUrl); if (workerUrl.protocol === "file:") return fileURLToPath(workerUrl); - return workerUrl.pathname.length > 0 - ? workerUrl.pathname - : workerUrl.toString(); + return workerUrl.pathname.length > 0 ? workerUrl.pathname : workerUrl.toString(); } catch { return moduleUrl; } }; let cachedWorkerScriptPath: string | undefined; -const workerScriptPath = (): string => - (cachedWorkerScriptPath ??= resolveWorkerScriptPath()); +const workerScriptPath = (): string => (cachedWorkerScriptPath ??= resolveWorkerScriptPath()); // --------------------------------------------------------------------------- // Helpers @@ -145,17 +133,12 @@ type HostToWorkerMessage = const causeMessage = (cause: Cause.Cause): string => { const squashed = Cause.squash(cause); if (squashed instanceof Error) { - return squashed.cause instanceof Error - ? squashed.cause.message - : squashed.message; + return squashed.cause instanceof Error ? squashed.cause.message : squashed.message; } return String(squashed); }; -const writeMessage = ( - stdin: NodeJS.WritableStream, - message: HostToWorkerMessage, -): void => { +const writeMessage = (stdin: NodeJS.WritableStream, message: HostToWorkerMessage): void => { stdin.write(`${JSON.stringify(message)}\n`); }; @@ -230,8 +213,7 @@ const executeInDeno = ( }, }, ), - catch: (cause) => - new DenoSpawnError({ executable: denoExecutable, reason: cause }), + catch: (cause) => new DenoSpawnError({ executable: denoExecutable, reason: cause }), }); // Send code to the subprocess @@ -331,9 +313,7 @@ const executeInDeno = ( // Public API // --------------------------------------------------------------------------- -export const isDenoAvailable = ( - executable: string = defaultDenoExecutable(), -): boolean => { +export const isDenoAvailable = (executable: string = defaultDenoExecutable()): boolean => { const result = spawnSync(executable, ["--version"], { stdio: "ignore", timeout: 5000, diff --git a/packages/kernel/runtime-deno-subprocess/tsconfig.json b/packages/kernel/runtime-deno-subprocess/tsconfig.json index f9126a6ee..113818895 100644 --- a/packages/kernel/runtime-deno-subprocess/tsconfig.json +++ b/packages/kernel/runtime-deno-subprocess/tsconfig.json @@ -16,7 +16,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/kernel/runtime-dynamic-worker/package.json b/packages/kernel/runtime-dynamic-worker/package.json index d6ed07d49..12d76d059 100644 --- a/packages/kernel/runtime-dynamic-worker/package.json +++ b/packages/kernel/runtime-dynamic-worker/package.json @@ -1,8 +1,8 @@ { "name": "@executor/runtime-dynamic-worker", + "version": "1.4.2", "private": true, "type": "module", - "version": "1.4.2", "exports": { ".": "./src/index.ts" }, diff --git a/packages/kernel/runtime-dynamic-worker/src/executor.ts b/packages/kernel/runtime-dynamic-worker/src/executor.ts index a0a98066f..9c2f3542b 100644 --- a/packages/kernel/runtime-dynamic-worker/src/executor.ts +++ b/packages/kernel/runtime-dynamic-worker/src/executor.ts @@ -12,11 +12,7 @@ import { RpcTarget } from "cloudflare:workers"; import * as Data from "effect/Data"; import * as Effect from "effect/Effect"; -import type { - CodeExecutor, - ExecuteResult, - SandboxToolInvoker, -} from "@executor/codemode-core"; +import type { CodeExecutor, ExecuteResult, SandboxToolInvoker } from "@executor/codemode-core"; import { normalizeCode } from "./normalize"; import { buildExecutorModule } from "./module-template"; @@ -25,9 +21,7 @@ import { buildExecutorModule } from "./module-template"; // Errors // --------------------------------------------------------------------------- -export class DynamicWorkerExecutionError extends Data.TaggedError( - "DynamicWorkerExecutionError", -)<{ +export class DynamicWorkerExecutionError extends Data.TaggedError("DynamicWorkerExecutionError")<{ readonly message: string; }> {} @@ -85,18 +79,14 @@ export class ToolDispatcher extends RpcTarget { return Effect.runPromise( this.#invoker.invoke({ path, args }).pipe( - Effect.map((value) => - JSON.stringify({ result: value }), - ), + Effect.map((value) => JSON.stringify({ result: value })), Effect.catchAll((cause) => Effect.succeed( JSON.stringify({ error: cause instanceof Error ? cause.message - : typeof cause === "object" && - cause !== null && - "message" in cause + : typeof cause === "object" && cause !== null && "message" in cause ? String((cause as { message: unknown }).message) : String(cause), }), @@ -124,19 +114,16 @@ const evaluate = async ( const dispatcher = new ToolDispatcher(toolInvoker); - const worker = options.loader.get( - `executor-${crypto.randomUUID()}`, - () => ({ - compatibilityDate: "2025-06-01", - compatibilityFlags: ["nodejs_compat"], - mainModule: ENTRY_MODULE, - modules: { - ...safeModules, - [ENTRY_MODULE]: executorModule, - }, - globalOutbound: options.globalOutbound ?? null, - }), - ); + const worker = options.loader.get(`executor-${crypto.randomUUID()}`, () => ({ + compatibilityDate: "2025-06-01", + compatibilityFlags: ["nodejs_compat"], + mainModule: ENTRY_MODULE, + modules: { + ...safeModules, + [ENTRY_MODULE]: executorModule, + }, + globalOutbound: options.globalOutbound ?? null, + })); const entrypoint = worker.getEntrypoint() as unknown as { evaluate(dispatcher: ToolDispatcher): Promise<{ @@ -176,9 +163,7 @@ const runInDynamicWorker = ( // Public API // --------------------------------------------------------------------------- -export const makeDynamicWorkerExecutor = ( - options: DynamicWorkerExecutorOptions, -): CodeExecutor => ({ +export const makeDynamicWorkerExecutor = (options: DynamicWorkerExecutorOptions): CodeExecutor => ({ execute: (code: string, toolInvoker: SandboxToolInvoker) => runInDynamicWorker(options, code, toolInvoker), }); diff --git a/packages/kernel/runtime-dynamic-worker/src/invocation.test.ts b/packages/kernel/runtime-dynamic-worker/src/invocation.test.ts index b7d16e05b..0699ab536 100644 --- a/packages/kernel/runtime-dynamic-worker/src/invocation.test.ts +++ b/packages/kernel/runtime-dynamic-worker/src/invocation.test.ts @@ -76,9 +76,7 @@ describe("makeDynamicWorkerExecutor", () => { const executor = makeDynamicWorkerExecutor({ loader }); const invoker = makeInvoker(() => null); - const result = await Effect.runPromise( - executor.execute("async () => 42", invoker), - ); + const result = await Effect.runPromise(executor.execute("async () => 42", invoker)); expect(result.error).toBeUndefined(); expect(result.result).toBe(42); @@ -150,10 +148,7 @@ describe("makeDynamicWorkerExecutor", () => { const invoker = failingInvoker("not authorized"); const result = await Effect.runPromise( - executor.execute( - "async () => { return await tools.secret.read({}); }", - invoker, - ), + executor.execute("async () => { return await tools.secret.read({}); }", invoker), ); expect(result.error).toBe("not authorized"); @@ -187,10 +182,7 @@ describe("makeDynamicWorkerExecutor", () => { const invoker = makeInvoker(() => null); const result = await Effect.runPromise( - executor.execute( - "async () => { await new Promise(r => setTimeout(r, 5000)); }", - invoker, - ), + executor.execute("async () => { await new Promise(r => setTimeout(r, 5000)); }", invoker), ); expect(result.error).toContain("timed out"); @@ -201,10 +193,7 @@ describe("makeDynamicWorkerExecutor", () => { const invoker = makeInvoker(() => null); const result = await Effect.runPromise( - executor.execute( - 'async () => { await fetch("https://example.com"); }', - invoker, - ), + executor.execute('async () => { await fetch("https://example.com"); }', invoker), ); expect(result.error).toBeDefined(); diff --git a/packages/kernel/runtime-dynamic-worker/src/module-template.ts b/packages/kernel/runtime-dynamic-worker/src/module-template.ts index 9820808d8..2c6902290 100644 --- a/packages/kernel/runtime-dynamic-worker/src/module-template.ts +++ b/packages/kernel/runtime-dynamic-worker/src/module-template.ts @@ -8,10 +8,7 @@ * 3. Executes the normalised user code with a `Promise.race` timeout. * 4. Returns `{ result, error?, logs }`. */ -export const buildExecutorModule = ( - normalizedCode: string, - timeoutMs: number, -): string => +export const buildExecutorModule = (normalizedCode: string, timeoutMs: number): string => [ 'import { WorkerEntrypoint } from "cloudflare:workers";', "", diff --git a/packages/kernel/runtime-dynamic-worker/src/normalize.ts b/packages/kernel/runtime-dynamic-worker/src/normalize.ts index 63d63923c..dce8d9d30 100644 --- a/packages/kernel/runtime-dynamic-worker/src/normalize.ts +++ b/packages/kernel/runtime-dynamic-worker/src/normalize.ts @@ -5,8 +5,7 @@ * function suitable for embedding inside the WorkerEntrypoint template. */ -const FENCED_CODE = - /^```(?:js|javascript|typescript|ts|tsx|jsx)?\s*\n([\s\S]*?)```\s*$/; +const FENCED_CODE = /^```(?:js|javascript|typescript|ts|tsx|jsx)?\s*\n([\s\S]*?)```\s*$/; const stripCodeFences = (code: string): string => { const match = code.match(FENCED_CODE); @@ -22,8 +21,7 @@ const stripCodeFences = (code: string): string => { * that it evaluates to a callable. */ const looksLikeArrowFunction = (source: string): boolean => - (source.startsWith("async") || source.startsWith("(")) && - source.includes("=>"); + (source.startsWith("async") || source.startsWith("(")) && source.includes("=>"); /** * Detect a single named function declaration (sync or async). @@ -47,9 +45,7 @@ export const normalizeCode = (code: string): string => { // Single named function declaration — wrap and call. if (looksLikeFunctionDeclaration(source)) { - const nameMatch = source.match( - /^(?:async\s+)?function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)/, - ); + const nameMatch = source.match(/^(?:async\s+)?function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)/); const name = nameMatch?.[1] ?? "fn"; return `async () => {\n${source}\nreturn ${name}();\n}`; } diff --git a/packages/kernel/runtime-dynamic-worker/tsconfig.json b/packages/kernel/runtime-dynamic-worker/tsconfig.json index 6944444a2..ad4a9bd7d 100644 --- a/packages/kernel/runtime-dynamic-worker/tsconfig.json +++ b/packages/kernel/runtime-dynamic-worker/tsconfig.json @@ -17,7 +17,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/kernel/runtime-dynamic-worker/wrangler.jsonc b/packages/kernel/runtime-dynamic-worker/wrangler.jsonc index a1b484e18..74801ba27 100644 --- a/packages/kernel/runtime-dynamic-worker/wrangler.jsonc +++ b/packages/kernel/runtime-dynamic-worker/wrangler.jsonc @@ -5,7 +5,7 @@ "compatibility_flags": ["nodejs_compat"], "worker_loaders": [ { - "binding": "LOADER" - } - ] + "binding": "LOADER", + }, + ], } diff --git a/packages/kernel/runtime-quickjs/package.json b/packages/kernel/runtime-quickjs/package.json index 0181ee4ac..25a145aab 100644 --- a/packages/kernel/runtime-quickjs/package.json +++ b/packages/kernel/runtime-quickjs/package.json @@ -1,8 +1,8 @@ { "name": "@executor/runtime-quickjs", + "version": "1.4.2", "private": true, "type": "module", - "version": "1.4.2", "exports": { ".": "./src/index.ts" }, diff --git a/packages/kernel/runtime-quickjs/src/index.test.ts b/packages/kernel/runtime-quickjs/src/index.test.ts index 1d5444ffc..185c00eec 100644 --- a/packages/kernel/runtime-quickjs/src/index.test.ts +++ b/packages/kernel/runtime-quickjs/src/index.test.ts @@ -26,10 +26,7 @@ const executor = makeQuickJsExecutor({ timeoutMs: 5_000 }); describe("quickjs executor", () => { it.effect("runs plain code", () => Effect.gen(function* () { - const result = yield* executor.execute( - `return 1 + 2`, - makeTestInvoker({}), - ); + const result = yield* executor.execute(`return 1 + 2`, makeTestInvoker({})); expect(result.result).toBe(3); expect(result.error).toBeUndefined(); }), diff --git a/packages/kernel/runtime-quickjs/src/index.ts b/packages/kernel/runtime-quickjs/src/index.ts index 4aee020d6..1aba373d9 100644 --- a/packages/kernel/runtime-quickjs/src/index.ts +++ b/packages/kernel/runtime-quickjs/src/index.ts @@ -1,8 +1,4 @@ -import type { - CodeExecutor, - ExecuteResult, - SandboxToolInvoker, -} from "@executor/codemode-core"; +import type { CodeExecutor, ExecuteResult, SandboxToolInvoker } from "@executor/codemode-core"; import * as Data from "effect/Data"; import * as Effect from "effect/Effect"; import { @@ -43,12 +39,9 @@ const toError = (cause: unknown): Error => const toErrorMessage = (cause: unknown): string => { if (typeof cause === "object" && cause !== null) { - const stack = "stack" in cause && typeof cause.stack === "string" - ? cause.stack - : undefined; - const message = "message" in cause && typeof cause.message === "string" - ? cause.message - : undefined; + const stack = "stack" in cause && typeof cause.stack === "string" ? cause.stack : undefined; + const message = + "message" in cause && typeof cause.message === "string" ? cause.message : undefined; if (stack) { return stack; @@ -71,23 +64,16 @@ const serializeJson = (value: unknown, label: string): string | undefined => { try { return JSON.stringify(value); } catch (cause) { - throw new Error( - `${label} is not JSON serializable: ${toError(cause).message}`, - ); + throw new Error(`${label} is not JSON serializable: ${toError(cause).message}`); } }; -const looksLikeInterruptedError = (message: string): boolean => - /\binterrupted\b/i.test(message); +const looksLikeInterruptedError = (message: string): boolean => /\binterrupted\b/i.test(message); const timeoutMessage = (timeoutMs: number): string => `QuickJS execution timed out after ${timeoutMs}ms`; -const normalizeExecutionError = ( - cause: unknown, - deadlineMs: number, - timeoutMs: number, -): string => { +const normalizeExecutionError = (cause: unknown, deadlineMs: number, timeoutMs: number): string => { const message = toErrorMessage(cause); return Date.now() >= deadlineMs && looksLikeInterruptedError(message) ? timeoutMessage(timeoutMs) @@ -97,8 +83,7 @@ const normalizeExecutionError = ( const buildExecutionSource = (code: string): string => { const trimmed = code.trim(); const looksLikeArrowFunction = - (trimmed.startsWith("async") || trimmed.startsWith("(")) - && trimmed.includes("=>"); + (trimmed.startsWith("async") || trimmed.startsWith("(")) && trimmed.includes("=>"); const body = looksLikeArrowFunction ? [ @@ -155,11 +140,7 @@ const buildExecutionSource = (code: string): string => { ].join("\n"); }; -const readPropDump = ( - context: QuickJSContext, - handle: QuickJSHandle, - key: string, -): unknown => { +const readPropDump = (context: QuickJSContext, handle: QuickJSHandle, key: string): unknown => { const prop = context.getProp(handle, key); try { return context.dump(prop); @@ -181,10 +162,7 @@ const readResultState = ( error: readPropDump(context, handle, "e"), }); -const createLogBridge = ( - context: QuickJSContext, - logs: string[], -): QuickJSHandle => +const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle => context.newFunction("__executor_log", (levelHandle, lineHandle) => { const level = context.getString(levelHandle); const line = context.getString(lineHandle); @@ -334,10 +312,7 @@ const evaluateInQuickJs = async ( context.setProp(context.global, "__executor_invokeTool", toolBridge); toolBridge.dispose(); - const evaluated = context.evalCode( - buildExecutionSource(code), - EXECUTION_FILENAME, - ); + const evaluated = context.evalCode(buildExecutionSource(code), EXECUTION_FILENAME); if (evaluated.error) { const error = context.dump(evaluated.error); evaluated.error.dispose(); @@ -422,9 +397,7 @@ const runInQuickJs = ( catch: (cause) => new QuickJsExecutionError({ message: String(cause) }), }); -export const makeQuickJsExecutor = ( - options: QuickJsExecutorOptions = {}, -): CodeExecutor => ({ +export const makeQuickJsExecutor = (options: QuickJsExecutorOptions = {}): CodeExecutor => ({ execute: (code: string, toolInvoker: SandboxToolInvoker) => runInQuickJs(options, code, toolInvoker), }); diff --git a/packages/kernel/runtime-quickjs/tsconfig.json b/packages/kernel/runtime-quickjs/tsconfig.json index 45e3fe4c8..72c73fd19 100644 --- a/packages/kernel/runtime-quickjs/tsconfig.json +++ b/packages/kernel/runtime-quickjs/tsconfig.json @@ -19,7 +19,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/kernel/runtime-secure-exec/package.json b/packages/kernel/runtime-secure-exec/package.json index 59b56141e..59b6ae2a7 100644 --- a/packages/kernel/runtime-secure-exec/package.json +++ b/packages/kernel/runtime-secure-exec/package.json @@ -1,8 +1,8 @@ { "name": "@executor/runtime-secure-exec", + "version": "0.0.1", "private": true, "type": "module", - "version": "0.0.1", "exports": { ".": "./src/index.ts" }, diff --git a/packages/kernel/runtime-secure-exec/src/index.test.ts b/packages/kernel/runtime-secure-exec/src/index.test.ts index 03d3b6dc8..43c016d42 100644 --- a/packages/kernel/runtime-secure-exec/src/index.test.ts +++ b/packages/kernel/runtime-secure-exec/src/index.test.ts @@ -39,10 +39,7 @@ const executor = makeSecureExecExecutor({ timeoutMs: 5_000 }); describe("secure-exec executor", () => { it.effect("runs plain code", () => Effect.gen(function* () { - const result = yield* executor.execute( - "return 1 + 2", - makeTestInvoker({}), - ); + const result = yield* executor.execute("return 1 + 2", makeTestInvoker({})); expect(result.result).toBe(3); expect(result.error).toBeUndefined(); diff --git a/packages/kernel/runtime-secure-exec/src/index.ts b/packages/kernel/runtime-secure-exec/src/index.ts index 263c17ced..90b843c39 100644 --- a/packages/kernel/runtime-secure-exec/src/index.ts +++ b/packages/kernel/runtime-secure-exec/src/index.ts @@ -1,19 +1,10 @@ -import type { - CodeExecutor, - ExecuteResult, - SandboxToolInvoker, -} from "@executor/codemode-core"; +import type { CodeExecutor, ExecuteResult, SandboxToolInvoker } from "@executor/codemode-core"; import * as Cause from "effect/Cause"; import * as Data from "effect/Data"; import * as Duration from "effect/Duration"; import * as Effect from "effect/Effect"; import * as Runtime from "effect/Runtime"; -import { - allowAll, - createInMemoryFileSystem, - createKernel, - createNodeRuntime, -} from "secure-exec"; +import { allowAll, createInMemoryFileSystem, createKernel, createNodeRuntime } from "secure-exec"; export type SecureExecExecutorOptions = { timeoutMs?: number; @@ -54,9 +45,7 @@ const formatUnknownMessage = (cause: unknown): string => { const formatCauseMessage = (cause: Cause.Cause): string => formatUnknownMessage(Cause.squash(cause)); -class SecureExecExecutionError extends Data.TaggedError( - "SecureExecExecutionError", -)<{ +class SecureExecExecutionError extends Data.TaggedError("SecureExecExecutionError")<{ readonly operation: string; readonly cause: unknown; }> { @@ -101,9 +90,7 @@ type ToolErrorEnvelope = { type ToolEnvelope = ToolSuccessEnvelope | ToolErrorEnvelope; -type RuntimePromiseRunner = ( - effect: Effect.Effect, -) => Promise; +type RuntimePromiseRunner = (effect: Effect.Effect) => Promise; type SecureExecKernel = ReturnType; @@ -128,10 +115,7 @@ type ProcessOutput = { readonly outcome: ProcessOutcome; }; -const wrapSync = ( - operation: string, - fn: () => A, -): Effect.Effect => +const wrapSync = (operation: string, fn: () => A): Effect.Effect => Effect.try({ try: fn, catch: (cause) => new SecureExecExecutionError({ operation, cause }), @@ -150,15 +134,13 @@ const use = ( operation: string, client: T, fn: (client: T) => Promise, -): Effect.Effect => - wrap(operation, () => fn(client)); +): Effect.Effect => wrap(operation, () => fn(client)); const useSync = ( operation: string, client: T, fn: (client: T) => A, -): Effect.Effect => - wrapSync(operation, () => fn(client)); +): Effect.Effect => wrapSync(operation, () => fn(client)); const encodeToolEnvelope = (envelope: ToolEnvelope): string => { try { @@ -171,9 +153,7 @@ const encodeToolEnvelope = (envelope: ToolEnvelope): string => { } }; -const parseToolArgs = ( - argsJson: unknown, -): Effect.Effect => +const parseToolArgs = (argsJson: unknown): Effect.Effect => typeof argsJson === "string" ? wrapSync("tool.parse_args", () => JSON.parse(argsJson)) : Effect.void; @@ -217,8 +197,7 @@ const invokeToolBinding = ( const buildExecutionSource = (code: string): string => { const trimmed = code.trim(); const looksLikeArrowFunction = - (trimmed.startsWith("async") || trimmed.startsWith("(")) && - trimmed.includes("=>"); + (trimmed.startsWith("async") || trimmed.startsWith("(")) && trimmed.includes("=>"); const body = looksLikeArrowFunction ? [ @@ -436,14 +415,11 @@ const evaluateInSecureExec = ( } if (processOutput.outcome.exitCode !== 0) { - const errorOutput = - processOutput.stderr.trim() || processOutput.stdout.trim(); + const errorOutput = processOutput.stderr.trim() || processOutput.stdout.trim(); return { result: null, - error: - errorOutput || - `Process exited with code ${processOutput.outcome.exitCode}`, + error: errorOutput || `Process exited with code ${processOutput.outcome.exitCode}`, logs, } satisfies ExecuteResult; } @@ -470,9 +446,7 @@ const evaluateInSecureExec = ( ); }; -export const makeSecureExecExecutor = ( - options: SecureExecExecutorOptions = {}, -): CodeExecutor => ({ +export const makeSecureExecExecutor = (options: SecureExecExecutorOptions = {}): CodeExecutor => ({ execute: (code: string, toolInvoker: SandboxToolInvoker) => evaluateInSecureExec(options, code, toolInvoker), }); diff --git a/packages/kernel/runtime-secure-exec/tsconfig.json b/packages/kernel/runtime-secure-exec/tsconfig.json index 45e3fe4c8..72c73fd19 100644 --- a/packages/kernel/runtime-secure-exec/tsconfig.json +++ b/packages/kernel/runtime-secure-exec/tsconfig.json @@ -19,7 +19,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/plugins/file-secrets/package.json b/packages/plugins/file-secrets/package.json index bb2861ed3..242350399 100644 --- a/packages/plugins/file-secrets/package.json +++ b/packages/plugins/file-secrets/package.json @@ -1,37 +1,24 @@ { "name": "@executor/plugin-file-secrets", - "type": "module", "version": "0.0.1-beta.5", + "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/file-secrets", + "bugs": { + "url": "https://github.com/RhysSullivan/executor/issues" + }, "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/RhysSullivan/executor.git", "directory": "packages/plugins/file-secrets" }, - "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/file-secrets", - "bugs": { - "url": "https://github.com/RhysSullivan/executor/issues" - }, + "files": [ + "dist" + ], + "type": "module", "exports": { ".": "./src/index.ts", "./promise": "./src/promise.ts" }, - "scripts": { - "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", - "typecheck": "bunx tsc --noEmit -p tsconfig.json", - "test": "vitest run", - "test:watch": "vitest" - }, - "dependencies": { - "@executor/sdk": "workspace:*", - "effect": "catalog:" - }, - "devDependencies": { - "@types/node": "catalog:", - "bun-types": "catalog:", - "vitest": "catalog:", - "tsup": "catalog:" - }, "publishConfig": { "access": "public", "exports": { @@ -49,7 +36,20 @@ } } }, - "files": [ - "dist" - ] + "scripts": { + "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", + "typecheck": "bunx tsc --noEmit -p tsconfig.json", + "test": "vitest run", + "test:watch": "vitest" + }, + "dependencies": { + "@executor/sdk": "workspace:*", + "effect": "catalog:" + }, + "devDependencies": { + "@types/node": "catalog:", + "bun-types": "catalog:", + "tsup": "catalog:", + "vitest": "catalog:" + } } diff --git a/packages/plugins/file-secrets/src/index.ts b/packages/plugins/file-secrets/src/index.ts index ecccf0a18..de95ff8c2 100644 --- a/packages/plugins/file-secrets/src/index.ts +++ b/packages/plugins/file-secrets/src/index.ts @@ -1,9 +1,5 @@ import { Effect, Schema } from "effect"; -import { - definePlugin, - type ExecutorPlugin, - type SecretProvider, -} from "@executor/sdk"; +import { definePlugin, type ExecutorPlugin, type SecretProvider } from "@executor/sdk"; import * as fs from "node:fs"; import * as path from "node:path"; @@ -15,17 +11,11 @@ const APP_NAME = "executor"; const xdgDataHome = (): string => process.env.XDG_DATA_HOME?.trim() || - path.join( - process.env.HOME || process.env.USERPROFILE || "~", - ".local", - "share", - ); + path.join(process.env.HOME || process.env.USERPROFILE || "~", ".local", "share"); -const authDir = (overrideDir?: string): string => - overrideDir ?? path.join(xdgDataHome(), APP_NAME); +const authDir = (overrideDir?: string): string => overrideDir ?? path.join(xdgDataHome(), APP_NAME); -const authFilePath = (overrideDir?: string): string => - path.join(authDir(overrideDir), "auth.json"); +const authFilePath = (overrideDir?: string): string => path.join(authDir(overrideDir), "auth.json"); // --------------------------------------------------------------------------- // Schema for the auth file @@ -44,9 +34,7 @@ const decodeScopedAuthFile = Schema.decodeUnknownSync(ScopedAuthFile); // File I/O with restricted permissions // --------------------------------------------------------------------------- -const readFullFile = ( - filePath: string, -): Record> => { +const readFullFile = (filePath: string): Record> => { try { if (!fs.existsSync(filePath)) return {}; const raw = fs.readFileSync(filePath, "utf-8"); @@ -56,10 +44,8 @@ const readFullFile = ( } }; -const readScopeSecrets = ( - filePath: string, - scopeId: string, -): Record => readFullFile(filePath)[scopeId] ?? {}; +const readScopeSecrets = (filePath: string, scopeId: string): Record => + readFullFile(filePath)[scopeId] ?? {}; const writeScopeSecrets = ( filePath: string, @@ -103,10 +89,7 @@ export interface FileSecretsExtension { // Provider factory (internal) // --------------------------------------------------------------------------- -const makeScopedProvider = ( - filePath: string, - scopeId: string, -): SecretProvider => ({ +const makeScopedProvider = (filePath: string, scopeId: string): SecretProvider => ({ key: "file", writable: true, @@ -154,9 +137,7 @@ export const fileSecretsPlugin = ( Effect.gen(function* () { const filePath = authFilePath(config?.directory); - yield* ctx.secrets.addProvider( - makeScopedProvider(filePath, ctx.scope.id), - ); + yield* ctx.secrets.addProvider(makeScopedProvider(filePath, ctx.scope.id)); return { extension: { filePath }, diff --git a/packages/plugins/file-secrets/src/promise.ts b/packages/plugins/file-secrets/src/promise.ts index 8aaed664c..6203abf4a 100644 --- a/packages/plugins/file-secrets/src/promise.ts +++ b/packages/plugins/file-secrets/src/promise.ts @@ -2,6 +2,5 @@ import { fileSecretsPlugin as fileSecretsPluginEffect } from "./index"; export type { FileSecretsPluginConfig } from "./index"; -export const fileSecretsPlugin = ( - config?: { readonly directory?: string }, -) => fileSecretsPluginEffect(config); +export const fileSecretsPlugin = (config?: { readonly directory?: string }) => + fileSecretsPluginEffect(config); diff --git a/packages/plugins/file-secrets/tsconfig.json b/packages/plugins/file-secrets/tsconfig.json index ca326c69c..1354b0259 100644 --- a/packages/plugins/file-secrets/tsconfig.json +++ b/packages/plugins/file-secrets/tsconfig.json @@ -5,13 +5,8 @@ "moduleResolution": "Bundler", "strict": true, "skipLibCheck": true, - "lib": [ - "ES2022" - ], - "types": [ - "bun-types", - "node" - ], + "lib": ["ES2022"], + "types": ["bun-types", "node"], "noUnusedLocals": true, "noImplicitOverride": true, "plugins": [ @@ -23,7 +18,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/plugins/google-discovery/fixtures/drive.json b/packages/plugins/google-discovery/fixtures/drive.json index a0c53e7fe..71d30ab5c 100644 --- a/packages/plugins/google-discovery/fixtures/drive.json +++ b/packages/plugins/google-discovery/fixtures/drive.json @@ -32,9 +32,7 @@ "response": { "$ref": "File" }, - "scopes": [ - "https://www.googleapis.com/auth/drive.readonly" - ] + "scopes": ["https://www.googleapis.com/auth/drive.readonly"] }, "update": { "id": "drive.files.update", @@ -53,9 +51,7 @@ "response": { "$ref": "File" }, - "scopes": [ - "https://www.googleapis.com/auth/drive" - ] + "scopes": ["https://www.googleapis.com/auth/drive"] } } } diff --git a/packages/plugins/google-discovery/package.json b/packages/plugins/google-discovery/package.json index dc14af55f..4d6b77d94 100644 --- a/packages/plugins/google-discovery/package.json +++ b/packages/plugins/google-discovery/package.json @@ -1,17 +1,20 @@ { "name": "@executor/plugin-google-discovery", - "type": "module", "version": "0.0.1-beta.5", + "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/google-discovery", + "bugs": { + "url": "https://github.com/RhysSullivan/executor/issues" + }, "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/RhysSullivan/executor.git", "directory": "packages/plugins/google-discovery" }, - "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/google-discovery", - "bugs": { - "url": "https://github.com/RhysSullivan/executor/issues" - }, + "files": [ + "dist" + ], + "type": "module", "exports": { ".": "./src/sdk/index.ts", "./promise": "./src/promise.ts", @@ -19,6 +22,23 @@ "./react": "./src/react/index.ts", "./presets": "./src/sdk/presets.ts" }, + "publishConfig": { + "access": "public", + "exports": { + ".": { + "import": { + "types": "./dist/promise.d.ts", + "default": "./dist/index.js" + } + }, + "./core": { + "import": { + "types": "./dist/sdk/index.d.ts", + "default": "./dist/core.js" + } + } + } + }, "scripts": { "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", "typecheck": "bunx tsc --noEmit -p tsconfig.json", @@ -31,11 +51,21 @@ "@executor/sdk": "workspace:*", "effect": "catalog:" }, - "peerDependencies": { + "devDependencies": { + "@effect-atom/atom-react": "^0.5.0", + "@executor/react": "workspace:*", + "@types/node": "catalog:", + "@types/react": "catalog:", + "bun-types": "catalog:", "react": "catalog:", + "tsup": "catalog:", + "vitest": "catalog:" + }, + "peerDependencies": { "@effect-atom/atom-react": "^0.5.0", + "@executor/react": "workspace:*", "@tanstack/react-router": "catalog:", - "@executor/react": "workspace:*" + "react": "catalog:" }, "peerDependenciesMeta": { "react": { @@ -50,35 +80,5 @@ "@executor/react": { "optional": true } - }, - "devDependencies": { - "@effect-atom/atom-react": "^0.5.0", - "@executor/react": "workspace:*", - "@types/node": "catalog:", - "@types/react": "catalog:", - "bun-types": "catalog:", - "react": "catalog:", - "vitest": "catalog:", - "tsup": "catalog:" - }, - "publishConfig": { - "access": "public", - "exports": { - ".": { - "import": { - "types": "./dist/promise.d.ts", - "default": "./dist/index.js" - } - }, - "./core": { - "import": { - "types": "./dist/sdk/index.d.ts", - "default": "./dist/core.js" - } - } - } - }, - "files": [ - "dist" - ] + } } diff --git a/packages/plugins/google-discovery/src/api/group.ts b/packages/plugins/google-discovery/src/api/group.ts index 632e0014c..6c2f5ac30 100644 --- a/packages/plugins/google-discovery/src/api/group.ts +++ b/packages/plugins/google-discovery/src/api/group.ts @@ -124,5 +124,4 @@ export class GoogleDiscoveryGroup extends HttpApiGroup.make("googleDiscovery") .setUrlParams(OAuthCallbackParams) .addSuccess(HtmlResponse) .addError(ApiError), - ) - {} + ) {} diff --git a/packages/plugins/google-discovery/src/api/handlers.ts b/packages/plugins/google-discovery/src/api/handlers.ts index f846ace4b..febd1a647 100644 --- a/packages/plugins/google-discovery/src/api/handlers.ts +++ b/packages/plugins/google-discovery/src/api/handlers.ts @@ -9,9 +9,10 @@ import type { } from "../sdk/plugin"; import { GoogleDiscoveryGroup } from "./group"; -export class GoogleDiscoveryExtensionService extends Context.Tag( - "GoogleDiscoveryExtensionService", -)() {} +export class GoogleDiscoveryExtensionService extends Context.Tag("GoogleDiscoveryExtensionService")< + GoogleDiscoveryExtensionService, + GoogleDiscoveryPluginExtension +>() {} const ExecutorApiWithGoogleDiscovery = addGroup(GoogleDiscoveryGroup); @@ -128,8 +129,7 @@ export const GoogleDiscoveryHandlers = HttpApiBuilder.group( type: "executor:oauth-result", ok: false, sessionId: null, - error: - error instanceof Error ? error.message : String(error), + error: error instanceof Error ? error.message : String(error), }), ), ); diff --git a/packages/plugins/google-discovery/src/api/index.ts b/packages/plugins/google-discovery/src/api/index.ts index 600c9e4d1..c16b06468 100644 --- a/packages/plugins/google-discovery/src/api/index.ts +++ b/packages/plugins/google-discovery/src/api/index.ts @@ -1,5 +1,2 @@ export { GoogleDiscoveryGroup } from "./group"; -export { - GoogleDiscoveryExtensionService, - GoogleDiscoveryHandlers, -} from "./handlers"; +export { GoogleDiscoveryExtensionService, GoogleDiscoveryHandlers } from "./handlers"; diff --git a/packages/plugins/google-discovery/src/promise.ts b/packages/plugins/google-discovery/src/promise.ts index 1cc14f004..2fc3982df 100644 --- a/packages/plugins/google-discovery/src/promise.ts +++ b/packages/plugins/google-discovery/src/promise.ts @@ -15,6 +15,5 @@ export interface GoogleDiscoveryPluginOptions { readonly bindingStore?: import("./sdk/binding-store").GoogleDiscoveryBindingStore; } -export const googleDiscoveryPlugin = ( - options?: GoogleDiscoveryPluginOptions, -) => googleDiscoveryPluginEffect(options); +export const googleDiscoveryPlugin = (options?: GoogleDiscoveryPluginOptions) => + googleDiscoveryPluginEffect(options); diff --git a/packages/plugins/google-discovery/src/react/AddGoogleDiscoverySource.tsx b/packages/plugins/google-discovery/src/react/AddGoogleDiscoverySource.tsx index efbb29805..ff1f23b18 100644 --- a/packages/plugins/google-discovery/src/react/AddGoogleDiscoverySource.tsx +++ b/packages/plugins/google-discovery/src/react/AddGoogleDiscoverySource.tsx @@ -16,11 +16,7 @@ import { Input } from "@executor/react/components/input"; import { Label } from "@executor/react/components/label"; import { RadioGroup, RadioGroupItem } from "@executor/react/components/radio-group"; import { Spinner } from "@executor/react/components/spinner"; -import { - addGoogleDiscoverySource, - probeGoogleDiscovery, - startGoogleDiscoveryOAuth, -} from "./atoms"; +import { addGoogleDiscoverySource, probeGoogleDiscovery, startGoogleDiscoveryOAuth } from "./atoms"; // --------------------------------------------------------------------------- // Inline secret creation @@ -77,7 +73,9 @@ function InlineCreateSecret(props: { />
- + setSecretName((e.target as HTMLInputElement).value)} @@ -154,19 +152,11 @@ function ClientSecretField(props: { placeholder="Optional for confidential clients" />
- {clientSecretSecretId && ( - )} @@ -187,9 +177,7 @@ type GoogleDiscoveryTemplate = { const defaultGoogleDiscoveryUrl = (service: string, version: string): string => `https://www.googleapis.com/discovery/v1/apis/${service}/${version}/rest`; -const googleDiscoveryTemplate = ( - template: GoogleDiscoveryTemplate, -): GoogleDiscoveryTemplate => ({ +const googleDiscoveryTemplate = (template: GoogleDiscoveryTemplate): GoogleDiscoveryTemplate => ({ ...template, discoveryUrl: template.discoveryUrl || defaultGoogleDiscoveryUrl(template.service, template.version), @@ -297,7 +285,8 @@ const GOOGLE_DISCOVERY_TEMPLATES: readonly GoogleDiscoveryTemplate[] = [ const GOOGLE_SERVICE_ICON_URLS: Record = { calendar: "https://fonts.gstatic.com/s/i/productlogos/calendar_2020q4/v8/192px.svg", drive: "https://fonts.gstatic.com/s/i/productlogos/drive_2020q4/v8/192px.svg", - gmail: "https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/web-96dp/logo_gmail_2020q4_color_2x_web_96dp.png", + gmail: + "https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/web-96dp/logo_gmail_2020q4_color_2x_web_96dp.png", docs: "https://fonts.gstatic.com/s/i/productlogos/docs_2020q4/v12/192px.svg", sheets: "https://fonts.gstatic.com/s/i/productlogos/sheets_2020q4/v8/192px.svg", slides: "https://fonts.gstatic.com/s/i/productlogos/slides_2020q4/v12/192px.svg", @@ -309,10 +298,7 @@ const GOOGLE_SERVICE_ICON_URLS: Record = { youtube: "https://fonts.gstatic.com/s/i/productlogos/youtube/v9/192px.svg", }; -function GoogleServiceIcon(props: { - readonly service: string; - readonly className?: string; -}) { +function GoogleServiceIcon(props: { readonly service: string; readonly className?: string }) { const { service, className = "size-11" } = props; const src = GOOGLE_SERVICE_ICON_URLS[service] ?? GOOGLE_SERVICE_ICON_URLS.bigquery; @@ -381,9 +367,8 @@ function openOAuthPopup( const top = window.screenY + (window.outerHeight - h) / 2; let settled = false; - const channel = typeof BroadcastChannel !== "undefined" - ? new BroadcastChannel(OAUTH_RESULT_CHANNEL) - : null; + const channel = + typeof BroadcastChannel !== "undefined" ? new BroadcastChannel(OAUTH_RESULT_CHANNEL) : null; const settle = () => { if (settled) return; settled = true; @@ -421,16 +406,17 @@ export default function AddGoogleDiscoverySource(props: { readonly initialUrl?: string; }) { const defaultTemplate = - GOOGLE_DISCOVERY_TEMPLATES.find((template) => template.id === "google-sheets") - ?? GOOGLE_DISCOVERY_TEMPLATES[0]!; + GOOGLE_DISCOVERY_TEMPLATES.find((template) => template.id === "google-sheets") ?? + GOOGLE_DISCOVERY_TEMPLATES[0]!; const [discoveryUrl, setDiscoveryUrl] = useState( props.initialUrl ?? defaultTemplate.discoveryUrl, ); const [name, setName] = useState(props.initialUrl ? "" : defaultTemplate.name); - const [selectedTemplateId, setSelectedTemplateId] = useState(props.initialUrl ? "" : defaultTemplate.id); + const [selectedTemplateId, setSelectedTemplateId] = useState( + props.initialUrl ? "" : defaultTemplate.id, + ); const selectedTemplate = - GOOGLE_DISCOVERY_TEMPLATES.find((template) => template.id === selectedTemplateId) - ?? null; + GOOGLE_DISCOVERY_TEMPLATES.find((template) => template.id === selectedTemplateId) ?? null; const [authKind, setAuthKind] = useState<"none" | "oauth2">("oauth2"); const [clientId, setClientId] = useState(""); const [clientSecretSecretId, setClientSecretSecretId] = useState(null); @@ -448,10 +434,7 @@ export default function AddGoogleDiscoverySource(props: { const doStartOAuth = useAtomSet(startGoogleDiscoveryOAuth, { mode: "promise" }); const secrets = useAtomValue(secretsAtom(scopeId)); - const canUseOAuth = useMemo( - () => (probe?.scopes.length ?? 0) > 0, - [probe], - ); + const canUseOAuth = useMemo(() => (probe?.scopes.length ?? 0) > 0, [probe]); const secretList: readonly SecretPickerSecret[] = Result.match(secrets, { onInitial: () => [] as SecretPickerSecret[], onFailure: () => [] as SecretPickerSecret[], @@ -581,7 +564,7 @@ export default function AddGoogleDiscoverySource(props: { discoveryUrl: discoveryUrl.trim(), auth: authKind === "oauth2" - ? oauthAuth ?? { kind: "none" as const } + ? (oauthAuth ?? { kind: "none" as const }) : { kind: "none" as const }, }, }); @@ -593,16 +576,12 @@ export default function AddGoogleDiscoverySource(props: { }, [probe, doAdd, name, discoveryUrl, authKind, oauthAuth, props]); const addDisabled = - !probe || - adding || - (authKind === "oauth2" && (!canUseOAuth || oauthAuth === null)); + !probe || adding || (authKind === "oauth2" && (!canUseOAuth || oauthAuth === null)); return (
-

- Add Google Discovery Source -

+

Add Google Discovery Source

Connect a Google API from its Discovery document and register its methods as tools.

@@ -639,12 +618,8 @@ export default function AddGoogleDiscoverySource(props: {
-

- {template.name} -

-

- {template.summary} -

+

{template.name}

+

{template.summary}

@@ -672,7 +647,13 @@ export default function AddGoogleDiscoverySource(props: { className="flex-1 font-mono text-sm" />
@@ -697,9 +678,7 @@ export default function AddGoogleDiscoverySource(props: { />
-

- {probe.title ?? probe.name} -

+

{probe.title ?? probe.name}

{probe.service} · {probe.version}

@@ -726,10 +705,7 @@ export default function AddGoogleDiscoverySource(props: {
- + @@ -751,11 +727,7 @@ export default function AddGoogleDiscoverySource(props: { onSelect={setClientSecretSecretId} secretList={secretList} /> - +

@@ -780,11 +752,15 @@ export default function AddGoogleDiscoverySource(props: { onClick={handleStartOAuth} disabled={!probe || !clientId.trim() || !canUseOAuth || startingOAuth} > - {startingOAuth - ? <> Waiting… - : oauthAuth - ? "Re-authenticate" - : "Connect Google"} + {startingOAuth ? ( + <> + Waiting… + + ) : oauthAuth ? ( + "Re-authenticate" + ) : ( + "Connect Google" + )} {startingOAuth && ( @@ -118,7 +134,9 @@ function EditForm(props: { )}

- + @@ -131,10 +149,7 @@ function EditForm(props: { // Main component // --------------------------------------------------------------------------- -export default function EditGraphqlSource(props: { - sourceId: string; - onSave: () => void; -}) { +export default function EditGraphqlSource(props: { sourceId: string; onSave: () => void }) { const scopeId = useScope(); const sourceResult = useAtomValue(graphqlSourceAtom(scopeId, props.sourceId)); diff --git a/packages/plugins/graphql/src/react/GraphqlSourceSummary.tsx b/packages/plugins/graphql/src/react/GraphqlSourceSummary.tsx index 5e6b02329..a6bf3e6c8 100644 --- a/packages/plugins/graphql/src/react/GraphqlSourceSummary.tsx +++ b/packages/plugins/graphql/src/react/GraphqlSourceSummary.tsx @@ -1,9 +1,3 @@ -export default function GraphqlSourceSummary(props: { - sourceId: string; -}) { - return ( - - GraphQL · {props.sourceId} - - ); +export default function GraphqlSourceSummary(props: { sourceId: string }) { + return GraphQL · {props.sourceId}; } diff --git a/packages/plugins/graphql/src/react/client.ts b/packages/plugins/graphql/src/react/client.ts index 0a403d82f..912494985 100644 --- a/packages/plugins/graphql/src/react/client.ts +++ b/packages/plugins/graphql/src/react/client.ts @@ -10,11 +10,8 @@ import { GraphqlGroup } from "../api/group"; const GraphqlApi = addGroup(GraphqlGroup); -export const GraphqlClient = AtomHttpApi.Tag<"GraphqlClient">()( - "GraphqlClient", - { - api: GraphqlApi, - httpClient: FetchHttpClient.layer, - baseUrl: getBaseUrl(), - }, -); +export const GraphqlClient = AtomHttpApi.Tag<"GraphqlClient">()("GraphqlClient", { + api: GraphqlApi, + httpClient: FetchHttpClient.layer, + baseUrl: getBaseUrl(), +}); diff --git a/packages/plugins/graphql/src/sdk/config-file-store.ts b/packages/plugins/graphql/src/sdk/config-file-store.ts index 64b31ebdc..eca4df8b1 100644 --- a/packages/plugins/graphql/src/sdk/config-file-store.ts +++ b/packages/plugins/graphql/src/sdk/config-file-store.ts @@ -9,11 +9,7 @@ import { Effect } from "effect"; import { FileSystem } from "@effect/platform"; import type { Layer } from "effect"; -import { - addSourceToConfig, - removeSourceFromConfig, - SECRET_REF_PREFIX, -} from "@executor/config"; +import { addSourceToConfig, removeSourceFromConfig, SECRET_REF_PREFIX } from "@executor/config"; import type { SourceConfig as ConfigFileSourceConfig, ConfigHeaderValue } from "@executor/config"; import type { GraphqlOperationStore, StoredSource } from "./operation-store"; diff --git a/packages/plugins/graphql/src/sdk/errors.ts b/packages/plugins/graphql/src/sdk/errors.ts index ec2965c3e..f9ecc9098 100644 --- a/packages/plugins/graphql/src/sdk/errors.ts +++ b/packages/plugins/graphql/src/sdk/errors.ts @@ -15,9 +15,7 @@ export class GraphqlExtractionError extends Schema.TaggedError; readonly cause?: unknown; diff --git a/packages/plugins/graphql/src/sdk/extract.test.ts b/packages/plugins/graphql/src/sdk/extract.test.ts index 1ca4d041b..7f4478a23 100644 --- a/packages/plugins/graphql/src/sdk/extract.test.ts +++ b/packages/plugins/graphql/src/sdk/extract.test.ts @@ -8,7 +8,9 @@ import type { IntrospectionResult } from "./introspect"; // Minimal introspection fixture // --------------------------------------------------------------------------- -const makeIntrospection = (overrides?: Partial): IntrospectionResult => ({ +const makeIntrospection = ( + overrides?: Partial, +): IntrospectionResult => ({ __schema: { queryType: { name: "Query" }, mutationType: { name: "Mutation" }, @@ -25,7 +27,11 @@ const makeIntrospection = (overrides?: Partial) { name: "id", description: "User ID", - type: { kind: "NON_NULL", name: null, ofType: { kind: "SCALAR", name: "ID", ofType: null } }, + type: { + kind: "NON_NULL", + name: null, + ofType: { kind: "SCALAR", name: "ID", ofType: null }, + }, defaultValue: null, }, ], @@ -61,7 +67,11 @@ const makeIntrospection = (overrides?: Partial) { name: "name", description: null, - type: { kind: "NON_NULL", name: null, ofType: { kind: "SCALAR", name: "String", ofType: null } }, + type: { + kind: "NON_NULL", + name: null, + ofType: { kind: "SCALAR", name: "String", ofType: null }, + }, defaultValue: null, }, { @@ -82,16 +92,56 @@ const makeIntrospection = (overrides?: Partial) name: "User", description: null, fields: [ - { name: "id", description: null, args: [], type: { kind: "NON_NULL", name: null, ofType: { kind: "SCALAR", name: "ID", ofType: null } } }, - { name: "name", description: null, args: [], type: { kind: "SCALAR", name: "String", ofType: null } }, - { name: "email", description: null, args: [], type: { kind: "SCALAR", name: "String", ofType: null } }, + { + name: "id", + description: null, + args: [], + type: { + kind: "NON_NULL", + name: null, + ofType: { kind: "SCALAR", name: "ID", ofType: null }, + }, + }, + { + name: "name", + description: null, + args: [], + type: { kind: "SCALAR", name: "String", ofType: null }, + }, + { + name: "email", + description: null, + args: [], + type: { kind: "SCALAR", name: "String", ofType: null }, + }, ], inputFields: null, enumValues: null, }, - { kind: "SCALAR", name: "ID", description: null, fields: null, inputFields: null, enumValues: null }, - { kind: "SCALAR", name: "String", description: null, fields: null, inputFields: null, enumValues: null }, - { kind: "SCALAR", name: "Boolean", description: null, fields: null, inputFields: null, enumValues: null }, + { + kind: "SCALAR", + name: "ID", + description: null, + fields: null, + inputFields: null, + enumValues: null, + }, + { + kind: "SCALAR", + name: "String", + description: null, + fields: null, + inputFields: null, + enumValues: null, + }, + { + kind: "SCALAR", + name: "Boolean", + description: null, + fields: null, + inputFields: null, + enumValues: null, + }, ], ...overrides, }, @@ -142,18 +192,14 @@ describe("extract", () => { }); it("handles schema with no mutations", async () => { - const { result } = await Effect.runPromise( - extract(makeIntrospection({ mutationType: null })), - ); + const { result } = await Effect.runPromise(extract(makeIntrospection({ mutationType: null }))); const mutations = result.fields.filter((f) => f.kind === "mutation"); expect(mutations).toHaveLength(0); }); it("handles empty query type", async () => { - const { result } = await Effect.runPromise( - extract(makeIntrospection({ queryType: null })), - ); + const { result } = await Effect.runPromise(extract(makeIntrospection({ queryType: null }))); const queries = result.fields.filter((f) => f.kind === "query"); expect(queries).toHaveLength(0); @@ -227,13 +273,32 @@ describe("extract", () => { name: "Issue", description: null, fields: [ - { name: "id", description: null, args: [], type: { kind: "SCALAR", name: "ID", ofType: null } }, + { + name: "id", + description: null, + args: [], + type: { kind: "SCALAR", name: "ID", ofType: null }, + }, ], inputFields: null, enumValues: null, }, - { kind: "SCALAR", name: "String", description: null, fields: null, inputFields: null, enumValues: null }, - { kind: "SCALAR", name: "ID", description: null, fields: null, inputFields: null, enumValues: null }, + { + kind: "SCALAR", + name: "String", + description: null, + fields: null, + inputFields: null, + enumValues: null, + }, + { + kind: "SCALAR", + name: "ID", + description: null, + fields: null, + inputFields: null, + enumValues: null, + }, ], }, }; diff --git a/packages/plugins/graphql/src/sdk/extract.ts b/packages/plugins/graphql/src/sdk/extract.ts index f5593e2ff..ad634f696 100644 --- a/packages/plugins/graphql/src/sdk/extract.ts +++ b/packages/plugins/graphql/src/sdk/extract.ts @@ -27,8 +27,7 @@ const unwrapTypeName = (ref: IntrospectionTypeRef): string => { }; /** Check if a type ref is non-null (required) */ -const isNonNull = (ref: IntrospectionTypeRef): boolean => - ref.kind === "NON_NULL"; +const isNonNull = (ref: IntrospectionTypeRef): boolean => ref.kind === "NON_NULL"; // --------------------------------------------------------------------------- // Build shared definitions from all INPUT_OBJECT and ENUM types @@ -208,9 +207,7 @@ const extractFields = ( return new ExtractedField({ fieldName: field.name, kind, - description: field.description - ? Option.some(field.description) - : Option.none(), + description: field.description ? Option.some(field.description) : Option.none(), arguments: args, inputSchema: inputSchema ? Option.some(inputSchema) : Option.none(), returnTypeName: unwrapTypeName(field.type), @@ -242,18 +239,8 @@ export const extract = ( const definitions = buildDefinitions(typeMap); - const queryFields = extractFields( - schema, - "query", - schema.queryType?.name, - typeMap, - ); - const mutationFields = extractFields( - schema, - "mutation", - schema.mutationType?.name, - typeMap, - ); + const queryFields = extractFields(schema, "query", schema.queryType?.name, typeMap); + const mutationFields = extractFields(schema, "mutation", schema.mutationType?.name, typeMap); return { result: new ExtractionResult({ diff --git a/packages/plugins/graphql/src/sdk/index.ts b/packages/plugins/graphql/src/sdk/index.ts index bf499f79c..8b99523ed 100644 --- a/packages/plugins/graphql/src/sdk/index.ts +++ b/packages/plugins/graphql/src/sdk/index.ts @@ -1,20 +1,13 @@ export { introspect, parseIntrospectionJson } from "./introspect"; export { extract, type ExtractionOutput } from "./extract"; export { invoke, makeGraphqlInvoker } from "./invoke"; -export { - graphqlPlugin, - type GraphqlSourceConfig, - type GraphqlPluginExtension, -} from "./plugin"; +export { graphqlPlugin, type GraphqlSourceConfig, type GraphqlPluginExtension } from "./plugin"; export { type GraphqlOperationStore, type StoredSource, type SourceConfig, } from "./operation-store"; -export { - makeKvOperationStore, - makeInMemoryOperationStore, -} from "./kv-operation-store"; +export { makeKvOperationStore, makeInMemoryOperationStore } from "./kv-operation-store"; export { withConfigFile } from "./config-file-store"; export { diff --git a/packages/plugins/graphql/src/sdk/introspect.ts b/packages/plugins/graphql/src/sdk/introspect.ts index 62c3667f2..f604fdf65 100644 --- a/packages/plugins/graphql/src/sdk/introspect.ts +++ b/packages/plugins/graphql/src/sdk/introspect.ts @@ -149,9 +149,7 @@ export const introspect = Effect.fn("GraphQL.introspect")(function* ( } const response = yield* client.execute(request).pipe( - Effect.tapErrorCause((cause) => - Effect.logError("graphql introspection request failed", cause), - ), + Effect.tapErrorCause((cause) => Effect.logError("graphql introspection request failed", cause)), Effect.mapError( (err) => new GraphqlIntrospectionError({ diff --git a/packages/plugins/graphql/src/sdk/invoke.ts b/packages/plugins/graphql/src/sdk/invoke.ts index 7ae4a2a3d..48a703f22 100644 --- a/packages/plugins/graphql/src/sdk/invoke.ts +++ b/packages/plugins/graphql/src/sdk/invoke.ts @@ -25,7 +25,9 @@ import { const resolveHeaders = ( headers: Record, - secrets: { readonly resolve: (secretId: SecretId, scopeId: ScopeId) => Effect.Effect }, + secrets: { + readonly resolve: (secretId: SecretId, scopeId: ScopeId) => Effect.Effect; + }, scopeId: ScopeId, ): Effect.Effect, ToolInvocationError> => Effect.gen(function* () { @@ -35,12 +37,13 @@ const resolveHeaders = ( resolved[name] = value; } else { const secret = yield* secrets.resolve(value.secretId as SecretId, scopeId).pipe( - Effect.mapError(() => - new ToolInvocationError({ - toolId: "" as ToolId, - message: `Failed to resolve secret "${value.secretId}" for header "${name}"`, - cause: undefined, - }), + Effect.mapError( + () => + new ToolInvocationError({ + toolId: "" as ToolId, + message: `Failed to resolve secret "${value.secretId}" for header "${name}"`, + cause: undefined, + }), ), ); resolved[name] = value.prefix ? `${value.prefix}${secret}` : secret; @@ -57,9 +60,7 @@ const isJsonContentType = (ct: string | null | undefined): boolean => { if (!ct) return false; const normalized = ct.split(";")[0]?.trim().toLowerCase() ?? ""; return ( - normalized === "application/json" || - normalized.includes("+json") || - normalized.includes("json") + normalized === "application/json" || normalized.includes("+json") || normalized.includes("json") ); }; @@ -139,7 +140,9 @@ export const invoke = Effect.fn("GraphQL.invoke")(function* ( export const makeGraphqlInvoker = (opts: { readonly operationStore: GraphqlOperationStore; readonly httpClientLayer: Layer.Layer; - readonly secrets: { readonly resolve: (secretId: SecretId, scopeId: ScopeId) => Effect.Effect }; + readonly secrets: { + readonly resolve: (secretId: SecretId, scopeId: ScopeId) => Effect.Effect; + }; readonly scopeId: ScopeId; }): ToolInvoker => ({ resolveAnnotations: (toolId: ToolId) => @@ -170,11 +173,7 @@ export const makeGraphqlInvoker = (opts: { const { binding, config } = entry; // Resolve secret-backed headers - const resolvedHeaders = yield* resolveHeaders( - config.headers, - opts.secrets, - opts.scopeId, - ); + const resolvedHeaders = yield* resolveHeaders(config.headers, opts.secrets, opts.scopeId); const result = yield* invoke( binding, diff --git a/packages/plugins/graphql/src/sdk/kv-operation-store.ts b/packages/plugins/graphql/src/sdk/kv-operation-store.ts index 8ef04ee80..bf1eef7a2 100644 --- a/packages/plugins/graphql/src/sdk/kv-operation-store.ts +++ b/packages/plugins/graphql/src/sdk/kv-operation-store.ts @@ -29,10 +29,7 @@ const decodeSource = Schema.decodeUnknownSync(Schema.parseJson(StoredSourceSchem // Implementation // --------------------------------------------------------------------------- -const makeStore = ( - bindings: ScopedKv, - sources: ScopedKv, -): GraphqlOperationStore => ({ +const makeStore = (bindings: ScopedKv, sources: ScopedKv): GraphqlOperationStore => ({ get: (toolId) => Effect.gen(function* () { const raw = yield* bindings.get(toolId); @@ -42,10 +39,7 @@ const makeStore = ( }), put: (toolId, namespace, binding, config) => - bindings.set( - toolId, - encodeEntry(new StoredEntry({ namespace, binding, config })), - ), + bindings.set(toolId, encodeEntry(new StoredEntry({ namespace, binding, config }))), remove: (toolId) => bindings.delete(toolId).pipe(Effect.asVoid), @@ -74,11 +68,9 @@ const makeStore = ( return ids; }), - putSource: (source) => - sources.set(source.namespace, encodeSource(source)), + putSource: (source) => sources.set(source.namespace, encodeSource(source)), - removeSource: (namespace) => - sources.delete(namespace).pipe(Effect.asVoid), + removeSource: (namespace) => sources.delete(namespace).pipe(Effect.asVoid), listSources: () => Effect.gen(function* () { @@ -106,17 +98,8 @@ const makeStore = ( // Factory // --------------------------------------------------------------------------- -export const makeKvOperationStore = ( - kv: Kv, - namespace: string, -): GraphqlOperationStore => - makeStore( - scopeKv(kv, `${namespace}.bindings`), - scopeKv(kv, `${namespace}.sources`), - ); +export const makeKvOperationStore = (kv: Kv, namespace: string): GraphqlOperationStore => + makeStore(scopeKv(kv, `${namespace}.bindings`), scopeKv(kv, `${namespace}.sources`)); export const makeInMemoryOperationStore = (): GraphqlOperationStore => - makeStore( - makeInMemoryScopedKv(), - makeInMemoryScopedKv(), - ); + makeStore(makeInMemoryScopedKv(), makeInMemoryScopedKv()); diff --git a/packages/plugins/graphql/src/sdk/operation-store.ts b/packages/plugins/graphql/src/sdk/operation-store.ts index 1978d7a31..4f5d49a32 100644 --- a/packages/plugins/graphql/src/sdk/operation-store.ts +++ b/packages/plugins/graphql/src/sdk/operation-store.ts @@ -44,11 +44,7 @@ export interface GraphqlOperationStore { readonly listSources: () => Effect.Effect; - readonly getSource: ( - namespace: string, - ) => Effect.Effect; + readonly getSource: (namespace: string) => Effect.Effect; - readonly getSourceConfig: ( - namespace: string, - ) => Effect.Effect; + readonly getSourceConfig: (namespace: string) => Effect.Effect; } diff --git a/packages/plugins/graphql/src/sdk/plugin.test.ts b/packages/plugins/graphql/src/sdk/plugin.test.ts index 52ab60d79..c5cf69edc 100644 --- a/packages/plugins/graphql/src/sdk/plugin.test.ts +++ b/packages/plugins/graphql/src/sdk/plugin.test.ts @@ -1,10 +1,7 @@ import { describe, it, expect } from "@effect/vitest"; import { Effect } from "effect"; -import { - createExecutor, - makeTestConfig, -} from "@executor/sdk"; +import { createExecutor, makeTestConfig } from "@executor/sdk"; import { graphqlPlugin } from "./plugin"; import type { IntrospectionResult } from "./introspect"; @@ -65,7 +62,14 @@ const introspectionResult: IntrospectionResult = { inputFields: null, enumValues: null, }, - { kind: "SCALAR", name: "String", description: null, fields: null, inputFields: null, enumValues: null }, + { + kind: "SCALAR", + name: "String", + description: null, + fields: null, + inputFields: null, + enumValues: null, + }, ], }, }; @@ -188,9 +192,7 @@ describe("graphqlPlugin", () => { expect(mutationTool).toBeDefined(); // Verify the mutation requires approval via annotations - const schema = await Effect.runPromise( - executor.tools.schema(mutationTool!.id), - ); + const schema = await Effect.runPromise(executor.tools.schema(mutationTool!.id)); expect(schema).toBeDefined(); await Effect.runPromise(executor.close()); diff --git a/packages/plugins/graphql/src/sdk/plugin.ts b/packages/plugins/graphql/src/sdk/plugin.ts index 2289c47d6..dae864809 100644 --- a/packages/plugins/graphql/src/sdk/plugin.ts +++ b/packages/plugins/graphql/src/sdk/plugin.ts @@ -15,11 +15,15 @@ import { type ToolRegistration, } from "@executor/sdk"; -import { introspect, parseIntrospectionJson, type IntrospectionResult, type IntrospectionType, type IntrospectionField } from "./introspect"; -import { extract } from "./extract"; import { - GraphqlExtractionError, -} from "./errors"; + introspect, + parseIntrospectionJson, + type IntrospectionResult, + type IntrospectionType, + type IntrospectionField, +} from "./introspect"; +import { extract } from "./extract"; +import { GraphqlExtractionError } from "./errors"; import { makeGraphqlInvoker } from "./invoke"; import type { GraphqlOperationStore, StoredSource } from "./operation-store"; import { makeInMemoryOperationStore } from "./kv-operation-store"; @@ -68,9 +72,7 @@ export interface GraphqlPluginExtension { readonly removeSource: (namespace: string) => Effect.Effect; /** Fetch the full stored source by namespace (or null if missing) */ - readonly getSource: ( - namespace: string, - ) => Effect.Effect; + readonly getSource: (namespace: string) => Effect.Effect; /** Update config (endpoint, headers) for an existing GraphQL source */ readonly updateSource: ( @@ -87,9 +89,7 @@ const AddSourceInputSchema = Schema.Struct({ endpoint: Schema.String, introspectionJson: Schema.optional(Schema.String), namespace: Schema.optional(Schema.String), - headers: Schema.optional( - Schema.Record({ key: Schema.String, value: HeaderValueSchema }), - ), + headers: Schema.optional(Schema.Record({ key: Schema.String, value: HeaderValueSchema })), }); type AddSourceInput = typeof AddSourceInputSchema.Type; @@ -180,14 +180,12 @@ const buildSelectionSet = ( return subFields.length > 0 ? `{ ${subFields.join(" ")} }` : ""; }; -const toRegistration = ( - field: ExtractedField, - namespace: string, -): ToolRegistration => { +const toRegistration = (field: ExtractedField, namespace: string): ToolRegistration => { const prefix = field.kind === "mutation" ? "mutation" : "query"; const toolPath = `${prefix}.${field.fieldName}`; - const description = Option.getOrElse(field.description, () => - `GraphQL ${field.kind}: ${field.fieldName} -> ${field.returnTypeName}`, + const description = Option.getOrElse( + field.description, + () => `GraphQL ${field.kind}: ${field.fieldName} -> ${field.returnTypeName}`, ); return { @@ -210,8 +208,7 @@ export const graphqlPlugin = (options?: { readonly operationStore?: GraphqlOperationStore; }): ExecutorPlugin<"graphql", GraphqlPluginExtension> => { const httpClientLayer = options?.httpClientLayer ?? FetchHttpClient.layer; - const operationStore = - options?.operationStore ?? makeInMemoryOperationStore(); + const operationStore = options?.operationStore ?? makeInMemoryOperationStore(); return definePlugin({ key: "graphql", @@ -299,9 +296,7 @@ export const graphqlPlugin = (options?: { .resolve(value.secretId as SecretId, ctx.scope.id) .pipe(Effect.catchAll(() => Effect.succeed(""))); if (secret) { - resolvedHeaders[name] = value.prefix - ? `${value.prefix}${secret}` - : secret; + resolvedHeaders[name] = value.prefix ? `${value.prefix}${secret}` : secret; } } } @@ -333,13 +328,15 @@ export const graphqlPlugin = (options?: { } // Build field map for operation strings - const fieldMap = new Map(); + const fieldMap = new Map< + string, + { kind: GraphqlOperationKind; field: IntrospectionField } + >(); const schema = introspectionResult.__schema; for (const rootKind of ["query", "mutation"] as const) { - const typeName = rootKind === "query" - ? schema.queryType?.name - : schema.mutationType?.name; + const typeName = + rootKind === "query" ? schema.queryType?.name : schema.mutationType?.name; if (!typeName) continue; const rootType = typeMap.get(typeName); if (!rootType?.fields) continue; @@ -406,8 +403,7 @@ export const graphqlPlugin = (options?: { runtimeTool({ id: "graphql.addSource", name: "graphql.addSource", - description: - "Add a GraphQL endpoint and register its operations as tools", + description: "Add a GraphQL endpoint and register its operations as tools", inputSchema: AddSourceInputSchema, outputSchema: AddSourceOutputSchema, handler: (input: AddSourceInput) => addSourceInternal(input), @@ -423,24 +419,21 @@ export const graphqlPlugin = (options?: { Effect.mapError( (err) => new GraphqlExtractionError({ - message: - err instanceof Error ? err.message : String(err), + message: err instanceof Error ? err.message : String(err), }), ), ), removeSource: (namespace: string) => Effect.gen(function* () { - const toolIds = - yield* operationStore.removeByNamespace(namespace); + const toolIds = yield* operationStore.removeByNamespace(namespace); if (toolIds.length > 0) { yield* ctx.tools.unregister(toolIds); } yield* operationStore.removeSource(namespace); }), - getSource: (namespace: string) => - operationStore.getSource(namespace), + getSource: (namespace: string) => operationStore.getSource(namespace), updateSource: (namespace: string, input: GraphqlUpdateSourceInput) => Effect.gen(function* () { @@ -450,7 +443,9 @@ export const graphqlPlugin = (options?: { const updatedConfig = { ...existingConfig, ...(input.endpoint !== undefined ? { endpoint: input.endpoint } : {}), - ...(input.headers !== undefined ? { headers: input.headers as Record } : {}), + ...(input.headers !== undefined + ? { headers: input.headers as Record } + : {}), }; const newInvocationConfig = new InvocationConfig({ @@ -462,7 +457,12 @@ export const graphqlPlugin = (options?: { for (const toolId of toolIds) { const entry = yield* operationStore.get(toolId); if (entry) { - yield* operationStore.put(toolId, namespace, entry.binding, newInvocationConfig); + yield* operationStore.put( + toolId, + namespace, + entry.binding, + newInvocationConfig, + ); } } diff --git a/packages/plugins/graphql/src/sdk/stored-source.ts b/packages/plugins/graphql/src/sdk/stored-source.ts index 56e4e0e5f..a78bcf9f4 100644 --- a/packages/plugins/graphql/src/sdk/stored-source.ts +++ b/packages/plugins/graphql/src/sdk/stored-source.ts @@ -7,18 +7,14 @@ import { HeaderValue } from "./types"; // via the getSource HTTP endpoint. // --------------------------------------------------------------------------- -export class StoredSourceSchema extends Schema.Class( - "GraphqlStoredSource", -)({ +export class StoredSourceSchema extends Schema.Class("GraphqlStoredSource")({ namespace: Schema.String, name: Schema.String, config: Schema.Struct({ endpoint: Schema.String, introspectionJson: Schema.optional(Schema.String), namespace: Schema.optional(Schema.String), - headers: Schema.optional( - Schema.Record({ key: Schema.String, value: HeaderValue }), - ), + headers: Schema.optional(Schema.Record({ key: Schema.String, value: HeaderValue })), }), }) {} diff --git a/packages/plugins/graphql/src/sdk/types.ts b/packages/plugins/graphql/src/sdk/types.ts index a2071e0fc..008831368 100644 --- a/packages/plugins/graphql/src/sdk/types.ts +++ b/packages/plugins/graphql/src/sdk/types.ts @@ -11,18 +11,14 @@ export type GraphqlOperationKind = typeof GraphqlOperationKind.Type; // Extracted field (becomes a tool) // --------------------------------------------------------------------------- -export class GraphqlArgument extends Schema.Class( - "GraphqlArgument", -)({ +export class GraphqlArgument extends Schema.Class("GraphqlArgument")({ name: Schema.String, typeName: Schema.String, required: Schema.Boolean, description: Schema.optionalWith(Schema.String, { as: "Option" }), }) {} -export class ExtractedField extends Schema.Class( - "ExtractedField", -)({ +export class ExtractedField extends Schema.Class("ExtractedField")({ /** e.g. "user", "createUser" */ fieldName: Schema.String, /** "query" or "mutation" */ @@ -35,9 +31,7 @@ export class ExtractedField extends Schema.Class( returnTypeName: Schema.String, }) {} -export class ExtractionResult extends Schema.Class( - "ExtractionResult", -)({ +export class ExtractionResult extends Schema.Class("ExtractionResult")({ /** Schema name from introspection */ schemaName: Schema.optionalWith(Schema.String, { as: "Option" }), fields: Schema.Array(ExtractedField), @@ -47,9 +41,7 @@ export class ExtractionResult extends Schema.Class( // Operation binding — minimal data needed to invoke // --------------------------------------------------------------------------- -export class OperationBinding extends Schema.Class( - "OperationBinding", -)({ +export class OperationBinding extends Schema.Class("OperationBinding")({ kind: GraphqlOperationKind, fieldName: Schema.String, /** The full GraphQL query/mutation string */ @@ -71,21 +63,16 @@ export const HeaderValue = Schema.Union( ); export type HeaderValue = typeof HeaderValue.Type; -export class InvocationConfig extends Schema.Class( - "InvocationConfig", -)({ +export class InvocationConfig extends Schema.Class("InvocationConfig")({ /** The GraphQL endpoint URL */ endpoint: Schema.String, /** Headers applied to every request. Values can reference secrets. */ - headers: Schema.optionalWith( - Schema.Record({ key: Schema.String, value: HeaderValue }), - { default: () => ({}) }, - ), + headers: Schema.optionalWith(Schema.Record({ key: Schema.String, value: HeaderValue }), { + default: () => ({}), + }), }) {} -export class InvocationResult extends Schema.Class( - "InvocationResult", -)({ +export class InvocationResult extends Schema.Class("InvocationResult")({ status: Schema.Number, data: Schema.NullOr(Schema.Unknown), errors: Schema.NullOr(Schema.Unknown), diff --git a/packages/plugins/graphql/tsconfig.json b/packages/plugins/graphql/tsconfig.json index 894b2ab9d..046037b8b 100644 --- a/packages/plugins/graphql/tsconfig.json +++ b/packages/plugins/graphql/tsconfig.json @@ -5,14 +5,8 @@ "moduleResolution": "Bundler", "strict": true, "skipLibCheck": true, - "lib": [ - "ES2022", - "DOM" - ], - "types": [ - "bun-types", - "node" - ], + "lib": ["ES2022", "DOM"], + "types": ["bun-types", "node"], "noUnusedLocals": true, "noImplicitOverride": true, "jsx": "react-jsx", @@ -25,8 +19,5 @@ } ] }, - "include": [ - "src/**/*.ts", - "src/**/*.tsx" - ] + "include": ["src/**/*.ts", "src/**/*.tsx"] } diff --git a/packages/plugins/keychain/package.json b/packages/plugins/keychain/package.json index 9c6a612f9..568969b15 100644 --- a/packages/plugins/keychain/package.json +++ b/packages/plugins/keychain/package.json @@ -1,39 +1,24 @@ { "name": "@executor/plugin-keychain", - "type": "module", "version": "0.0.1-beta.5", + "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/keychain", + "bugs": { + "url": "https://github.com/RhysSullivan/executor/issues" + }, "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/RhysSullivan/executor.git", "directory": "packages/plugins/keychain" }, - "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/keychain", - "bugs": { - "url": "https://github.com/RhysSullivan/executor/issues" - }, + "files": [ + "dist" + ], + "type": "module", "exports": { ".": "./src/index.ts", "./promise": "./src/promise.ts" }, - "scripts": { - "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", - "typecheck": "bunx tsc --noEmit -p tsconfig.json", - "test": "vitest run", - "test:watch": "vitest" - }, - "dependencies": { - "@napi-rs/keyring": "^1.2.0", - "@executor/sdk": "workspace:*", - "effect": "catalog:" - }, - "devDependencies": { - "@effect/vitest": "catalog:", - "@types/node": "catalog:", - "bun-types": "catalog:", - "vitest": "catalog:", - "tsup": "catalog:" - }, "publishConfig": { "access": "public", "exports": { @@ -51,7 +36,22 @@ } } }, - "files": [ - "dist" - ] + "scripts": { + "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", + "typecheck": "bunx tsc --noEmit -p tsconfig.json", + "test": "vitest run", + "test:watch": "vitest" + }, + "dependencies": { + "@executor/sdk": "workspace:*", + "@napi-rs/keyring": "^1.2.0", + "effect": "catalog:" + }, + "devDependencies": { + "@effect/vitest": "catalog:", + "@types/node": "catalog:", + "bun-types": "catalog:", + "tsup": "catalog:", + "vitest": "catalog:" + } } diff --git a/packages/plugins/keychain/src/index.test.ts b/packages/plugins/keychain/src/index.test.ts index 021cc5824..6b5a4bd2d 100644 --- a/packages/plugins/keychain/src/index.test.ts +++ b/packages/plugins/keychain/src/index.test.ts @@ -28,9 +28,7 @@ describe("keychain plugin", () => { const testId = SecretId.make(`test-keychain-${Date.now()}`); const executor = yield* createExecutor( makeTestConfig({ - plugins: [ - keychainPlugin({ serviceName: "executor-test" }), - ] as const, + plugins: [keychainPlugin({ serviceName: "executor-test" })] as const, }), ); @@ -51,9 +49,7 @@ describe("keychain plugin", () => { const resolved = yield* executor.secrets.resolve(testId); expect(resolved).toBe("keychain-test-value"); } finally { - yield* executor.secrets.remove(testId).pipe( - Effect.orElseSucceed(() => false), - ); + yield* executor.secrets.remove(testId).pipe(Effect.orElseSucceed(() => false)); } }), ); @@ -62,15 +58,11 @@ describe("keychain plugin", () => { Effect.gen(function* () { const executor = yield* createExecutor( makeTestConfig({ - plugins: [ - keychainPlugin({ serviceName: "executor-test" }), - ] as const, + plugins: [keychainPlugin({ serviceName: "executor-test" })] as const, }), ); - const exists = yield* executor.keychain.has( - SecretId.make("nonexistent-secret"), - ); + const exists = yield* executor.keychain.has(SecretId.make("nonexistent-secret")); expect(exists).toBe(false); }), ); diff --git a/packages/plugins/keychain/src/index.ts b/packages/plugins/keychain/src/index.ts index 7cc265c74..081002150 100644 --- a/packages/plugins/keychain/src/index.ts +++ b/packages/plugins/keychain/src/index.ts @@ -1,10 +1,6 @@ import { Effect } from "effect"; -import { - definePlugin, - type SecretId, - type ExecutorPlugin, -} from "@executor/sdk"; +import { definePlugin, type SecretId, type ExecutorPlugin } from "@executor/sdk"; import { displayName, isSupportedPlatform, resolveServiceName } from "./keyring"; import { getPassword } from "./keyring"; diff --git a/packages/plugins/keychain/src/keyring.ts b/packages/plugins/keychain/src/keyring.ts index d5f3570ab..8f1346917 100644 --- a/packages/plugins/keychain/src/keyring.ts +++ b/packages/plugins/keychain/src/keyring.ts @@ -14,9 +14,7 @@ const SERVICE_NAME_ENV = "EXECUTOR_KEYCHAIN_SERVICE_NAME"; // --------------------------------------------------------------------------- export const isSupportedPlatform = () => - process.platform === "darwin" || - process.platform === "linux" || - process.platform === "win32"; + process.platform === "darwin" || process.platform === "linux" || process.platform === "win32"; export const displayName = () => process.platform === "darwin" @@ -105,6 +103,7 @@ export const deletePassword = ( entry.deletePassword(); return true; }, - catch: () => new KeychainError({ message: `Failed deleting secret for account '${account}'` }), + catch: () => + new KeychainError({ message: `Failed deleting secret for account '${account}'` }), }), ); diff --git a/packages/plugins/keychain/src/promise.ts b/packages/plugins/keychain/src/promise.ts index 605c2bae7..679d9f540 100644 --- a/packages/plugins/keychain/src/promise.ts +++ b/packages/plugins/keychain/src/promise.ts @@ -2,6 +2,5 @@ import { keychainPlugin as keychainPluginEffect } from "./index"; export type { KeychainPluginConfig } from "./index"; -export const keychainPlugin = ( - config?: { readonly serviceName?: string }, -) => keychainPluginEffect(config); +export const keychainPlugin = (config?: { readonly serviceName?: string }) => + keychainPluginEffect(config); diff --git a/packages/plugins/keychain/src/provider.ts b/packages/plugins/keychain/src/provider.ts index 9ca2b2c35..41c75215c 100644 --- a/packages/plugins/keychain/src/provider.ts +++ b/packages/plugins/keychain/src/provider.ts @@ -11,18 +11,11 @@ import { getPassword, setPassword, deletePassword } from "./keyring"; export const makeKeychainProvider = (serviceName: string): SecretProvider => ({ key: "keychain", writable: true, - get: (secretId) => - getPassword(serviceName, secretId).pipe( - Effect.orElseSucceed(() => null), - ), + get: (secretId) => getPassword(serviceName, secretId).pipe(Effect.orElseSucceed(() => null)), set: (secretId, value) => - setPassword(serviceName, secretId, value).pipe( - Effect.orElseSucceed(() => undefined), - ), + setPassword(serviceName, secretId, value).pipe(Effect.orElseSucceed(() => undefined)), delete: (secretId) => - deletePassword(serviceName, secretId).pipe( - Effect.orElseSucceed(() => false), - ), + deletePassword(serviceName, secretId).pipe(Effect.orElseSucceed(() => false)), // Keychain doesn't support enumerating — you need to know the account name list: undefined, }); diff --git a/packages/plugins/keychain/tsconfig.json b/packages/plugins/keychain/tsconfig.json index ca326c69c..1354b0259 100644 --- a/packages/plugins/keychain/tsconfig.json +++ b/packages/plugins/keychain/tsconfig.json @@ -5,13 +5,8 @@ "moduleResolution": "Bundler", "strict": true, "skipLibCheck": true, - "lib": [ - "ES2022" - ], - "types": [ - "bun-types", - "node" - ], + "lib": ["ES2022"], + "types": ["bun-types", "node"], "noUnusedLocals": true, "noImplicitOverride": true, "plugins": [ @@ -23,7 +18,5 @@ } ] }, - "include": [ - "src/**/*.ts" - ] + "include": ["src/**/*.ts"] } diff --git a/packages/plugins/mcp/package.json b/packages/plugins/mcp/package.json index 3882b3928..66d4295cb 100644 --- a/packages/plugins/mcp/package.json +++ b/packages/plugins/mcp/package.json @@ -1,17 +1,20 @@ { "name": "@executor/plugin-mcp", - "type": "module", "version": "0.0.1-beta.5", + "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/mcp", + "bugs": { + "url": "https://github.com/RhysSullivan/executor/issues" + }, "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/RhysSullivan/executor.git", "directory": "packages/plugins/mcp" }, - "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/mcp", - "bugs": { - "url": "https://github.com/RhysSullivan/executor/issues" - }, + "files": [ + "dist" + ], + "type": "module", "exports": { ".": "./src/sdk/index.ts", "./promise": "./src/promise.ts", @@ -36,9 +39,6 @@ } } }, - "files": [ - "dist" - ], "scripts": { "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", "typecheck": "bunx tsc --noEmit -p tsconfig.json", @@ -53,12 +53,25 @@ "@modelcontextprotocol/sdk": "^1.29.0", "effect": "catalog:" }, - "peerDependencies": { + "devDependencies": { + "@effect-atom/atom-react": "^0.5.0", + "@effect/vitest": "catalog:", + "@executor/api": "workspace:*", + "@executor/react": "workspace:*", + "@types/node": "catalog:", + "@types/react": "catalog:", + "bun-types": "catalog:", "react": "catalog:", + "tsup": "catalog:", + "vitest": "catalog:", + "zod": "^4.3.6" + }, + "peerDependencies": { "@effect-atom/atom-react": "^0.5.0", - "@tanstack/react-router": "catalog:", "@executor/api": "workspace:*", - "@executor/react": "workspace:*" + "@executor/react": "workspace:*", + "@tanstack/react-router": "catalog:", + "react": "catalog:" }, "peerDependenciesMeta": { "react": { @@ -76,18 +89,5 @@ "@executor/react": { "optional": true } - }, - "devDependencies": { - "react": "catalog:", - "@effect-atom/atom-react": "^0.5.0", - "@executor/api": "workspace:*", - "@executor/react": "workspace:*", - "@types/react": "catalog:", - "@effect/vitest": "catalog:", - "@types/node": "catalog:", - "bun-types": "catalog:", - "vitest": "catalog:", - "zod": "^4.3.6", - "tsup": "catalog:" } } diff --git a/packages/plugins/mcp/src/api/group.ts b/packages/plugins/mcp/src/api/group.ts index 6fdec1a56..40ac9a532 100644 --- a/packages/plugins/mcp/src/api/group.ts +++ b/packages/plugins/mcp/src/api/group.ts @@ -46,9 +46,7 @@ const AddRemoteSourcePayload = Schema.Struct({ transport: Schema.Literal("remote"), name: Schema.String, endpoint: Schema.String, - remoteTransport: Schema.optional( - Schema.Literal("streamable-http", "sse", "auto"), - ), + remoteTransport: Schema.optional(Schema.Literal("streamable-http", "sse", "auto")), namespace: Schema.optional(Schema.String), queryParams: Schema.optional(StringMap), headers: Schema.optional(StringMap), @@ -65,10 +63,7 @@ const AddStdioSourcePayload = Schema.Struct({ namespace: Schema.optional(Schema.String), }); -const AddSourcePayload = Schema.Union( - AddRemoteSourcePayload, - AddStdioSourcePayload, -); +const AddSourcePayload = Schema.Union(AddRemoteSourcePayload, AddStdioSourcePayload); // --------------------------------------------------------------------------- // Other payloads @@ -218,5 +213,4 @@ export class McpGroup extends HttpApiGroup.make("mcp") .setPayload(UpdateSourcePayload) .addSuccess(UpdateSourceResponse) .addError(McpApiError), - ) - {} + ) {} diff --git a/packages/plugins/mcp/src/api/handlers.ts b/packages/plugins/mcp/src/api/handlers.ts index 40cde2077..980444bc9 100644 --- a/packages/plugins/mcp/src/api/handlers.ts +++ b/packages/plugins/mcp/src/api/handlers.ts @@ -9,9 +9,10 @@ import { McpGroup } from "./group"; // Service tag // --------------------------------------------------------------------------- -export class McpExtensionService extends Context.Tag( - "McpExtensionService", -)() {} +export class McpExtensionService extends Context.Tag("McpExtensionService")< + McpExtensionService, + McpPluginExtension +>() {} // --------------------------------------------------------------------------- // Composed API @@ -122,8 +123,7 @@ const toSourceConfig = ( ? p.auth.kind === "oauth2" ? { ...p.auth, - tokenType: - (p.auth as { tokenType?: string }).tokenType ?? "Bearer", + tokenType: (p.auth as { tokenType?: string }).tokenType ?? "Bearer", } : p.auth : undefined; @@ -144,114 +144,105 @@ const toSourceConfig = ( // Handlers // --------------------------------------------------------------------------- -export const McpHandlers = HttpApiBuilder.group( - ExecutorApiWithMcp, - "mcp", - (handlers) => - handlers - .handle("probeEndpoint", ({ payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - return yield* ext.probeEndpoint(payload.endpoint); - }).pipe(Effect.orDie), - ) - .handle("addSource", ({ payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - return yield* ext.addSource( - toSourceConfig(payload as Parameters[0]), +export const McpHandlers = HttpApiBuilder.group(ExecutorApiWithMcp, "mcp", (handlers) => + handlers + .handle("probeEndpoint", ({ payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + return yield* ext.probeEndpoint(payload.endpoint); + }).pipe(Effect.orDie), + ) + .handle("addSource", ({ payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + return yield* ext.addSource( + toSourceConfig(payload as Parameters[0]), + ); + }).pipe(Effect.orDie), + ) + .handle("removeSource", ({ payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + yield* ext.removeSource(payload.namespace); + return { removed: true }; + }).pipe(Effect.orDie), + ) + .handle("refreshSource", ({ payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + return yield* ext.refreshSource(payload.namespace); + }).pipe(Effect.orDie), + ) + .handle("startOAuth", ({ payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + return yield* ext.startOAuth({ + endpoint: payload.endpoint, + redirectUrl: payload.redirectUrl, + queryParams: payload.queryParams, + }); + }).pipe(Effect.orDie), + ) + .handle("completeOAuth", ({ payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + return yield* ext.completeOAuth({ + state: payload.state, + code: payload.code, + error: payload.error, + }); + }).pipe(Effect.orDie), + ) + .handle("getSource", ({ path }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + return yield* ext.getSource(path.namespace); + }).pipe(Effect.orDie), + ) + .handle("updateSource", ({ path, payload }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + yield* ext.updateSource(path.namespace, { + endpoint: payload.endpoint, + headers: payload.headers, + queryParams: payload.queryParams, + auth: payload.auth as McpUpdateSourceInput["auth"], + }); + return { updated: true }; + }).pipe(Effect.orDie), + ) + .handle("oauthCallback", ({ urlParams }) => + Effect.gen(function* () { + const ext = yield* McpExtensionService; + const result = yield* ext + .completeOAuth({ + state: urlParams.state, + code: urlParams.code, + error: urlParams.error ?? urlParams.error_description, + }) + .pipe( + Effect.map( + (c): OAuthPopupResult => ({ + type: "executor:oauth-result", + ok: true, + sessionId: urlParams.state, + accessTokenSecretId: c.accessTokenSecretId, + refreshTokenSecretId: c.refreshTokenSecretId, + tokenType: c.tokenType, + expiresAt: c.expiresAt, + scope: c.scope, + }), + ), + Effect.catchAll((error) => + Effect.succeed({ + type: "executor:oauth-result", + ok: false, + sessionId: null, + error: error instanceof Error ? error.message : String(error), + }), + ), ); - }).pipe(Effect.orDie), - ) - .handle("removeSource", ({ payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - yield* ext.removeSource(payload.namespace); - return { removed: true }; - }).pipe(Effect.orDie), - ) - .handle("refreshSource", ({ payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - return yield* ext.refreshSource(payload.namespace); - }).pipe(Effect.orDie), - ) - .handle("startOAuth", ({ payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - return yield* ext.startOAuth({ - endpoint: payload.endpoint, - redirectUrl: payload.redirectUrl, - queryParams: payload.queryParams, - }); - }).pipe(Effect.orDie), - ) - .handle("completeOAuth", ({ payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - return yield* ext.completeOAuth({ - state: payload.state, - code: payload.code, - error: payload.error, - }); - }).pipe(Effect.orDie), - ) - .handle("getSource", ({ path }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - return yield* ext.getSource(path.namespace); - }).pipe(Effect.orDie), - ) - .handle("updateSource", ({ path, payload }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - yield* ext.updateSource(path.namespace, { - endpoint: payload.endpoint, - headers: payload.headers, - queryParams: payload.queryParams, - auth: payload.auth as McpUpdateSourceInput["auth"], - }); - return { updated: true }; - }).pipe(Effect.orDie), - ) - .handle("oauthCallback", ({ urlParams }) => - Effect.gen(function* () { - const ext = yield* McpExtensionService; - const result = yield* ext - .completeOAuth({ - state: urlParams.state, - code: urlParams.code, - error: - urlParams.error ?? urlParams.error_description, - }) - .pipe( - Effect.map( - (c): OAuthPopupResult => ({ - type: "executor:oauth-result", - ok: true, - sessionId: urlParams.state, - accessTokenSecretId: c.accessTokenSecretId, - refreshTokenSecretId: c.refreshTokenSecretId, - tokenType: c.tokenType, - expiresAt: c.expiresAt, - scope: c.scope, - }), - ), - Effect.catchAll((error) => - Effect.succeed({ - type: "executor:oauth-result", - ok: false, - sessionId: null, - error: - error instanceof Error - ? error.message - : String(error), - }), - ), - ); - return yield* HttpServerResponse.html( - popupDocument(result), - ); - }).pipe(Effect.orDie), - ), + return yield* HttpServerResponse.html(popupDocument(result)); + }).pipe(Effect.orDie), + ), ); diff --git a/packages/plugins/mcp/src/promise.ts b/packages/plugins/mcp/src/promise.ts index fa5f827de..c6e34f1b9 100644 --- a/packages/plugins/mcp/src/promise.ts +++ b/packages/plugins/mcp/src/promise.ts @@ -17,5 +17,4 @@ export interface McpPluginOptions { readonly bindingStore?: import("./sdk/binding-store").McpBindingStore; } -export const mcpPlugin = (options?: McpPluginOptions) => - mcpPluginEffect(options); +export const mcpPlugin = (options?: McpPluginOptions) => mcpPluginEffect(options); diff --git a/packages/plugins/mcp/src/react/AddMcpSource.tsx b/packages/plugins/mcp/src/react/AddMcpSource.tsx index c9b3bb930..041bc3028 100644 --- a/packages/plugins/mcp/src/react/AddMcpSource.tsx +++ b/packages/plugins/mcp/src/react/AddMcpSource.tsx @@ -58,7 +58,13 @@ type State = | { step: "oauth-waiting"; url: string; probe: ProbeResult; sessionId: string } | { step: "oauth-done"; url: string; probe: ProbeResult; tokens: OAuthTokens } | { step: "adding"; url: string; probe: ProbeResult; tokens: OAuthTokens | null } - | { step: "error"; url: string; probe: ProbeResult | null; tokens: OAuthTokens | null; error: string }; + | { + step: "error"; + url: string; + probe: ProbeResult | null; + tokens: OAuthTokens | null; + error: string; + }; type Action = | { type: "set-url"; url: string } @@ -92,11 +98,20 @@ function reducer(state: State, action: Action): State { case "oauth-start": if (state.step !== "probed" && state.step !== "error") return state; - return { step: "oauth-starting", url: state.url, probe: state.step === "probed" ? state.probe : state.probe! }; + return { + step: "oauth-starting", + url: state.url, + probe: state.step === "probed" ? state.probe : state.probe!, + }; case "oauth-waiting": if (state.step !== "oauth-starting") return state; - return { step: "oauth-waiting", url: state.url, probe: state.probe, sessionId: action.sessionId }; + return { + step: "oauth-waiting", + url: state.url, + probe: state.probe, + sessionId: action.sessionId, + }; case "oauth-ok": if (state.step !== "oauth-waiting") return state; @@ -104,7 +119,13 @@ function reducer(state: State, action: Action): State { case "oauth-fail": if (state.step !== "oauth-starting" && state.step !== "oauth-waiting") return state; - return { step: "error", url: state.url, probe: state.probe, tokens: null, error: action.error }; + return { + step: "error", + url: state.url, + probe: state.probe, + tokens: null, + error: action.error, + }; case "oauth-cancelled": if (state.step !== "oauth-waiting") return state; @@ -112,18 +133,21 @@ function reducer(state: State, action: Action): State { case "add-start": { const tokens = - state.step === "oauth-done" ? state.tokens - : state.step === "probed" ? null - : null; - const probe = - "probe" in state ? state.probe : null; + state.step === "oauth-done" ? state.tokens : state.step === "probed" ? null : null; + const probe = "probe" in state ? state.probe : null; if (!probe) return state; return { step: "adding", url: state.url, probe, tokens }; } case "add-fail": if (state.step !== "adding") return state; - return { step: "error", url: state.url, probe: state.probe, tokens: state.tokens, error: action.error }; + return { + step: "error", + url: state.url, + probe: state.probe, + tokens: state.tokens, + error: action.error, + }; case "retry": { if (state.step !== "error") return state; @@ -144,7 +168,7 @@ function reducer(state: State, action: Action): State { // --------------------------------------------------------------------------- type OAuthPopupResult = - | { type: "executor:oauth-result"; ok: true; sessionId: string } & OAuthTokens + | ({ type: "executor:oauth-result"; ok: true; sessionId: string } & OAuthTokens) | { type: "executor:oauth-result"; ok: false; sessionId: null; error: string }; const OAUTH_RESULT_CHANNEL = "executor:mcp-oauth-result"; @@ -159,14 +183,14 @@ function openOAuthPopup( onResult: (data: OAuthPopupResult) => void, onOpenFailed?: () => void, ): () => void { - const w = 600, h = 700; + const w = 600, + h = 700; const left = window.screenX + (window.outerWidth - w) / 2; const top = window.screenY + (window.outerHeight - h) / 2; let settled = false; - const channel = typeof BroadcastChannel !== "undefined" - ? new BroadcastChannel(OAUTH_RESULT_CHANNEL) - : null; + const channel = + typeof BroadcastChannel !== "undefined" ? new BroadcastChannel(OAUTH_RESULT_CHANNEL) : null; const settle = () => { if (settled) return; settled = true; @@ -186,7 +210,11 @@ function openOAuthPopup( window.addEventListener("message", onMsg); if (channel) channel.onmessage = (e) => handleResult(e.data); - const popup = window.open(url, "mcp-oauth", `width=${w},height=${h},left=${left},top=${top},popup=1`); + const popup = window.open( + url, + "mcp-oauth", + `width=${w},height=${h},left=${left},top=${top},popup=1`, + ); if (!popup && !settled) { settle(); queueMicrotask(() => onOpenFailed?.()); @@ -212,16 +240,12 @@ export default function AddMcpSource(props: { ); // --- Stdio state --- - const [stdioCommand, setStdioCommand] = useState( - isStdioPreset ? preset.command : "", - ); + const [stdioCommand, setStdioCommand] = useState(isStdioPreset ? preset.command : ""); const [stdioArgs, setStdioArgs] = useState( isStdioPreset && preset.args ? preset.args.join(" ") : "", ); const [stdioEnv, setStdioEnv] = useState(""); - const [stdioName, setStdioName] = useState( - isStdioPreset ? preset.name : "", - ); + const [stdioName, setStdioName] = useState(isStdioPreset ? preset.name : ""); const [stdioAdding, setStdioAdding] = useState(false); const [stdioError, setStdioError] = useState(null); @@ -229,7 +253,7 @@ export default function AddMcpSource(props: { const remoteUrl = !isStdioPreset && preset?.transport === undefined && preset?.url ? preset.url - : props.initialUrl ?? ""; + : (props.initialUrl ?? ""); const [state, dispatch] = useReducer( reducer, @@ -268,9 +292,11 @@ export default function AddMcpSource(props: { (header) => header.name.trim() && header.value.trim(), ); const authReady = - remoteAuthMode === "none" ? canUseNone - : remoteAuthMode === "header" ? headerAuthComplete - : tokens !== null; + remoteAuthMode === "none" + ? canUseNone + : remoteAuthMode === "header" + ? headerAuthComplete + : tokens !== null; const canAdd = Boolean(probe) && authReady && remoteHeadersComplete && !isAdding && !isOAuthBusy; const error = state.step === "error" ? state.error : null; @@ -336,7 +362,10 @@ export default function AddMcpSource(props: { }, ); } catch (e) { - dispatch({ type: "oauth-fail", error: e instanceof Error ? e.message : "Failed to start OAuth" }); + dispatch({ + type: "oauth-fail", + error: e instanceof Error ? e.message : "Failed to start OAuth", + }); } }, [state.url, scopeId, doStartOAuth]); @@ -386,7 +415,10 @@ export default function AddMcpSource(props: { }); props.onComplete(); } catch (e) { - dispatch({ type: "add-fail", error: e instanceof Error ? e.message : "Failed to add source" }); + dispatch({ + type: "add-fail", + error: e instanceof Error ? e.message : "Failed to add source", + }); } }, [probe, remoteAuthMode, remoteHeaderAuth, remoteHeaders, tokens, state.url, doAdd, props]); @@ -483,7 +515,9 @@ export default function AddMcpSource(props: {
dispatch({ type: "set-url", url: (e.target as HTMLInputElement).value })} + onChange={(e) => + dispatch({ type: "set-url", url: (e.target as HTMLInputElement).value }) + } placeholder="https://mcp.example.com" className="flex-1 font-mono text-sm" onKeyDown={(e) => { @@ -493,7 +527,13 @@ export default function AddMcpSource(props: { /> {!probe && ( )}
@@ -507,8 +547,21 @@ export default function AddMcpSource(props: {
- - + +
@@ -522,11 +575,17 @@ export default function AddMcpSource(props: {

{probe.connected ? ( - + Connected ) : ( - + OAuth required )} @@ -553,7 +612,9 @@ export default function AddMcpSource(props: { > None - no auth header + + no auth header + )} @@ -566,7 +627,9 @@ export default function AddMcpSource(props: { > Header - use a secret-backed auth header + + use a secret-backed auth header + {probe.requiresOAuth && ( @@ -579,7 +642,9 @@ export default function AddMcpSource(props: { > OAuth - sign in with the server's OAuth flow + + sign in with the server's OAuth flow + )} @@ -612,8 +677,18 @@ export default function AddMcpSource(props: { {state.step === "probed" && ( @@ -629,7 +704,9 @@ export default function AddMcpSource(props: { {state.step === "oauth-waiting" && (
- Waiting for authorization in popup… + + Waiting for authorization in popup… +
)} @@ -667,7 +752,8 @@ export default function AddMcpSource(props: {

- Plaintext headers sent with every request. Use authentication for secret-backed auth headers. + Plaintext headers sent with every request. Use authentication for secret-backed + auth headers.

@@ -684,7 +772,10 @@ export default function AddMcpSource(props: { {remoteHeaders.length > 0 && (
{remoteHeaders.map((header, index) => ( -
+
- + @@ -722,14 +815,19 @@ export default function AddMcpSource(props: { />
- + setRemoteHeaders((headers) => headers.map((current, headerIndex) => headerIndex === index - ? { ...current, value: (event.target as HTMLInputElement).value } + ? { + ...current, + value: (event.target as HTMLInputElement).value, + } : current, ), ) @@ -752,7 +850,12 @@ export default function AddMcpSource(props: {

{error}

-
@@ -765,7 +868,13 @@ export default function AddMcpSource(props: { Cancel
)} @@ -773,7 +882,9 @@ export default function AddMcpSource(props: { {/* Cancel when nothing probed yet */} {!probe && !isProbing && (
- +
)} @@ -809,7 +920,9 @@ export default function AddMcpSource(props: {
- + setStdioName((e.target as HTMLInputElement).value)} @@ -819,7 +932,10 @@ export default function AddMcpSource(props: {
- +